diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-24 15:51:16 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-24 15:51:22 +0200 |
commit | 36739b7fdc9e5e9a7820edfd451272ca8ee339cb (patch) | |
tree | 3de324cbcdf1f44ccacedff206bb4f10f07de5cd /server/sonar-web/src/main/webapp | |
parent | ecdc9a974827cd25afb1a82d5d3cc007ed49ebbc (diff) | |
download | sonarqube-36739b7fdc9e5e9a7820edfd451272ca8ee339cb.tar.gz sonarqube-36739b7fdc9e5e9a7820edfd451272ca8ee339cb.zip |
SONAR-4561 Fix vertical alignment of action links on Project History page
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb | 96 |
1 files changed, 52 insertions, 44 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb index 1815d10ee92..e582b6e2e12 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/history.html.erb @@ -50,46 +50,56 @@ %> <tr class="<%= cycle 'even','odd' -%> hoverable snapshot"> + <%# Year %> <td class="thin nowrap"><b><%= time.year unless time.year == current_year -%></b></td> + <%# Month %> <td class="thin nowrap"><b><%= l(time, :format => '%B').capitalize unless time.month == current_month -%></b></td> + <%# Day %> <td class="thin nowrap"><%= l(time, :format => '%d') -%></td> + <%# Time %> <td class="thin nowrap"><%= l(time, :format => '%H:%M') -%></td> + <%# Version %> <td class="thin nowrap" style="padding-left: 20px;"> - <table class="width100"> - <tr id="version_<%= index -%>"> - <% if version_event %> - <td class="width100"><%= version_event.name if version_event -%></td> - <td class="small edit_actions" style="padding-left:20px"> - <a id="version_<%= index -%>_change" href="#" onclick="$j('#version_<%= index -%>').hide();$j('#version_<%= index -%>_form').show();$j('#version_name_<%= index -%>').focus();return false;"><%= message('project_history.rename_version') -%></a> - <% if version_event && !snapshot.islast? %> - <%= link_to( message('project_history.remove_version'), - { :action => 'delete_version', :sid => snapshot.id}, - :confirm => message('project_history.do_you_want_to_remove_version', :params => version_event.name) ) -%> - <% end %> - </td> - <% else %> - <td class="small edit_actions" colspan="2"> - <a id="version_<%= index -%>_change" href="#" onclick="$j('#version_<%= index -%>').hide();$j('#version_<%= index -%>_form').show();$j('#version_name_<%= index -%>').focus();return false;"><%= message('project_history.create_version') -%></a> - </td> + <table class="width100"> + <tr id="version_<%= index -%>"> + + <% if version_event %> + <td class="width100"><%= version_event.name if version_event -%></td> + <td class="small edit_actions" style="padding-left:20px"> + <a id="version_<%= index -%>_change" href="#" onclick="$j('#version_<%= index -%>').hide();$j('#version_<%= index -%>_form').show();$j('#version_name_<%= index -%>').focus();return false;"><%= message('project_history.rename_version') -%></a> + + <% if version_event && !snapshot.islast? %> + <%= link_to( message('project_history.remove_version'), + { :action => 'delete_version', :sid => snapshot.id}, + :confirm => message('project_history.do_you_want_to_remove_version', :params => version_event.name) ) -%> <% end %> - </tr> - <tr id="version_<%= index -%>_form" style="display:none;"> - <td coslpan="2" class="admin"> - <% form_tag( {:action => 'update_version', :sid => snapshot.id }) do -%> - <input id="version_name_<%= index -%>" name="version_name" type="text" value="<%= version_event ? version_event.name : '' -%>" - onKeyUp="if (this.value=='') $j('#save_version_<%= index -%>').disabled='true'; else $j('#save_version_<%= index -%>').disabled='';"/> - <%= submit_tag message('save'), :id => 'save_version_' + index.to_s %> - <a href="#" onclick="$j('#version_<%= index -%>').show();$j('#version_<%= index -%>_form').hide();"><%= message('cancel') -%></a> - <% end %> - </td> - </tr> - </table> + </td> + + <% else %> + <td class="small edit_actions" colspan="2"> + <a id="version_<%= index -%>_change" href="#" onclick="$j('#version_<%= index -%>').hide();$j('#version_<%= index -%>_form').show();$j('#version_name_<%= index -%>').focus();return false;"><%= message('project_history.create_version') -%></a> + </td> + + <% end %> + </tr> + <tr id="version_<%= index -%>_form" style="display:none;"> + <td coslpan="2" class="admin"> + <% form_tag( {:action => 'update_version', :sid => snapshot.id }) do -%> + <input id="version_name_<%= index -%>" name="version_name" type="text" value="<%= version_event ? version_event.name : '' -%>" + onKeyUp="if (this.value=='') $j('#save_version_<%= index -%>').disabled='true'; else $j('#save_version_<%= index -%>').disabled='';"/> + <%= submit_tag message('save'), :id => 'save_version_' + index.to_s %> + <a href="#" onclick="$j('#version_<%= index -%>').show();$j('#version_<%= index -%>_form').hide();"><%= message('cancel') -%></a> + <% end %> + </td> + </tr> + </table> </td> + <%# Events %> <td class="thin nowrap" style="padding-left: 20px;"> <table class="width100"> <% @@ -99,28 +109,26 @@ <tr id="event_<%= event_index -%>"> <td class="width100"><%= event.name -%></td> <td class="small edit_actions" style="padding-left:20px"> - <a id="event_<%= event_index -%>_change" href="#" onclick="$j('#event_<%= event_index -%>').hide();$j('#event_<%= event_index -%>_form').show();$j('#event_name_<%= event_index -%>').focus();return false;"><%= message('project_history.rename_event') -%></a> - <%= link_to( message('project_history.remove_version'), - { :action => 'delete_event', :id => event.id}, - :confirm => message('project_history.do_you_want_to_remove_version', :params => event.name) ) -%> + <a id="event_<%= event_index -%>_change" href="#" onclick="$j('#event_<%= event_index -%>').hide();$j('#event_<%= event_index -%>_form').show();$j('#event_name_<%= event_index -%>').focus();return false;"><%= message('project_history.rename_event') -%></a> + <%= link_to( message('project_history.remove_version'), + { :action => 'delete_event', :id => event.id}, + :confirm => message('project_history.do_you_want_to_remove_version', :params => event.name) ) -%> </td> </tr> <tr id="event_<%= event_index -%>_form" style="display:none;"> - <td colspan="2" class="admin"> - <% form_tag( {:action => 'update_event', :id => event.id }) do -%> - <input id="event_name_<%= event_index -%>" name="event_name" type="text" value="<%= event.name -%>" - onKeyUp="if (this.value=='') $j('#save_event_<%= event_index -%>').disabled='true'; else $j('#save_event_<%= event_index -%>').disabled='';"/> - <%= submit_tag message('save'), :id => 'save_event_' + event_index %> - <a href="#" onclick="$j('#event_<%= event_index -%>').show();$j('#event_<%= event_index -%>_form').hide();"><%= message('cancel') -%></a> - <% end %> - </td> + <td colspan="2" class="admin"> + <% form_tag( {:action => 'update_event', :id => event.id }) do -%> + <input id="event_name_<%= event_index -%>" name="event_name" type="text" value="<%= event.name -%>" + onKeyUp="if (this.value=='') $j('#save_event_<%= event_index -%>').disabled='true'; else $j('#save_event_<%= event_index -%>').disabled='';"/> + <%= submit_tag message('save'), :id => 'save_event_' + event_index %> + <a href="#" onclick="$j('#event_<%= event_index -%>').show();$j('#event_<%= event_index -%>_form').hide();"><%= message('cancel') -%></a> + <% end %> + </td> </tr> <% end %> <tr id="create_event_<%= index -%>"> - <td colspan="2" class="create_actions"> - <span class="small"> - <a id="create_event_<%= index -%>_change" href="#" onclick="$j('#create_event_<%= index -%>').hide();$j('#create_event_<%= index -%>_form').show();$j('#create_event_name_<%= index -%>').focus();return false;"><%= message('project_history.create_event') -%></a> - </span> + <td colspan="2" class="small create_actions"> + <a id="create_event_<%= index -%>_change" href="#" onclick="$j('#create_event_<%= index -%>').hide();$j('#create_event_<%= index -%>_form').show();$j('#create_event_name_<%= index -%>').focus();return false;"><%= message('project_history.create_event') -%></a> </td> </tr> <tr id="create_event_<%= index -%>_form" style="display:none;"> |