diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-22 13:17:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-22 13:17:49 +0000 |
commit | 827e998afef3a3b6eded98c9b3af1023e54fccb5 (patch) | |
tree | ec61e0b48f850b620454f95904781aeb1b0c4845 /app/views/issues | |
parent | 43f583d33243b825ef493d2bebb200660835af48 (diff) | |
download | redmine-827e998afef3a3b6eded98c9b3af1023e54fccb5.tar.gz redmine-827e998afef3a3b6eded98c9b3af1023e54fccb5.zip |
Application layout refactored.
The project menu is now the main menu.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@747 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_list_simple.rhtml | 2 | ||||
-rw-r--r-- | app/views/issues/_relations.rhtml | 21 | ||||
-rw-r--r-- | app/views/issues/_sidebar.rhtml | 18 | ||||
-rw-r--r-- | app/views/issues/edit.rhtml | 2 | ||||
-rw-r--r-- | app/views/issues/index.rhtml | 2 | ||||
-rw-r--r-- | app/views/issues/show.rhtml | 52 |
6 files changed, 65 insertions, 32 deletions
diff --git a/app/views/issues/_list_simple.rhtml b/app/views/issues/_list_simple.rhtml index 4e50b91f8..0e3c39bbf 100644 --- a/app/views/issues/_list_simple.rhtml +++ b/app/views/issues/_list_simple.rhtml @@ -11,7 +11,7 @@ <th align="center"> <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %> </th> - <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br /> + <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br /> <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td> <td> <p class="small"><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></p> diff --git a/app/views/issues/_relations.rhtml b/app/views/issues/_relations.rhtml index 2a45ba473..d4b3e5aa6 100644 --- a/app/views/issues/_relations.rhtml +++ b/app/views/issues/_relations.rhtml @@ -1,11 +1,18 @@ -<h3><%=l(:label_related_issues)%></h3> +<div class="contextual"> +<% if authorize_for('issue_relations', 'new') %> + <%= toggle_link l(:button_add), 'new-relation-form'%> +<% end %> +</div> + +<p><strong><%=l(:label_related_issues)%></strong></p> +<% if @issue.relations.any? %> <table style="width:100%"> <% @issue.relations.each do |relation| %> <tr> <td><%= l(relation.label_for(@issue)) %> <%= "(#{lwr(:actionview_datehelper_time_in_words_day, relation.delay)})" if relation.delay && relation.delay != 0 %> <%= link_to_issue relation.other_issue(@issue) %></td> <td><%=h relation.other_issue(@issue).subject %></td> -<td><div class="square" style="background:#<%= relation.other_issue(@issue).status.html_color %>;"></div> <%= relation.other_issue(@issue).status.name %></td> +<td><%= relation.other_issue(@issue).status.name %></td> <td><%= format_date(relation.other_issue(@issue).start_date) %></td> <td><%= format_date(relation.other_issue(@issue).due_date) %></td> <td><%= link_to_remote(image_tag('delete.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation}, @@ -14,9 +21,11 @@ </tr> <% end %> </table> +<% end %> -<% if authorize_for('issue_relations', 'new') %> - <% remote_form_for(:relation, @relation, :url => {:controller => 'issue_relations', :action => 'new', :issue_id => @issue}, :method => :post) do |f| %> - <%= render :partial => 'issue_relations/form', :locals => {:f => f}%> - <% end %> +<% remote_form_for(:relation, @relation, + :url => {:controller => 'issue_relations', :action => 'new', :issue_id => @issue}, + :method => :post, + :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %> +<%= render :partial => 'issue_relations/form', :locals => {:f => f}%> <% end %> diff --git a/app/views/issues/_sidebar.rhtml b/app/views/issues/_sidebar.rhtml new file mode 100644 index 000000000..b171dbd0b --- /dev/null +++ b/app/views/issues/_sidebar.rhtml @@ -0,0 +1,18 @@ +<% if authorize_for('projects', 'add_issue') %> +<h3><%= l(:label_issue_new) %></h3> +<%= l(:label_tracker) %>: <%= new_issue_selector %> +<% end %> + +<h3><%= l(:label_issue_plural) %></h3> +<%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %><br /> +<%= link_to l(:field_summary), :controller => 'reports', :action => 'issue_report', :id => @project %><br /> +<%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %> + +<h3><%= l(:label_query_plural) %></h3> + +<% queries = @project.queries.find(:all, + :order => "name ASC", + :conditions => ["is_public = ? or user_id = ?", true, (User.current.logged? ? User.current.id : 0)]) + queries.each do |query| %> +<%= link_to query.name, :controller => 'projects', :action => 'list_issues', :id => @project, :query_id => query %><br /> +<% end %> diff --git a/app/views/issues/edit.rhtml b/app/views/issues/edit.rhtml index 53ffd7f6c..b1f63d1f5 100644 --- a/app/views/issues/edit.rhtml +++ b/app/views/issues/edit.rhtml @@ -1,4 +1,4 @@ -<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2> +<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2> <% labelled_tabular_form_for :issue, @issue, :url => {:action => 'edit'} do |f| %> <%= error_messages_for 'issue' %> diff --git a/app/views/issues/index.rhtml b/app/views/issues/index.rhtml index cd7ace561..270f9b215 100644 --- a/app/views/issues/index.rhtml +++ b/app/views/issues/index.rhtml @@ -40,7 +40,7 @@ <td align="center" valign="top"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td> <td align="center" valign="top" nowrap><%=h issue.project.name %></td> <td align="center" valign="top" nowrap><%= issue.tracker.name %></td> - <td valign="top"nowrap><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td> + <td valign="top"nowrap><%= issue.status.name %></td> <td align="center" valign="top"><%= issue.priority.name %></td> <td><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td> <td align="center" valign="top" nowrap><%= issue.assigned_to.name if issue.assigned_to %></td> diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 865810f42..de9e38bb9 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -1,4 +1,5 @@ <div class="contextual"> +<%= show_and_goto_link(l(:label_add_note), 'add-note', :class => 'icon icon-note') if authorize_for('issues', 'add_note') %> <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %> <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %> <%= watcher_tag(@issue, User.current) %> @@ -6,12 +7,15 @@ <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> </div> -<h2><%= @issue.tracker.name %> #<%= @issue.id %>: <%=h @issue.subject %></h2> +<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2> + +<div class="issue"> + <h3><%=h @issue.subject %></h3> <p class="author"> <%= authoring @issue.created_on, @issue.author %>. <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) if @issue.created_on != @issue.updated_on %>. </p> -<div class="box"> + <table width="100%"> <tr> <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td> @@ -58,45 +62,42 @@ end %> </div> <% end %> -<b><%=l(:field_description)%> :</b><br /><br /> +<p><b><%=l(:field_description)%></b></p> <%= textilizable @issue.description, :attachments => @issue.attachments %> -<div class="contextual"> -</div> - -<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %> - <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %> - <%=l(:label_change_status)%> : - <select name="new_status_id"> - <%= options_from_collection_for_select @status_options, "id", "name" %> - </select> - <%= submit_tag l(:button_change) %> - <% end %> -<% end %> -</div> - <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %> -<div id="relations" class="box"> +<hr /> +<div id="relations"> <%= render :partial => 'relations' %> </div> <% end %> <% if @issue.attachments.any? %> -<div class="box"> -<h3><%=l(:label_attachment_plural)%></h3> <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %> +<% end %> + </div> + +<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %> + <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %> + <p><%=l(:label_change_status)%> : + <select name="new_status_id"> + <%= options_from_collection_for_select @status_options, "id", "name" %> + </select> + <%= submit_tag l(:button_change) %></p> + <% end %> <% end %> <% if @journals.any? %> -<div id="history" class="box"> +<div id="history"> <h3><%=l(:label_history)%></h3> <%= render :partial => 'history', :locals => { :journals => @journals } %> </div> <% end %> <% if authorize_for('issues', 'add_note') %> - <div class="box"> + <a name="add-note-anchor"></a> + <div id="add-note" class="box" style="display:none;"> <h3><%= l(:label_add_note) %></h3> <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular", :multipart => true) do %> <p><label for="notes"><%=l(:field_notes)%></label> @@ -104,6 +105,7 @@ end %> <%= wikitoolbar_for 'notes' %> <%= render :partial => 'attachments/form' %> <%= submit_tag l(:button_add) %> + <%= toggle_link l(:button_cancel), 'add-note' %> <% end %> </div> <% end %> @@ -113,4 +115,8 @@ end %> </div> -<% set_html_title "#{@issue.tracker.name} ##{@issue.id}" %> +<% set_html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> + +<% content_for :sidebar do %> + <%= render :partial => 'issues/sidebar' %> +<% end %> |