Merge "PolyGerrit: Add link to project + branch"
This commit is contained in:
@@ -186,7 +186,9 @@ limitations under the License.
|
||||
</section>
|
||||
<section>
|
||||
<span class="title">Branch</span>
|
||||
<span class="value">[[change.branch]]</span>
|
||||
<span class="value">
|
||||
<a href$="[[_computeBranchURL(change.project, change.branch)]]">[[change.branch]]</a>
|
||||
</span>
|
||||
</section>
|
||||
<section>
|
||||
<span class="title">Topic</span>
|
||||
|
||||
@@ -230,6 +230,18 @@
|
||||
return '/q/status:open+project:' + this.encodeURL(project, false);
|
||||
},
|
||||
|
||||
_computeBranchURL: function(project, branch) {
|
||||
var status;
|
||||
if (this.change.status == this.ChangeStatus.NEW) {
|
||||
status = this.change.status.toLowerCase().replace('new', 'open');
|
||||
} else {
|
||||
status = this.change.status.toLowerCase();
|
||||
}
|
||||
return '/q/project:' + this.encodeURL(project, false) +
|
||||
' branch:' + this.encodeURL(branch, false) +
|
||||
' status:' + this.encodeURL(status, false);
|
||||
},
|
||||
|
||||
_computeTopicHref: function(topic) {
|
||||
var encodedTopic = encodeURIComponent('\"' + topic + '\"');
|
||||
return '/q/topic:' + encodeURIComponent(encodedTopic) +
|
||||
|
||||
Reference in New Issue
Block a user