mirror of
				https://github.com/gitbucket/gitbucket.git
				synced 2025-10-31 10:36:05 +01:00 
			
		
		
		
	Merge branch 'master' into profile_generalization
This commit is contained in:
		| @@ -48,17 +48,32 @@ $(function(){ | |||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   $('.table-issues input[type=checkbox]').change(function(){ |   $('.table-issues input[type=checkbox]').change(function(){ | ||||||
|     if($('.table-issues input[type=checkbox]').filter(':checked').length == 0){ |     var all = $('.table-issues input[type=checkbox][value]'); | ||||||
|  |  | ||||||
|  |     // check all | ||||||
|  |     if($(this).val() == 'on'){ | ||||||
|  |       var flag = $(this).is(":checked"); | ||||||
|  |       all.each(function(){ | ||||||
|  |         $(this).prop("checked", flag); | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     var count = all.filter(':checked').length; | ||||||
|  |     // whether all check | ||||||
|  |     $('.table-issues input[type=checkbox]').filter(':first').prop("checked", count > 0 && count == all.length); | ||||||
|  |  | ||||||
|  |     if(count == 0){ | ||||||
|       $('#table-issues-control').show(); |       $('#table-issues-control').show(); | ||||||
|       $('#table-issues-batchedit').hide(); |       $('#table-issues-batchedit').hide(); | ||||||
|     } else { |     } else { | ||||||
|  |       $('#batchedit-selected').text(count); | ||||||
|       $('#table-issues-control').hide(); |       $('#table-issues-control').hide(); | ||||||
|       $('#table-issues-batchedit').show(); |       $('#table-issues-batchedit').show(); | ||||||
|     } |     } | ||||||
|   }).filter(':first').change(); |   }).filter(':first').change(); | ||||||
|  |  | ||||||
|   var submitBatchEdit = function(action, value) { |   var submitBatchEdit = function(action, value) { | ||||||
|     var checked = $('.table-issues input[type=checkbox]').filter(':checked').map(function(){ return this.value; }).get().join(); |     var checked = $('.table-issues input[type=checkbox][value]').filter(':checked').map(function(){ return this.value; }).get().join(); | ||||||
|     var form = $('#batcheditForm'); |     var form = $('#batcheditForm'); | ||||||
|     form.find('input[name=value]').val(value); |     form.find('input[name=value]').val(value); | ||||||
|     form.find('input[name=checked]').val(checked); |     form.find('input[name=checked]').val(checked); | ||||||
|   | |||||||
| @@ -26,8 +26,10 @@ | |||||||
| <table class="table table-bordered table-hover table-issues"> | <table class="table table-bordered table-hover table-issues"> | ||||||
|   <tr> |   <tr> | ||||||
|     <th style="background-color: #eee;"> |     <th style="background-color: #eee;"> | ||||||
|       <input type="checkbox"/> |       @if(hasWritePermission){ | ||||||
|       <span class="small"> |         <input type="checkbox"/> | ||||||
|  |       } | ||||||
|  |       <span class="small" id="table-issues-control"> | ||||||
|         <a class="button-link@if(condition.state == "open"){ selected}" href="@condition.copy(state = "open").toURL"> |         <a class="button-link@if(condition.state == "open"){ selected}" href="@condition.copy(state = "open").toURL"> | ||||||
|           <img src="@assets/common/images/status-open@(if(condition.state == "open"){"-active"}).png"/> |           <img src="@assets/common/images/status-open@(if(condition.state == "open"){"-active"}).png"/> | ||||||
|           @openCount Open |           @openCount Open | ||||||
| @@ -36,116 +38,119 @@ | |||||||
|           <img src="@assets/common/images/status-closed@(if(condition.state == "closed"){"-active"}).png"/> |           <img src="@assets/common/images/status-closed@(if(condition.state == "closed"){"-active"}).png"/> | ||||||
|           @closedCount Closed |           @closedCount Closed | ||||||
|         </a> |         </a> | ||||||
|       </span> |         <div class="pull-right"> | ||||||
|       <div class="pull-right" id="table-issues-control"> |           @helper.html.dropdown("Author", flat = true) { | ||||||
|         @helper.html.dropdown("Author", flat = true) { |             @collaborators.map { collaborator => | ||||||
|           @collaborators.map { collaborator => |               <li> | ||||||
|             <li> |                 <a href="@condition.copy(author = (if(condition.author == Some(collaborator)) None else Some(collaborator))).toURL"> | ||||||
|               <a href="@condition.copy(author = (if(condition.author == Some(collaborator)) None else Some(collaborator))).toURL"> |                   @helper.html.checkicon(condition.author == Some(collaborator)) | ||||||
|                 @helper.html.checkicon(condition.author == Some(collaborator)) |                   @avatar(collaborator, 20) @collaborator | ||||||
|                 @avatar(collaborator, 20) @collaborator |                 </a> | ||||||
|               </a> |               </li> | ||||||
|             </li> |             } | ||||||
|           } |  | ||||||
|         } |  | ||||||
|         @helper.html.dropdown("Label", flat = true) { |  | ||||||
|           @labels.map { label => |  | ||||||
|             <li> |  | ||||||
|               <a href="@condition.copy(labels = (if(condition.labels.contains(label.labelName)) condition.labels - label.labelName else condition.labels + label.labelName)).toURL"> |  | ||||||
|                 @helper.html.checkicon(condition.labels.contains(label.labelName)) |  | ||||||
|                 <span style="background-color: #@label.color;" class="label-color">  </span> |  | ||||||
|                 @label.labelName |  | ||||||
|               </a> |  | ||||||
|             </li> |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|         @helper.html.dropdown("Milestone", flat = true) { |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(milestone = Some(None)).toURL"> |  | ||||||
|               @helper.html.checkicon(condition.milestone == Some(None)) Issues with no milestone |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           @milestones.filter(_.closedDate.isEmpty).map { milestone => |  | ||||||
|             <li> |  | ||||||
|               <a href="@condition.copy(milestone = Some(Some(milestone.title))).toURL"> |  | ||||||
|                 @helper.html.checkicon(condition.milestone == Some(Some(milestone.title))) @milestone.title |  | ||||||
|               </a> |  | ||||||
|             </li> |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|         @helper.html.dropdown("Assignee", flat = true) { |  | ||||||
|           @collaborators.map { collaborator => |  | ||||||
|             <li> |  | ||||||
|               <a href="@condition.copy(assigned = Some(collaborator)).toURL"> |  | ||||||
|                 @helper.html.checkicon(condition.assigned == Some(collaborator)) |  | ||||||
|                 @avatar(collaborator, 20) @collaborator |  | ||||||
|               </a> |  | ||||||
|             </li> |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|         @helper.html.dropdown("Sort", flat = true){ |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="created",  direction="desc").toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "created"  && condition.direction == "desc") Newest |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="created",  direction="asc" ).toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "created"  && condition.direction == "asc") Oldest |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="comments", direction="desc").toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "comments"  && condition.direction == "desc") Most commented |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="comments", direction="asc" ).toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "comments"  && condition.direction == "asc") Least commented |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="updated",  direction="desc").toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "updated"  && condition.direction == "desc") Recently updated |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|           <li> |  | ||||||
|             <a href="@condition.copy(sort="updated",  direction="asc" ).toURL"> |  | ||||||
|             @helper.html.checkicon(condition.sort == "updated"  && condition.direction == "asc") Least recently updated |  | ||||||
|             </a> |  | ||||||
|           </li> |  | ||||||
|         } |  | ||||||
|       </div> |  | ||||||
|       @if(hasWritePermission){ |  | ||||||
|         <div class="pull-right" id="table-issues-batchedit"> |  | ||||||
|           @helper.html.dropdown("Mark as", flat = true) { |  | ||||||
|             <li><a href="javascript:void(0);" class="toggle-state" data-id="open">Open</a></li> |  | ||||||
|             <li><a href="javascript:void(0);" class="toggle-state" data-id="close">Close</a></li> |  | ||||||
|           } |           } | ||||||
|           @helper.html.dropdown("Label", flat = true) { |           @helper.html.dropdown("Label", flat = true) { | ||||||
|             @labels.map { label => |             @labels.map { label => | ||||||
|               <li> |               <li> | ||||||
|                 <a href="javascript:void(0);" class="toggle-label" data-id="@label.labelId"> |                 <a href="@condition.copy(labels = (if(condition.labels.contains(label.labelName)) condition.labels - label.labelName else condition.labels + label.labelName)).toURL"> | ||||||
|                   <i class="icon-white"></i> |                   @helper.html.checkicon(condition.labels.contains(label.labelName)) | ||||||
|                   <span class="label" style="background-color: #@label.color;"> </span> |                   <span style="background-color: #@label.color;" class="label-color">  </span> | ||||||
|                   @label.labelName |                   @label.labelName | ||||||
|                 </a> |                 </a> | ||||||
|               </li> |               </li> | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|           @helper.html.dropdown("Milestone", flat = true) { |           @helper.html.dropdown("Milestone", flat = true) { | ||||||
|             <li><a href="javascript:void(0);" class="toggle-milestone" data-id="">No milestone</a></li> |             <li> | ||||||
|  |               <a href="@condition.copy(milestone = Some(None)).toURL"> | ||||||
|  |                 @helper.html.checkicon(condition.milestone == Some(None)) Issues with no milestone | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|             @milestones.filter(_.closedDate.isEmpty).map { milestone => |             @milestones.filter(_.closedDate.isEmpty).map { milestone => | ||||||
|               <li><a href="javascript:void(0);" class="toggle-milestone" data-id="@milestone.milestoneId">@milestone.title</a></li> |               <li> | ||||||
|  |                 <a href="@condition.copy(milestone = Some(Some(milestone.title))).toURL"> | ||||||
|  |                   @helper.html.checkicon(condition.milestone == Some(Some(milestone.title))) @milestone.title | ||||||
|  |                 </a> | ||||||
|  |               </li> | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|           @helper.html.dropdown("Assignee", flat = true) { |           @helper.html.dropdown("Assignee", flat = true) { | ||||||
|             <li><a href="javascript:void(0);" class="toggle-assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li> |  | ||||||
|             @collaborators.map { collaborator => |             @collaborators.map { collaborator => | ||||||
|               <li><a href="javascript:void(0);" class="toggle-assign" data-name="@collaborator"><i class="icon-white"></i>@avatar(collaborator, 20) @collaborator</a></li> |               <li> | ||||||
|  |                 <a href="@condition.copy(assigned = Some(collaborator)).toURL"> | ||||||
|  |                   @helper.html.checkicon(condition.assigned == Some(collaborator)) | ||||||
|  |                   @avatar(collaborator, 20) @collaborator | ||||||
|  |                 </a> | ||||||
|  |               </li> | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|  |           @helper.html.dropdown("Sort", flat = true){ | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="created",  direction="desc").toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "created"  && condition.direction == "desc") Newest | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="created",  direction="asc" ).toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "created"  && condition.direction == "asc") Oldest | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="comments", direction="desc").toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "comments"  && condition.direction == "desc") Most commented | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="comments", direction="asc" ).toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "comments"  && condition.direction == "asc") Least commented | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="updated",  direction="desc").toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "updated"  && condition.direction == "desc") Recently updated | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |             <li> | ||||||
|  |               <a href="@condition.copy(sort="updated",  direction="asc" ).toURL"> | ||||||
|  |               @helper.html.checkicon(condition.sort == "updated"  && condition.direction == "asc") Least recently updated | ||||||
|  |               </a> | ||||||
|  |             </li> | ||||||
|  |           } | ||||||
|         </div> |         </div> | ||||||
|  |       </span> | ||||||
|  |       @if(hasWritePermission){ | ||||||
|  |         <span class="small" id="table-issues-batchedit"> | ||||||
|  |           <span id="batchedit-selected"></span> selected | ||||||
|  |           <div class="pull-right"> | ||||||
|  |             @helper.html.dropdown("Mark as", flat = true) { | ||||||
|  |               <li><a href="javascript:void(0);" class="toggle-state" data-id="open">Open</a></li> | ||||||
|  |               <li><a href="javascript:void(0);" class="toggle-state" data-id="close">Close</a></li> | ||||||
|  |             } | ||||||
|  |             @helper.html.dropdown("Label", flat = true) { | ||||||
|  |               @labels.map { label => | ||||||
|  |                 <li> | ||||||
|  |                   <a href="javascript:void(0);" class="toggle-label" data-id="@label.labelId"> | ||||||
|  |                     <i class="icon-white"></i> | ||||||
|  |                     <span class="label" style="background-color: #@label.color;"> </span> | ||||||
|  |                     @label.labelName | ||||||
|  |                   </a> | ||||||
|  |                 </li> | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |             @helper.html.dropdown("Milestone", flat = true) { | ||||||
|  |               <li><a href="javascript:void(0);" class="toggle-milestone" data-id="">No milestone</a></li> | ||||||
|  |               @milestones.filter(_.closedDate.isEmpty).map { milestone => | ||||||
|  |                 <li><a href="javascript:void(0);" class="toggle-milestone" data-id="@milestone.milestoneId">@milestone.title</a></li> | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |             @helper.html.dropdown("Assign", flat = true) { | ||||||
|  |               <li><a href="javascript:void(0);" class="toggle-assign" data-name="">Assign to nobody</a></li> | ||||||
|  |               @collaborators.map { collaborator => | ||||||
|  |                 <li><a href="javascript:void(0);" class="toggle-assign" data-name="@collaborator"><i class="icon-white"></i>@avatar(collaborator, 20) @collaborator</a></li> | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |           </div> | ||||||
|  |         </span> | ||||||
|       } |       } | ||||||
|     </th> |     </th> | ||||||
|   </tr> |   </tr> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user