events:
'click .js-back': 'returnToList'
- 'click .js-issues-bulk-change': 'bulkChange'
+ 'click #issues-bulk-change': 'bulkChange'
+ 'click #issues-reload': 'reloadIssues'
'click .js-issues-next': 'selectNextIssue'
'click .js-issues-prev': 'selectPrevIssue'
openModalWindow url, {}
+ reloadIssues: ->
+ @options.app.controller.fetchIssues()
+
+
selectNextIssue: ->
@options.app.controller.selectNextIssue()
-{{#if state.component}}
- <span class="issues-header-item">
- <a class="js-back">Return to List</a>
- </span>
+<div class="issues-header-component">
+ {{#if state.component}}
+ {{#with state.component}}
+ <a href="{{dashboardUrl project}}" title="{{projectName}}">{{projectName}}</a>
+ /
+ <a href="{{dashboardUrl key}}" title="{{name}}">{{name}}</a>
+ {{/with}}
+ {{else}}
+
+ {{/if}}
+</div>
- <span class="issues-header-item">
- {{state.component.projectName}} {{state.component.name}}
- </span>
-{{/if}}
-<span class="issues-header-item issues-header-nav">
- <a class="icon-bulk-change js-issues-bulk-change"></a>
-</span>
+<div class="issues-header-actions">
+ {{#if state.total}}
+ <div class="issues-header-pagination">
+ <a class="js-issues-prev icon-prev" title="{{t 'paging_previous'}}"></a>
+ <span class="current">{{sum state.selectedIndex 1}} / <span id="issues-total">{{state.total}}</span></span>
+ <a class="js-issues-next icon-next" title="{{t 'paging_next'}}"></a>
+ </div>
+ {{/if}}
-{{#if state.total}}
- <span class="issues-header-item issues-header-nav">
- <a class="js-issues-prev icon-prev"></a>
- <span class="current">{{sum state.selectedIndex 1}} / <span id="issues-total">{{state.total}}</span></span>
- <a class="js-issues-next icon-next"></a>
- </span>
-{{/if}}
+ <div class="issues-header-buttons button-group">
+ <button id="issues-reload">{{t 'reload'}}</button>
+ <button id="issues-bulk-change">{{t 'bulk_change'}}</button>
+ </div>
+</div>
}
.issues-header {
- .clearfix;
+ position: relative;
margin-bottom: 10px;
padding: 5px 0;
line-height: 22px;
background-color: @barBackgroundColor;
font-size: @smallFontSize;
+
+ .button-group,
+ .button-group > button,
+ .button-group > .button {
+ vertical-align: top;
+ }
+}
+
+.issues-header-component {
+ margin-left: 10px;
+ white-space: nowrap;
}
-.issues-header-item {
+.issues-header-actions {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 5px 10px;
+ background-color: @barBackgroundColor;
+ font-size: 0;
+ white-space: nowrap;
+
+ &:before {
+ content: " ";
+ position: absolute;
+ top: 0; bottom: 0; right: 100%;
+ width: 10px;
+ background-image: linear-gradient(to right, rgba(243, 243, 243, 0), @barBackgroundColor 75%);
+ }
+}
+
+.issues-header-pagination {
display: inline-block;
- margin: 0 10px;
+ vertical-align: top;
+ margin-right: 20px;
+ font-size: @smallFontSize;
}
-.issues-header-nav {
- float: right;
+.issues-header-buttons {
+ vertical-align: top;
}
.issues-workspace-list {