Commit 7e38fb42afa5eb2894c4fe34d26a1f45bcefdec3
1 parent
b90ea37e
Exists in
colab
and in
2 other branches
Add clipboard feature for the notify push url
Adds CHANGELOG entry
Showing
2 changed files
with
13 additions
and
5 deletions
Show diff stats
CHANGELOG.rdoc
@@ -14,6 +14,7 @@ Prezento is the web interface for Mezuro. | @@ -14,6 +14,7 @@ Prezento is the web interface for Mezuro. | ||
14 | * Add missing translation for CompoundMetric | 14 | * Add missing translation for CompoundMetric |
15 | * Make Compound Metric Config. metric list not include Hotspot metrics | 15 | * Make Compound Metric Config. metric list not include Hotspot metrics |
16 | * Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view | 16 | * Fix 'Tree Metrics' and 'Hotspot Metrics' PT translations in Configuration show view |
17 | +* Show the notify push url for the repository's owner (Gitlab only) | ||
17 | 18 | ||
18 | == v0.11.3 - 01/04/2016 | 19 | == v0.11.3 - 01/04/2016 |
19 | 20 |
app/views/repositories/show.html.erb
@@ -38,10 +38,12 @@ | @@ -38,10 +38,12 @@ | ||
38 | </p> | 38 | </p> |
39 | 39 | ||
40 | <% if repository_owner? @repository.id %> | 40 | <% if repository_owner? @repository.id %> |
41 | - <p> | ||
42 | - <strong><%= t('repository.show.notify_push_url') %>:</strong> | ||
43 | - <%= repository_notify_push_url(@repository.id) %> | ||
44 | - </p> | 41 | + <strong><%= t('repository.show.notify_push_url') %>:</strong> |
42 | + <input id="notify_url" value="<%= repository_notify_push_url(@repository.id) %>" readonly=""> | ||
43 | + | ||
44 | + <button id="btn" data-clipboard-target="#notify_url"> | ||
45 | + <i class="fa fa-copy" alt="Copy to clipboard"></i> | ||
46 | + </button> | ||
45 | <% end %> | 47 | <% end %> |
46 | 48 | ||
47 | <p><strong> <%= t('repository.show.date_processing') %>: </strong></p> | 49 | <p><strong> <%= t('repository.show.date_processing') %>: </strong></p> |
@@ -81,9 +83,14 @@ | @@ -81,9 +83,14 @@ | ||
81 | <div id="metric_results"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> | 83 | <div id="metric_results"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> |
82 | </div> | 84 | </div> |
83 | </div> | 85 | </div> |
86 | + | ||
87 | +<!-- Copy to clipboard --> | ||
88 | +<%= javascript_include_tag "https://cdn.rawgit.com/zenorocha/clipboard.js/v1.5.10/dist/clipboard.min.js" %> | ||
89 | + | ||
84 | <script type="text/javascript"> | 90 | <script type="text/javascript"> |
85 | $(document).ready(function () { | 91 | $(document).ready(function () { |
86 | - (new Repository.State(<%= @repository.id %>)).poll_state('') | 92 | + (new Repository.State(<%= @repository.id %>)).poll_state(''); |
93 | + new Clipboard('#btn'); | ||
87 | }); | 94 | }); |
88 | 95 | ||
89 | //Loads the accordion | 96 | //Loads the accordion |