Commit 236c735d authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

contextual links redesign

git-svn-id: http://redmine.rubyforge.org/svn/trunk@93 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent e5562afc
<div class="contextual">
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_project_plural)%></h2>
<table class="listTableContent">
......@@ -25,6 +29,4 @@
</table>
<p><%= pagination_links_full @project_pages %>
[ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
<p><%= link_to ('&#187; ' + l(:label_project_new)), :controller => 'projects', :action => 'add' %></p>
\ No newline at end of file
[ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
\ No newline at end of file
<div class="contextual">
<%= link_to l(:label_auth_source_new), {:action => 'new'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_auth_source_plural)%></h2>
<table class="listTableContent">
......@@ -25,6 +29,3 @@
</table>
<%= pagination_links_full @auth_source_pages %>
<br />
<%= link_to '&#187; ' + l(:label_auth_source_new), :action => 'new' %>
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'pic picEdit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
<h2><%= @document.title %></h2>
<p><em><%= @document.category.name %><br />
<%= format_date @document.created_on %></em></p>
<%= textilizable @document.description %>
<table width="100%">
<tr><td><%= link_to_if_authorized l(:button_edit), :controller => 'documents', :action => 'edit', :id => @document %></td>
<td align="right">
<% if authorize_for('documents', 'destroy') %>
<%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %>
<%= submit_tag l(:button_delete) %>
<%= end_form_tag %>
<% end %>
</td></tr>
</table>
<br />
<h3><%= l(:label_attachment_plural) %></h3>
<ul>
<% for attachment in @attachments %>
<li>
<% if authorize_for('documents', 'destroy_attachment') %>
<div style="float:right;padding:6px;">
<%= start_form_tag({ :controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment } ) %>
<%= submit_tag l(:button_delete), :class => 'button-small' %>
<%= end_form_tag %>
</div>
<% end %>
<div class="contextual">
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
(<%= human_size attachment.filesize %>)<br />
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
......
<div class="contextual">
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_issue_status_plural)%></h2>
<table class="listTableContent">
......@@ -22,7 +26,4 @@
<% end %>
</table>
<%= pagination_links_full @issue_status_pages %>
<br />
<%= link_to '&#187; ' + l(:label_issue_status_new), :action => 'new' %>
<%= pagination_links_full @issue_status_pages %>
\ No newline at end of file
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
<div class="topright">
<small>
<%= l(:label_export_to) %>&nbsp;
<%= link_to 'PDF', :action => 'export_pdf', :id => @issue %>
</small>
<div class="contextual">
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %>
</div>
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
<div class="box">
<table width="100%">
......@@ -46,13 +44,12 @@ end %>
<b><%=l(:field_description)%> :</b><br /><br />
<%= textilizable @issue.description %>
<br />
<div style="float:left;">
<% if authorize_for('issues', 'edit') %>
<%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
<%= submit_tag l(:button_edit) %>
<%= end_form_tag %>
&nbsp;&nbsp;
<% end %>
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'pic picEdit' %>
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'pic picMove' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
<%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
......@@ -62,26 +59,8 @@ end %>
</select>
<%= submit_tag l(:button_change) %>
<%= end_form_tag %>
&nbsp;&nbsp;
<% end %>
<% if authorize_for('projects', 'move_issues') %>
<%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project} ) %>
<%= hidden_field_tag "issue_ids[]", @issue.id %>
<%= submit_tag l(:button_move) %>
<%= end_form_tag %>
&nbsp;&nbsp;
<% end %>
</div>
<div style="float:right;">
<% if authorize_for('issues', 'destroy') %>
<%= start_form_tag ({:controller => 'issues', :action => 'destroy', :id => @issue} ) %>
<%= submit_tag l(:button_delete) %>
<%= end_form_tag %>
&nbsp;&nbsp;
<% end %>
</div>
<div class="clear"></div>
</div>
<div id="history" class="box">
......
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'pic picEdit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
<h2><%= @news.title %></h2>
<p><em><%= @news.summary %><br />
<%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
<br />
<%= textilizable auto_link @news.description %>
<div style="float:right;">
<% if authorize_for('news', 'destroy') %>
<%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %>
<%= submit_tag l(:button_delete) %>
<%= end_form_tag %>
<% end %>
</div>
<p><%= link_to_if_authorized l(:button_edit), :controller => 'news', :action => 'edit', :id => @news %></p>
<br />
<div id="comments" style="margin-bottom:16px;">
<h3><%= l(:label_comment_plural) %></h3>
<% @news.comments.each do |comment| %>
<% next if comment.new_record? %>
<h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
<div style="float:right;">
<small><%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :post => true %></small>
</div>
<%= simple_format(auto_link(h comment.comment))%>
<% next if comment.new_record? %>
<h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
<div class="contextual">
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
<%= simple_format(auto_link(h comment.comment))%>
<% end if @news.comments_count > 0 %>
</div>
......
<h2><%= l(:label_gantt) %></h2>
<div class="topright">
<small>
<%= l(:label_export_to) %>&nbsp;&nbsp;<%= link_to 'PDF', :zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :output => 'pdf' %>
</small>
<div class="contextual">
<%= l(:label_export_to) %>
<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :output => 'pdf'}, :class => 'pic picPdf' %>
</div>
<h2><%= l(:label_gantt) %></h2>
<table width="100%">
<tr>
<td align="left">
......
<div class="contextual">
<%= link_to_if_authorized l(:label_document_new), {:controller => 'projects', :action => 'add_document', :id => @project}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_document_plural)%></h2>
<% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
......@@ -16,8 +20,4 @@
<% end %>
</ul>
<% end %>
<p>
<%= link_to_if_authorized '&#187; ' + l(:label_document_new), :controller => 'projects', :action => 'add_document', :id => @project %>
</p>
<% end %>
\ No newline at end of file
<div class="contextual">
<%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_attachment_plural)%></h2>
<% delete_allowed = authorize_for('versions', 'destroy_file') %>
......@@ -26,9 +30,9 @@
<td align="center"><small><%= file.digest %></small></td>
<% if delete_allowed %>
<td align="center">
<%= start_form_tag :controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file %>
<%= submit_tag l(:button_delete), :class => "button-small" %>
<%= end_form_tag %>
<div class="contextual">
<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
</div>
</td>
<% end %>
</tr>
......@@ -36,11 +40,4 @@
reset_cycle %>
<% end %>
<% end %>
</table>
<br />
<p>
<%= link_to_if_authorized '&#187; ' + l(:label_attachment_new), :controller => 'projects', :action => 'add_file', :id => @project %>
</p>
</table>
\ No newline at end of file
<h2><%=l(:label_issue_plural)%></h2>
<div class="topright">
<small>
<%= l(:label_export_to) %>&nbsp;
<%= link_to 'CSV', :action => 'export_issues_csv', :id => @project %>,
<%= link_to 'PDF', :action => 'export_issues_pdf', :id => @project %>
</small>
<div class="contextual">
<%= l(:label_export_to) %>
<%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'pic picCsv' %>,
<%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'pic picPdf' %>
</div>
<h2><%=l(:label_issue_plural)%></h2>
<%= start_form_tag :action => 'list_issues' %>
<table cellpadding=2>
<tr>
......
<div class="contextual">
<%= link_to_if_authorized l(:label_news_new), {:controller => 'projects', :action => 'add_news', :id => @project}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_news_plural)%></h2>
<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
......@@ -14,6 +18,3 @@
<%= pagination_links_full @news_pages %>
<p>
<%= link_to_if_authorized '&#187; ' + l(:label_news_new), :controller => 'projects', :action => 'add_news', :id => @project %>
</p>
<div class="contextual">
<%= link_to l(:label_role_new), {:action => 'new'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_role_plural)%></h2>
<table class="listTableContent">
......@@ -15,7 +19,4 @@
<% end %>
</table>
<%= pagination_links_full @role_pages %>
<br />
<%= link_to '&#187; ' + l(:label_role_new), :action => 'new' %>
<%= pagination_links_full @role_pages %>
\ No newline at end of file
<div class="contextual">
<%= link_to l(:label_tracker_new), {:action => 'new'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_tracker_plural)%></h2>
<table class="listTableContent">
......@@ -16,7 +20,4 @@
<% end %>
</table>
<%= pagination_links_full @tracker_pages %>
<br />
<%= link_to '&#187; ' + l(:label_tracker_new), :action => 'new' %>
<%= pagination_links_full @tracker_pages %>
\ No newline at end of file
<div class="contextual">
<%= link_to l(:label_user_new), {:action => 'add'}, :class => 'pic picAdd' %>
</div>
<h2><%=l(:label_user_plural)%></h2>
<table class="listTableContent">
......@@ -39,8 +43,4 @@
<p><%= pagination_links_full @user_pages %>
[ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
</p>
<p>
<%= link_to '&#187; ' + l(:label_user_new), :action => 'add' %>
</p>
\ No newline at end of file
......@@ -7,6 +7,7 @@ http://redmine.org/
== xx/xx/2006 v0.x.x
* comments can now be added on news
* "my page" is now customizable
* improved issues change history
* new functionality: move an issue to another project or tracker
......
public/images/add.png

336 Bytes | W: | H:

public/images/add.png

289 Bytes | W: | H:

public/images/add.png
public/images/add.png
public/images/add.png
public/images/add.png
  • 2-up
  • Swipe
  • Onion skin
public/images/delete.png

320 Bytes | W: | H:

public/images/delete.png

397 Bytes | W: | H:

public/images/delete.png
public/images/delete.png
public/images/delete.png
public/images/delete.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -128,6 +128,14 @@ background-color: #80b0da;
.picLogout { background: url(../images/logout.png) no-repeat 4px 50%; }
.picHelp { background: url(../images/help.png) no-repeat 4px 50%; }
.picEdit { background: url(../images/edit_small.png) no-repeat 4px 50%; }
.picDelete { background: url(../images/delete.png) no-repeat 4px 50%; }
.picAdd { background: url(../images/add.png) no-repeat 4px 50%; }
.picMove { background: url(../images/move.png) no-repeat 4px 50%; }
.picPdf { background: url(../images/pdf.png) no-repeat 4px 50%;}
.picCsv { background: url(../images/csv.png) no-repeat 4px 50%;}
.pic { padding-left: 18px; margin-left: 3px; }
/**************** Content styles ****************/
html>body #content {
......@@ -247,7 +255,7 @@ legend {
table.listTableContent {
border:1px solid #578bb8;
width:99%;
width:100%;
border-collapse: collapse;
}
......@@ -458,6 +466,14 @@ img.calendar-trigger {
margin-left: 34px;
}
/***** Contextual links div *****/
.contextual {
float: right;
font-size: 0.8em;
}
/***** CSS FORM ******/
.tabular p{
margin: 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment