diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-16 12:15:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-16 12:15:31 +0000 |
commit | 236c735d08c097cfe1a7e5f5c52a9dd6711250aa (patch) | |
tree | d819b1a914651602c965cc32f0ce04dd90fdd052 | |
parent | e5562afcd30998c0ed3d5b40c0a9c1cb3367518d (diff) | |
download | redmine-236c735d08c097cfe1a7e5f5c52a9dd6711250aa.tar.gz redmine-236c735d08c097cfe1a7e5f5c52a9dd6711250aa.zip |
contextual links redesign
git-svn-id: http://redmine.rubyforge.org/svn/trunk@93 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/admin/projects.rhtml | 8 | ||||
-rw-r--r-- | app/views/auth_sources/list.rhtml | 7 | ||||
-rw-r--r-- | app/views/documents/show.rhtml | 28 | ||||
-rw-r--r-- | app/views/issue_statuses/list.rhtml | 9 | ||||
-rw-r--r-- | app/views/issues/show.rhtml | 41 | ||||
-rw-r--r-- | app/views/news/show.rhtml | 28 | ||||
-rw-r--r-- | app/views/projects/gantt.rhtml | 10 | ||||
-rw-r--r-- | app/views/projects/list_documents.rhtml | 10 | ||||
-rw-r--r-- | app/views/projects/list_files.rhtml | 19 | ||||
-rw-r--r-- | app/views/projects/list_issues.rhtml | 13 | ||||
-rw-r--r-- | app/views/projects/list_news.rhtml | 7 | ||||
-rw-r--r-- | app/views/roles/list.rhtml | 9 | ||||
-rw-r--r-- | app/views/trackers/list.rhtml | 9 | ||||
-rw-r--r-- | app/views/users/list.rhtml | 8 | ||||
-rw-r--r-- | doc/CHANGELOG | 1 | ||||
-rw-r--r-- | public/images/add.png | bin | 336 -> 289 bytes | |||
-rw-r--r-- | public/images/csv.png | bin | 0 -> 955 bytes | |||
-rw-r--r-- | public/images/delete.png | bin | 320 -> 397 bytes | |||
-rw-r--r-- | public/images/move.png | bin | 0 -> 187 bytes | |||
-rw-r--r-- | public/images/pdf.png | bin | 0 -> 182 bytes | |||
-rw-r--r-- | public/stylesheets/application.css | 18 |
21 files changed, 104 insertions, 121 deletions
diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml index 39e4d9bf7..0772c4e8b 100644 --- a/app/views/admin/projects.rhtml +++ b/app/views/admin/projects.rhtml @@ -1,3 +1,7 @@ +<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 ('» ' + 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 diff --git a/app/views/auth_sources/list.rhtml b/app/views/auth_sources/list.rhtml index 47cbeeaff..149a1313a 100644 --- a/app/views/auth_sources/list.rhtml +++ b/app/views/auth_sources/list.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_auth_source_new), :action => 'new' %> - diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml index 2f021e1b8..a24591ad0 100644 --- a/app/views/documents/show.rhtml +++ b/app/views/documents/show.rhtml @@ -1,34 +1,22 @@ +<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 /> diff --git a/app/views/issue_statuses/list.rhtml b/app/views/issue_statuses/list.rhtml index 023863437..116376b70 100644 --- a/app/views/issue_statuses/list.rhtml +++ b/app/views/issue_statuses/list.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_issue_status_new), :action => 'new' %> +<%= pagination_links_full @issue_status_pages %>
\ No newline at end of file diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 81e4b9668..f01612aec 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -1,10 +1,8 @@ -<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
-<div class="topright">
-<small>
-<%= l(:label_export_to) %>
-<%= 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 %>
-
-<% 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 %>
-
<% 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 %>
-
-<% 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 %>
-
-<% end %>
-</div>
-<div class="clear"></div>
</div>
<div id="history" class="box">
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml index 890184b1a..e5f199fa2 100644 --- a/app/views/news/show.rhtml +++ b/app/views/news/show.rhtml @@ -1,29 +1,25 @@ +<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>
diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml index b03675795..206186f08 100644 --- a/app/views/projects/gantt.rhtml +++ b/app/views/projects/gantt.rhtml @@ -1,10 +1,10 @@ -<h2><%= l(:label_gantt) %></h2>
-<div class="topright">
-<small>
-<%= l(:label_export_to) %> <%= 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">
diff --git a/app/views/projects/list_documents.rhtml b/app/views/projects/list_documents.rhtml index e6cf2b828..0b630e922 100644 --- a/app/views/projects/list_documents.rhtml +++ b/app/views/projects/list_documents.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_document_new), :controller => 'projects', :action => 'add_document', :id => @project %> -</p>
+<% end %>
\ No newline at end of file diff --git a/app/views/projects/list_files.rhtml b/app/views/projects/list_files.rhtml index 5fe65e6a6..881829a44 100644 --- a/app/views/projects/list_files.rhtml +++ b/app/views/projects/list_files.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_attachment_new), :controller => 'projects', :action => 'add_file', :id => @project %> -</p>
-
-
+</table>
\ No newline at end of file diff --git a/app/views/projects/list_issues.rhtml b/app/views/projects/list_issues.rhtml index e7e3ceeda..e4b763887 100644 --- a/app/views/projects/list_issues.rhtml +++ b/app/views/projects/list_issues.rhtml @@ -1,12 +1,11 @@ -<h2><%=l(:label_issue_plural)%></h2>
-<div class="topright">
-<small>
-<%= l(:label_export_to) %>
-<%= 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>
diff --git a/app/views/projects/list_news.rhtml b/app/views/projects/list_news.rhtml index 59b737fc5..1427c07be 100644 --- a/app/views/projects/list_news.rhtml +++ b/app/views/projects/list_news.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_news_new), :controller => 'projects', :action => 'add_news', :id => @project %> -</p>
diff --git a/app/views/roles/list.rhtml b/app/views/roles/list.rhtml index 169b3d1c0..9ef566892 100644 --- a/app/views/roles/list.rhtml +++ b/app/views/roles/list.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_role_new), :action => 'new' %> +<%= pagination_links_full @role_pages %>
\ No newline at end of file diff --git a/app/views/trackers/list.rhtml b/app/views/trackers/list.rhtml index 8d4a5c595..0e8e5c330 100644 --- a/app/views/trackers/list.rhtml +++ b/app/views/trackers/list.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_tracker_new), :action => 'new' %> +<%= pagination_links_full @tracker_pages %>
\ No newline at end of file diff --git a/app/views/users/list.rhtml b/app/views/users/list.rhtml index 9f4438138..9dc8eb34c 100644 --- a/app/views/users/list.rhtml +++ b/app/views/users/list.rhtml @@ -1,3 +1,7 @@ +<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 '» ' + l(:label_user_new), :action => 'add' %> </p>
\ No newline at end of file diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 145d848c0..ce9d933ac 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -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
diff --git a/public/images/add.png b/public/images/add.png Binary files differindex 90032e9d8..6541a6814 100644 --- a/public/images/add.png +++ b/public/images/add.png diff --git a/public/images/csv.png b/public/images/csv.png Binary files differnew file mode 100644 index 000000000..deb4a9f65 --- /dev/null +++ b/public/images/csv.png diff --git a/public/images/delete.png b/public/images/delete.png Binary files differindex 2ed33bdf3..5f2cee539 100644 --- a/public/images/delete.png +++ b/public/images/delete.png diff --git a/public/images/move.png b/public/images/move.png Binary files differnew file mode 100644 index 000000000..ee6e9486b --- /dev/null +++ b/public/images/move.png diff --git a/public/images/pdf.png b/public/images/pdf.png Binary files differnew file mode 100644 index 000000000..8c2a80aaf --- /dev/null +++ b/public/images/pdf.png diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9b0927a39..68d8a377a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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;
|