label: Add label edit link at label selection
@af32f6a81991507a2819a518fb9ee748202b6377
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -6600,3 +6600,6 @@ |
6600 | 6600 |
width: 100% !important; |
6601 | 6601 |
} |
6602 | 6602 |
} |
6603 |
+.label-edit { |
|
6604 |
+ color: @blue2 |
|
6605 |
+} |
--- app/views/board/list.scala.html
+++ app/views/board/list.scala.html
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 |
</div> |
52 | 52 |
<div class="board-labels"> |
53 | 53 |
@if(!IssueLabel.findByProject(project).isEmpty){ |
54 |
- @issue.partial_select_label(IssueLabel.findByProject(project), param.labelIdSet) |
|
54 |
+ @issue.partial_select_label(IssueLabel.findByProject(project), param.labelIdSet, "", "", project) |
|
55 | 55 |
} |
56 | 56 |
</div> |
57 | 57 |
</form> |
--- app/views/board/view.scala.html
+++ app/views/board/view.scala.html
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 |
<div class="board-labels pull-right"> |
71 | 71 |
@if(!IssueLabel.findByProject(project).isEmpty){ |
72 | 72 |
@if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.UPDATE)){ |
73 |
- @issue.partial_select_label(IssueLabel.findByProject(project), post.getLabelIds) |
|
73 |
+ @issue.partial_select_label(IssueLabel.findByProject(project), post.getLabelIds, "", "", project) |
|
74 | 74 |
} else { |
75 | 75 |
@issue.partial_show_selected_label(post.labels.toList, "") |
76 | 76 |
} |
--- app/views/issue/create.scala.html
+++ app/views/issue/create.scala.html
... | ... | @@ -119,7 +119,7 @@ |
119 | 119 |
</dd> |
120 | 120 |
</dl> |
121 | 121 |
|
122 |
- @partial_select_label(IssueLabel.findByProject(project), null, "issue-option", "data-close-on-select=false") |
|
122 |
+ @partial_select_label(IssueLabel.findByProject(project), null, "issue-option", "data-close-on-select=false", project) |
|
123 | 123 |
</div> |
124 | 124 |
</div> |
125 | 125 |
</div> |
--- app/views/issue/edit.scala.html
+++ app/views/issue/edit.scala.html
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 |
</dd> |
166 | 166 |
</dl> |
167 | 167 |
|
168 |
- @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "issue-option", "data-close-on-select=false") |
|
168 |
+ @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "issue-option", "data-close-on-select=false", project) |
|
169 | 169 |
</div> |
170 | 170 |
</div> |
171 | 171 |
</div> |
--- app/views/issue/partial_searchform.scala.html
+++ app/views/issue/partial_searchform.scala.html
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 |
</a> |
148 | 148 |
} |
149 | 149 |
|
150 |
- @partial_select_label(labels, param.labelIds, "issue-option") |
|
150 |
+ @partial_select_label(labels, param.labelIds, "issue-option", "", project) |
|
151 | 151 |
</div> |
152 | 152 |
} |
153 | 153 |
</div> |
--- app/views/issue/partial_select_label.scala.html
+++ app/views/issue/partial_select_label.scala.html
... | ... | @@ -19,12 +19,12 @@ |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 | 21 |
@(labels:List[models.IssueLabel], selectedLabelIds:Set[Long] = null, |
22 |
- wrapperCSSClassName:String = "", additionalAttr:String = "") |
|
22 |
+ wrapperCSSClassName:String = "", additionalAttr:String = "", project:Project) |
|
23 | 23 |
|
24 | 24 |
@if(!labels.isEmpty){ |
25 | 25 |
<dl class="@wrapperCSSClassName"> |
26 | 26 |
<dt> |
27 |
- @Messages("label") |
|
27 |
+ @Messages("label") @if(UserApp.currentUser().isManagerOf(project)){<a href="@routes.IssueLabelApp.labelsForm(project.owner, project.name)" target="_blank" class="label-edit">[@Messages("button.edit")]</a>} |
|
28 | 28 |
</dt> |
29 | 29 |
<dd> |
30 | 30 |
<select name="labelIds" multiple="multiple" data-search="labelIds" |
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
... | ... | @@ -284,7 +284,7 @@ |
284 | 284 |
@**<!-- labels -->**@ |
285 | 285 |
@if(!IssueLabel.findByProject(project).isEmpty){ |
286 | 286 |
@if(isAllowed(UserApp.currentUser(), issue.asResource(), Operation.UPDATE)){ |
287 |
- @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds) |
|
287 |
+ @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "", "", project) |
|
288 | 288 |
} else { |
289 | 289 |
@partial_show_selected_label(issue.labels.toList, routes.IssueApp.issues(project.owner, project.name, issue.state.state(), "html", 1).toString) |
290 | 290 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?