<script id="issue-detail-inner-template" type="text/x-handlebars-template">
- <div class="code-issue code-issue-collapsed" data-issue-key="{{key}}" data-issue-component="{{component}}" data-issue-rule="{{rule}}">
- <div class="code-issue-permalink">
- <a target="_blank" href="<%= ApplicationController.root_context -%>/issue/show/{{key}}?layout=false"><img src="<%= ApplicationController.root_context -%>/images/new-window-16.gif"></a>
- </div>
-
+ <div class="code-issue code-issue-collapsed code-issue-active" data-issue-key="{{key}}" data-issue-component="{{component}}" data-issue-rule="{{rule}}">
<div class="code-issue-name">
+ <div class="code-issue-name-rule">
{{severityIcon severity}} <a class="code-issue-toggle rulename">{{message}}</a>
+ </div>
- {{#if debt}}
- <div class="code-issue-name-extra"><%= message('issue.technical_debt') -%> {{debt}}</div>
- {{/if}}
+ {{#if debt}}
+ <div class="code-issue-name-right"
+ title="{{#all characteristic subCharacteristic}}{{characteristic}} > {{subCharacteristic}}{{else}}<%= message('issue.technical_debt_deleted') -%>{{/all}}"><%= message('issue.technical_debt') -%> {{debt}}</div>
+ {{/if}}
+
+ {{#any reporterName author}}
+ <ul class="code-issue-name-extra code-issue-list">
+ {{#if reporterName}}<li><%= message('reporter') -%>: {{reporterName}}</li>{{/if}}
+ {{#if author}}<li><%= message('author') -%>: {{author}}</li>{{/if}}
+ </ul>
+ {{/any}}
+
+ <div class="code-issue-permalink">
+ <a target="_blank" href="<%= ApplicationController.root_context -%>/issue/show/{{key}}?layout=false"><img src="<%= ApplicationController.root_context -%>/images/new-window-16.gif"></a>
+ </div>
</div>
<div class="code-issue-details">
<ul class="tabs">
- <li>
- <a href="#tab-issue-details"><%= message('issue.details') -%></a>
- </li>
<li>
<a href="#tab-issue-rule"><%= message('rule') -%></a>
</li>
</li>
</ul>
- <div id="tab-issue-details">
- <ul class="code-issue-details-list">
- {{#if debt}}
- <li>
- <div class="code-issue-details-term"><%= message('issue.technical_debt_clear') -%></div>
- <div class="code-issue-details-value">
- {{debt}}
- {{#if characteristic}}
- {{#if subCharacteristic}}
- - {{characteristic}} > {{subCharacteristic}}
- {{else}}
- <br><%= message('issue.technical_debt_deleted') -%>
- {{/if}}
- {{else}}
- <br><%= message('issue.technical_debt_deleted') -%>
- {{/if}}
- </div>
- </li>
- {{/if}}
- {{#if reporterName}}
- <li>
- <div class="code-issue-details-term"><%= message('reporter') -%></div>
- <div class="code-issue-details-value">{{reporterName}}</div>
- </li>
- {{/if}}
- {{#if author}}
- <li>
- <div class="code-issue-details-term"><%= message('author') -%></div>
- <div class="code-issue-details-value">{{author}}</div>
- </li>
- {{/if}}
- <li>
- <div class="code-issue-details-term"><%= message('created') -%></div>
- <div class="code-issue-details-value">{{fCreationDate}}</div>
- </li>
- <li>
- <div class="code-issue-details-term"><%= message('updated') -%></div>
- <div class="code-issue-details-value">{{fUpdateDate}}</div>
- </li>
- </ul>
- </div>
-
<div id="tab-issue-rule">
- <div class="rule-desc">
-
- </div>
+ <div class="rule-desc"></div>
</div>
<div id="tab-issue-changelog">
</div>
</div>
- <div class="code-issue-comments">
- {{#each comments}}
- <div class="code-issue-comment" data-comment-key="{{key}}">
- <h4>
- <%= image_tag('reviews/comment.png') -%>
- <b>{{userName}}</b>
- ({{fCreatedAge}})
- {{#if updatable}}
- <%= image_tag 'sep12.png' -%>
- <a class="link-action issue-comment-edit"><%= message('edit') -%></a>
- <a class="link-action spacer-right issue-comment-delete"
- data-confirm-msg="<%= h message('issue.comment.delete_confirm_message') -%>"><%= message('delete') -%></a>
- {{/if}}
- </h4>
- {{{html}}}
- </div>
- {{/each}}
- </div>
-
- <ul class="code-issue-actions">
+ <ul class="code-issue-actions code-issue-list">
{{#inArray actions "comment"}}
<li>
<a id="issue-comment" class="link-action">{{translate "actions.comment" }}</a>
<li>
{{statusIcon status}}{{translate "statuses" status}}
{{#if resolution}}({{translate "resolutions" resolution}}){{/if}}
- </li>
+ {{#ifNotEmpty transitions}}
+ {{#withFirst transitions}}
+ <a class="link-action issue-transition spacer-left" data-transition="{{this}}">{{translate "transitions" this}}</a>
+ {{/withFirst}}
- {{#ifNotEmpty transitions}}
- <li>
- {{#withFirst transitions}}
- <a class="link-action issue-transition" data-transition="{{this}}">{{translate "transitions" this}}</a>
- {{/withFirst}}
-
- {{#ifHasExtraTransitions transitions}}
+ {{#ifHasExtraTransitions transitions}}
<div class="dropdown">
<a class="link-action link-more" onclick="showDropdownMenuOnElement($j(this).next('.dropdown-menu')); return false;"></a>
<ul style="display: none" class="dropdown-menu">
</ul>
</div>
- {{/ifHasExtraTransitions}}
- </li>
- {{/ifNotEmpty}}
+ {{/ifHasExtraTransitions}}
+ {{/ifNotEmpty}}
+ </li>
{{#inArray actions "assign"}}
{{/inArray}}
- <li>
- {{#inArray actions "plan"}}
+ {{#inArray actions "plan"}}
+ <li>
{{#if actionPlanName}}
<a id="issue-plan" class="link-action"><%= message('issue.planned_for') -%></a> {{actionPlanName}}
{{else}}
{{#if actionPlanName}}
<%= message('issue.planned_for') -%> <strong>{{actionPlanName}}</strong>
{{/if}}
- {{/inArray}}
- </li>
+ </li>
+ {{/inArray}}
{{#ifHasExtraActions actions}}
</ul>
<div class="code-issue-form"></div>
+
+
+ <div class="code-issue-comments">
+ {{#each comments}}
+ <div class="code-issue-comment" data-comment-key="{{key}}">
+ <h4>
+ <%= image_tag('reviews/comment.png') -%>
+ <b>{{userName}}</b>
+ ({{fCreatedAge}})
+
+ {{#if updatable}}
+ <%= image_tag 'sep12.png' -%>
+ <a class="link-action issue-comment-edit"><%= message('edit') -%></a>
+ <a class="link-action spacer-right issue-comment-delete"
+ data-confirm-msg="<%= h message('issue.comment.delete_confirm_message') -%>"><%= message('delete') -%></a>
+ {{/if}}
+ </h4>
+ {{{html}}}
+ </div>
+ {{/each}}
+ </div>
</div>
</script>
return v1 != v2 ? options.fn(this) : options.inverse(this);
});
+ Handlebars.registerHelper('all', function() {
+ var args = Array.prototype.slice.call(arguments, 0, -1),
+ options = arguments[arguments.length - 1],
+ all = args.reduce(function(prev, current) {
+ return prev && current;
+ }, true);
+ return all ? options.fn(this) : options.inverse(this);
+ });
+
+ Handlebars.registerHelper('any', function() {
+ var args = Array.prototype.slice.call(arguments, 0, -1),
+ options = arguments[arguments.length - 1],
+ all = args.reduce(function(prev, current) {
+ return prev || current;
+ }, true);
+ return all ? options.fn(this) : options.inverse(this);
+ });
+
Handlebars.registerHelper('inArray', function(array, element, options) {
if (array.indexOf(element) !== -1) {
return options.fn(this);
toggleCollapsed: function() {
this.$('.code-issue').toggleClass('code-issue-collapsed');
+ this.fetchRule();
},
content: "\f000";
color: #d4333f;
font-size: 14px;
+ line-height: 12px;
}
.icon-severity-critical:before {
content: "\f001";
color: #d4333f;
font-size: 14px;
+ line-height: 12px;
}
.icon-severity-major:before {
content: "\f002";
color: #d4333f;
font-size: 14px;
+ line-height: 12px;
}
.icon-severity-minor:before {
content: "\f003";
color: #85bb43;
font-size: 14px;
+ line-height: 12px;
}
.icon-severity-info:before {
content: "\f004";
color: #85bb43;
font-size: 14px;
+ line-height: 12px;
}
/*
* Status
content: "\f010";
color: #85bb43;
font-size: 14px;
+ line-height: 12px;
}
.icon-status-confirmed:before {
content: "\f011";
color: #d4333f;
font-size: 14px;
+ line-height: 12px;
}
.icon-status-reopened:before {
content: "\f012";
color: #85bb43;
font-size: 14px;
+ line-height: 12px;
}
.icon-status-resolved:before {
content: "\f013";
color: #4b9fd5;
font-size: 14px;
+ line-height: 12px;
}
.icon-status-closed:before {
content: "\f014";
color: #444444;
font-size: 14px;
+ line-height: 12px;
}
/*
* Resolution
content: "\f000";
color: @severityBlockerColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-severity-critical:before {
content: "\f001";
color: @severityCriticalColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-severity-major:before {
content: "\f002";
color: @severityMajorColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-severity-minor:before {
content: "\f003";
color: @severityMinorColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-severity-info:before {
content: "\f004";
color: @severityInfoColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
content: "\f010";
color: @statusOpenColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-status-confirmed:before {
content: "\f011";
color: @statusConfirmedColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-status-reopened:before {
content: "\f012";
color: @statusReopenedColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-status-resolved:before {
content: "\f013";
color: @statusResolvedColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
.icon-status-closed:before {
content: "\f014";
color: @statusClosedColor;
font-size: @iconFontSize;
+ line-height: @iconLineHeight;
}
}
.navigator-fetching.code-issue-actions:before,
.navigator-fetching#tab-issue-rule:before {
- background-color: #EFEFEF;
+ background-color: #CAE3F2;
}
.navigator-header {
padding: 0 10px;
}
.navigator-details .source_title {
position: fixed;
+ z-index: 3;
top: 104px;
left: 320px;
right: 0;
}
.navigator-fetching.code-issue-actions:before,
.navigator-fetching#tab-issue-rule:before {
- background-color: #EFEFEF;
+ background-color: #CAE3F2;
}
.navigator-header {
padding: 0 10px;
}
.navigator-details .source_title {
position: fixed;
+ z-index: 3;
top: 104px;
left: 320px;
right: 0;
position: relative;
&:before {
- background-color: #EFEFEF;
+ background-color: #CAE3F2;
}
}
}
.source_title {
position: fixed;
+ z-index: 3;
top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
left: @navigatorResultsWidth;
right: 0;
font-weight: bold;
}
-.code-issue-permalink {
- float: right;
- padding: 4px 4px 0 0;
-}
-
-.code-issue-name-extra {
- float: right;
- padding-right: 10px;
-}
-
.code-issue-toggle {
cursor: pointer;
text-decoration: underline;
}
.code-issue-name {
+ position: relative;
background-color: #E4ECF3;
margin: 0;
padding: 5px 10px;
vertical-align: text-bottom;
}
+.code-issue-name-rule {
+ max-width: 70%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.code-issue-permalink {
+ position: absolute;
+ top: 4px; right: 4px;
+}
+
+.code-issue-name-extra {
+ margin-top: 6px;
+ line-height: 12px;
+}
+
+.code-issue-name-extra li {
+ font-size: 11px !important;
+}
+
+.code-issue-name-right {
+ position: absolute;
+ top: 5px; right: 26px;
+}
+
.code-issue-comment, .code-issue-msg, .code-issue-actions, .code-issue-form, .issue-rule, .issue-changelog, .issue-technicaldebt {
background-color: #EFEFEF;
border: 1px solid #DDD;
content: ":";
}
+.code-issue-list {
+ font-size: 0;
+}
+
+.code-issue-list > li {
+ display: inline-block;
+ vertical-align: middle;
+ height: 14px;
+ line-height: 14px;
+ padding: 0 8px;
+ border-left: 1px solid #fff;
+ border-right: 1px solid #bfbfbf;
+ font-size: 12px;
+}
+
+.code-issue-list > li:first-child {
+ padding-left: 0;
+ border-left: none;
+}
+
+.code-issue-list > li:last-child {
+ padding-right: 0;
+ border-right: none;
+}
+
.code-issue-collapsed .code-issue-msg,
.code-issue-collapsed .code-issue-details {
display: none;
}
+.code-issue-active .code-issue-name,
+.code-issue-active .code-issue-details,
+.code-issue-active .code-issue-actions,
+.code-issue-active .code-issue-form,
+.code-issue-active .code-issue-comments,
+.code-issue-active .code-issue-comment {
+ background-color: #CAE3F2;
+ border-color: #4B9FD5;
+}
+
+.code-issue-active .code-issue-name,
+.code-issue-active .code-issue-details {
+ border-bottom: none;
+}
+
+.code-issue-active .code-issue-details .tabs {
+ border-color: #4B9FD5;
+}
+
.tab_header {
border-bottom: 1px solid #DDD;
background-color: #EFEFEF;
*/
@iconFontSize: 14px;
+@iconLineHeight: 12px;
@severityBlockerColor: @red;
@severityCriticalColor: @red;