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 | |
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')
50 files changed, 452 insertions, 375 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 958c35d9a..d4b8e5dd6 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -84,6 +84,7 @@ class ProjectsController < ApplicationController @trackers = Tracker.find(:all, :order => 'position') @open_issues_by_tracker = Issue.count(:group => :tracker, :joins => "INNER JOIN #{IssueStatus.table_name} ON #{IssueStatus.table_name}.id = #{Issue.table_name}.status_id", :conditions => ["project_id=? and #{IssueStatus.table_name}.is_closed=?", @project.id, false]) @total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id]) + @total_hours = @project.time_entries.sum(:hours) @key = User.current.rss_key end @@ -254,6 +255,7 @@ class ProjectsController < ApplicationController :limit => @issue_pages.items_per_page, :offset => @issue_pages.current.offset end + render :layout => false if request.xhr? end diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index fdbcc5a53..6b95944a0 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -72,7 +72,7 @@ class ReportsController < ApplicationController issues_by_category issues_by_author issues_by_subproject - @total_hours = @project.time_entries.sum(:hours) + render :template => "reports/issue_report" end end diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 24c7a3ffe..a8f21ff65 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -88,6 +88,7 @@ class RolesController < ApplicationController } if @role.save flash[:notice] = l(:notice_successful_update) + redirect_to :action => 'workflow', :role_id => @role, :tracker_id => @tracker end end @roles = Role.find(:all, :order => 'builtin, position') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 038d051ee..e52d1492e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -47,6 +47,14 @@ module ApplicationHelper link_to(name, "#", :onclick => onclick) end + def show_and_goto_link(name, id, options={}) + onclick = "Element.show('#{id}'); " + onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ") + onclick << "location.href='##{id}-anchor'; " + onclick << "return false;" + link_to(name, "#", options.merge(:onclick => onclick)) + end + def image_to_function(name, function, html_options = {}) html_options.symbolize_keys! tag(:input, html_options.merge({ @@ -287,6 +295,16 @@ module ApplicationHelper return '' unless Setting.text_formatting == 'textile' javascript_include_tag('jstoolbar') + javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.draw();") end + + def content_for(name, content = nil, &block) + @has_content ||= {} + @has_content[name] = true + super(name, content, &block) + end + + def has_content?(name) + (@has_content && @has_content[name]) || false + end end class TabularFormBuilder < ActionView::Helpers::FormBuilder diff --git a/app/views/account/login.rhtml b/app/views/account/login.rhtml index 08d462c61..5bfbfb8d6 100644 --- a/app/views/account/login.rhtml +++ b/app/views/account/login.rhtml @@ -1,28 +1,33 @@ -<center> -<div class="box login"> -<h2 class="icon22 icon22-authent"><%=l(:label_please_login)%></h2> - -<% form_tag({:action=> "login"}, :class => "tabular") do %> - -<p><label for="login"><%=l(:field_login)%>:</label> -<%= text_field_tag 'login', nil, :size => 25 %></p> - -<p><label for="password"><%=l(:field_password)%>:</label> -<%= password_field_tag 'password', nil, :size => 25 %></p> - -<% if Setting.autologin? %> -<p><label for="autologin"><%= check_box_tag 'autologin' %> <%= l(:label_stay_logged_in) %></label></p> -<% end %> - -<p><input type="submit" name="login" value="<%=l(:button_login)%> »" class="primary" /></p> -<% end %> +<div id="login-form"> +<% form_tag({:action=> "login"}) do %> +<table> +<tr> + <td align="right"><label for="login"><%=l(:field_login)%>:</label></td> + <td align="left"><p><%= text_field_tag 'login', nil, :size => 40 %></p></td> +</tr> +<tr> + <td align="right"><label for="password"><%=l(:field_password)%>:</label></td> + <td align="left"><%= password_field_tag 'password', nil, :size => 40 %></td> +</tr> +<tr> + <td></td> + <td align="left"> + <% if Setting.autologin? %> + <label for="autologin"><%= check_box_tag 'autologin' %> <%= l(:label_stay_logged_in) %></label> + <% end %> + </td> +</tr> +<tr> + <td align="left"> + <% if Setting.lost_password? %> + <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %> + <% end %> + </td> + <td align="right"> + <input type="submit" name="login" value="<%=l(:button_login)%> »" /> + </td> +</tr> +</table> <%= javascript_tag "Form.Element.focus('login');" %> - -<% links = [] - links << link_to(l(:label_register), :action => 'register') if Setting.self_registration? - links << link_to(l(:label_password_lost), :action => 'lost_password') if Setting.lost_password? -%> -<%= links.join(" | ") %> - +<% end %> </div> -</center>
\ No newline at end of file diff --git a/app/views/account/lost_password.rhtml b/app/views/account/lost_password.rhtml index b27123a6e..420e8f9b1 100644 --- a/app/views/account/lost_password.rhtml +++ b/app/views/account/lost_password.rhtml @@ -1,14 +1,11 @@ -<center> -<div class="box login"> <h2><%=l(:label_password_lost)%></h2> +<div class="box"> <% form_tag({:action=> "lost_password"}, :class => "tabular") do %> <p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label> -<%= text_field_tag 'mail', nil, :size => 40 %></p> - -<p><center><%= submit_tag l(:button_submit) %></center></p> +<%= text_field_tag 'mail', nil, :size => 40 %> +<%= submit_tag l(:button_submit) %></p> <% end %> </div> -</center>
\ No newline at end of file diff --git a/app/views/account/password_recovery.rhtml b/app/views/account/password_recovery.rhtml index c3c451e57..439ab11b5 100644 --- a/app/views/account/password_recovery.rhtml +++ b/app/views/account/password_recovery.rhtml @@ -1,22 +1,15 @@ -<center> -<div class="box login"> <h2><%=l(:label_password_lost)%></h2> -<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br /> - <%= error_messages_for 'user' %> - <% form_tag({:token => @token.value}, :class => "tabular") do %> - - <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label> - <%= password_field_tag 'new_password', nil, :size => 25 %><br /> - <em><%= l(:text_length_between, 4, 12) %></em></p> - - <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label> - <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p> +<% form_tag({:token => @token.value}) do %> +<div class="box tabular"> +<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label> +<%= password_field_tag 'new_password', nil, :size => 25 %><br /> +<em><%= l(:text_length_between, 4, 12) %></em></p> - <p><center><%= submit_tag l(:button_save) %></center></p> - <% end %> - +<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label> +<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p> </div> -</center>
\ No newline at end of file +<p><%= submit_tag l(:button_save) %></p> +<% end %> diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml index c31ec67e9..cdb9e772d 100644 --- a/app/views/boards/show.rhtml +++ b/app/views/boards/show.rhtml @@ -5,6 +5,7 @@ <h2><%=h @board.name %></h2> +<% if @topics.any? %> <table class="list"> <thead><tr> <th><%= l(:field_subject) %></th> @@ -32,6 +33,8 @@ <% end %> </tbody> </table> - <p><%= pagination_links_full @topic_pages %> [ <%= @topic_pages.current.first_item %> - <%= @topic_pages.current.last_item %> / <%= @topic_count %> ]</p> +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> diff --git a/app/views/issue_relations/_form.rhtml b/app/views/issue_relations/_form.rhtml index 8b514dc1a..0de386306 100644 --- a/app/views/issue_relations/_form.rhtml +++ b/app/views/issue_relations/_form.rhtml @@ -5,6 +5,8 @@ <span id="predecessor_fields" style="display:none;"> <%= l(:field_delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %> </span> -<%= submit_tag l(:button_add) %></p> +<%= submit_tag l(:button_add) %> +<%= toggle_link l(:button_cancel), 'new-relation-form'%> +</p> <%= javascript_tag "setPredecessorFieldsVisibility();" %> diff --git a/app/views/issue_statuses/list.rhtml b/app/views/issue_statuses/list.rhtml index 91a655094..aaeec559a 100644 --- a/app/views/issue_statuses/list.rhtml +++ b/app/views/issue_statuses/list.rhtml @@ -15,7 +15,7 @@ <tbody> <% for status in @issue_statuses %> <tr class="<%= cycle("odd", "even") %>"> - <td><div class="square" style="background:#<%= status.html_color %>;"></div> <%= link_to status.name, :action => 'edit', :id => status %></td> + <td><%= link_to status.name, :action => 'edit', :id => status %></td> <td align="center"><%= image_tag 'true.png' if status.is_default? %></td> <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td> <td align="center" style="width:15%;"> 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 %> diff --git a/app/views/layouts/_project_selector.rhtml b/app/views/layouts/_project_selector.rhtml new file mode 100644 index 000000000..499879c8c --- /dev/null +++ b/app/views/layouts/_project_selector.rhtml @@ -0,0 +1,12 @@ +<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %> +<select onchange="if (this.value != '') { window.location = this.value; }"> +<option selected><%= l(:label_jump_to_a_project) %></option> +<option disabled>---</option> +<% user_projects_by_root.keys.sort.each do |root| %> + <%= content_tag('option', root.name, :value => url_for(:controller => 'projects', :action => 'show', :id => root)) %> + <% user_projects_by_root[root].sort.each do |project| %> + <% next if project == root %> + <%= content_tag('option', ('» ' + project.name), :value => url_for(:controller => 'projects', :action => 'show', :id => project)) %> + <% end %> +<% end %> +</select> diff --git a/app/views/layouts/_projects_menu.rhtml b/app/views/layouts/_projects_menu.rhtml deleted file mode 100644 index 3204d5fbc..000000000 --- a/app/views/layouts/_projects_menu.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -<div id="menuAllProjects" class="menu" onmouseover="menuMouseover(event)"> - <%= link_to l(:label_project_all), {:controller => 'projects' }, :class => "menuItem" %> - - <% user_projects_by_root = User.current.projects.find(:all, :include => :parent, :limit => 20).group_by(&:root) %> - <% user_projects_by_root.keys.sort.each do |root| %> - <%= link_to root.name, {:controller => 'projects', :action => 'show', :id => root}, :class => "menuItem" %> - <% user_projects_by_root[root].sort.each do |project| %> - <% next if project == root %> - <%= link_to(('» ' + project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "menuItem") %> - <% end %> - <% end %> -</div> diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 1371d784d..12265d7ce 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -5,97 +5,76 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="<%= Redmine::Info.app_name %>" /> <meta name="keywords" content="issue,bug,tracker" /> -<!--[if IE]> - <style type="text/css"> - body {behavior: url(<%= stylesheet_path "csshover.htc" %>);} - </style> -<![endif]--> <%= stylesheet_link_tag "application" %> <%= stylesheet_link_tag "print", :media => "print" %> <%= javascript_include_tag :defaults %> -<%= javascript_include_tag 'menu' %> <%= stylesheet_link_tag 'jstoolbar' %> +<!--[if IE]> + <style type="text/css"> + * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); } + body {behavior: url(<%= stylesheet_path "csshover.htc" %>);} + </style> +<![endif]--> + <!-- page specific tags --><%= yield :header_tags %> </head> - <body> -<div id="container" > - - <div id="header"> - <div style="float: left;"> - <h1><%= Setting.app_title %></h1> - <h2><%= Setting.app_subtitle %></h2> - </div> - <div style="float: right; padding-right: 1em; padding-top: 0.2em;"> - <% if User.current.logged? %><small><%=l(:label_logged_as)%> <strong><%= User.current.login %></strong> -</small><% end %> - <small><%= toggle_link l(:label_search), 'quick-search-form', :focus => 'quick-search-input' %></small> - <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get, :id => 'quick-search-form', :style => "display:none;" ) do %> - <%= text_field_tag 'q', @question, :size => 15, :class => 'small', :id => 'quick-search-input' %> - <% end %> +<div id="top-menu"> + <div id="account"> + <% if User.current.logged? %> + <%=l(:label_logged_as)%> <%= User.current.login %> - + <%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' } %> + <%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' } %> + <% else %> + <%= link_to l(:label_login), { :controller => 'account', :action => 'login' } %> + <%= link_to(l(:label_register), :controller => 'account',:action => 'register') if Setting.self_registration? %> + <% end %> </div> + <%= link_to l(:label_home), { :controller => 'welcome' } %> + <%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'} if User.current.logged? %> + <%= link_to l(:label_project_plural), { :controller => 'projects' } %> + <%= link_to l(:label_administration), { :controller => 'admin' } if User.current.admin? %> +</div> + +<div id="header"> + <div id="quick-search"> + <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> + <%= link_to l(:label_search), :controller => 'search', :action => 'index', :id => @project %>: <%= text_field_tag 'q', @question, :size => 20, :class => 'small' %> + <% end %> + <%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %> </div> - - <div id="navigation"> - <ul> - <li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li> - <li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li> - - <% if User.current.memberships.any? %> - <li class="submenu"><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuAllProjects');" %></li> - <% else %> - <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> - <% end %> - - <% if User.current.logged? %> - <li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "icon icon-user" %></li> - <% end %> - - <% if User.current.admin? %> - <li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "icon icon-admin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li> - <% end %> - - <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :onclick => "window.open(this.href); return false;", :class => "icon icon-help" %></li> - - <% if User.current.logged? %> - <li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "icon icon-user" %></li> - <% else %> - <li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "icon icon-user" %></li> - <% end %> - </ul> - </div> - - <%= render(:partial => 'admin/menu') if User.current.admin? %> - <%= render(:partial => 'layouts/projects_menu') if User.current.memberships.any? %> - - <div id="subcontent"> - <% if @project && !@project.new_record? %> - <h2><%= @project.name %></h2> - <ul class="menublock"> + + <h1><%= h(@project ? @project.name : Setting.app_title) %></h1> + + <div id="main-menu"> + <ul> <% Redmine::MenuManager.allowed_items(:project_menu, User.current, @project).each do |item| %> <% unless item.condition && !item.condition.call(@project) %> <li><%= link_to l(item.name), {item.param => @project}.merge(item.url) %></li> <% end %> - <% end %> - </ul> - <% end %> - </div> - - <div id="content"> - <div id="flash"> - <%= content_tag('div', flash[:error], :class => 'error') if flash[:error] %> - <%= content_tag('div', flash[:notice], :class => 'notice') if flash[:notice] %> - </div> - <%= yield %> - </div> - - <div id="ajax-indicator" style="display:none;"> - <span><%= l(:label_loading) %></span> - </div> + <% end if @project && !@project.new_record? %> + </ul> + </div> +</div> - <div id="footer"> - <p><%= link_to Redmine::Info.app_name, Redmine::Info.url %> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p> - </div> +<%= tag('div', {:id => 'main', :class => (has_content?(:sidebar) ? '' : 'nosidebar')}, true) %> + <div id="sidebar"> + <%= yield :sidebar %> + </div> + + <div id="content"> + <div id="flash"> + <%= content_tag('div', flash[:error], :class => 'error') if flash[:error] %> + <%= content_tag('div', flash[:notice], :class => 'notice') if flash[:notice] %> + </div> + <%= yield %> + </div> +</div> +<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> + +<div id="footer"> + <%= link_to Redmine::Info.app_name, Redmine::Info.url %> <%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang </div> </body> </html> diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml index c884de841..8250c5298 100644 --- a/app/views/my/account.rhtml +++ b/app/views/my/account.rhtml @@ -1,13 +1,5 @@ <h2><%=l(:label_my_account)%></h2> -<p><%=l(:field_login)%>: <strong><%= @user.login %></strong> -<br /><%=l(:field_created_on)%>: <%= format_time(@user.created_on) %> -<% if @user.rss_token %> -<br /><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %> -(<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>) -<% end %> -</p> - <%= error_messages_for 'user' %> <div class="box"> @@ -50,3 +42,14 @@ <% end %> </div> <% end %> + +<% content_for :sidebar do %> + <h3><%=l(:label_my_account)%></h3> + + <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br /> + <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p> + <% if @user.rss_token %> + <p><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %> + (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)</p> + <% end %> +<% end %> diff --git a/app/views/my/blocks/_calendar.rhtml b/app/views/my/blocks/_calendar.rhtml index fa83b4d1d..a2d556d90 100644 --- a/app/views/my/blocks/_calendar.rhtml +++ b/app/views/my/blocks/_calendar.rhtml @@ -9,9 +9,9 @@ @issues ||= [] %> -<table class="list with-cells"> +<table class="cal"> <thead><tr> -<th></th> +<td></td> <% 1.upto(7) do |d| %> <th align="center" width="14%"><%= day_name(d) %></th> <% end %> diff --git a/app/views/news/_news.rhtml b/app/views/news/_news.rhtml index 17a410102..e48b81ac3 100644 --- a/app/views/news/_news.rhtml +++ b/app/views/news/_news.rhtml @@ -1,5 +1,6 @@ <p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %> -<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %><br /> -<% unless news.summary.blank? %><%=h news.summary %><br /><% end %> -<span class="author"><%= authoring news.created_on, news.author %> -<%= "<br />#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase}" if news.comments_count > 0 %></span></p> +<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %> +<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></span> +<br /> +<% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %> +<span class="author"><%= authoring news.created_on, news.author %></p> diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index fd731cd8f..b4c1d9ae8 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -1,19 +1,5 @@ <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> -<div> -<div class="rightbox"> -<% form_tag do %> -<p><%= select_month(@month, :prefix => "month", :discard_type => true) %> -<%= select_year(@year, :prefix => "year", :discard_type => true) %></p> - -<p><% @event_types.each do |t| %> -<%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%><br /> -<% end %></p> - -<p class="textcenter"><%= submit_tag l(:button_apply), :class => 'button-small' %></p> -<% end %> -</div> - <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> <h3><%= day_name(day.cwday) %> <%= day.day %></h3> <ul> @@ -51,7 +37,10 @@ <% end %> </ul> <% end %> -<% if @events_by_day.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> + +<% if @events_by_day.empty? %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> <div style="float:left;"> <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %> @@ -65,8 +54,17 @@ </div> <br /> -</div> <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %> <% end %> + +<% content_for :sidebar do %> +<% form_tag do %> +<h3><%= l(:label_activity) %></h3> +<p><% @event_types.each do |t| %> +<%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%><br /> +<% end %></p> +<p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> +<% end %> +<% end %> diff --git a/app/views/projects/add_issue.rhtml b/app/views/projects/add_issue.rhtml index e19d00826..0076d61b7 100644 --- a/app/views/projects/add_issue.rhtml +++ b/app/views/projects/add_issue.rhtml @@ -23,7 +23,7 @@ <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p> </div> -<div class="clear"> +<div style="clear: left;"> <p><%= f.text_field :subject, :size => 80, :required => true %></p> <p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true, :class => 'wiki-edit' %></p> @@ -36,7 +36,6 @@ <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> <%= image_to_function "add.png", "addFileField();return false" %></label> <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p> - </div> <!--[eoform:issue]--> </div> diff --git a/app/views/projects/calendar.rhtml b/app/views/projects/calendar.rhtml index 6fb8a1365..b09d059a9 100644 --- a/app/views/projects/calendar.rhtml +++ b/app/views/projects/calendar.rhtml @@ -1,49 +1,24 @@ <% cache(:year => @year, :month => @month, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %> -<h2><%= l(:label_calendar) %></h2> +<h2><%= l(:label_calendar) %>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> -<% form_tag do %> <table width="100%"> -<tr> -<td align="left" style="width:15%"> +<tr><td align="left"> <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} %> -</td> -<td align="center" style="width:55%"> - <%= select_month(@month, :prefix => "month", :discard_type => true) %> - <%= select_year(@year, :prefix => "year", :discard_type => true) %> - <%= submit_tag l(:button_submit), :class => "button-small" %> -</td> -<td align="left" style="width:15%"> - <%= toggle_link l(:label_options), "trackerselect" %> - <div id="trackerselect" class="rightbox overlay" style="width:140px; display:none;"> - <p><strong><%=l(:label_tracker_plural)%></strong></p> - <% @trackers.each do |tracker| %> - <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> - <%= tracker.name %><br /> - <% end %> - <% if @project.active_children.any? %> - <p><strong><%=l(:label_subproject_plural)%></strong></p> - <%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%= l(:general_text_Yes) %> - <% end %> - <p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> - </div> -</td> -<td align="right" style="width:15%"> +</td><td align="right"> <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} - %> -</td> -</tr> + %> +</td></tr> </table> -<% end %> -<table class="list with-cells"> +<table class="cal"> <thead> <tr> -<th></th> +<td></td> <% 1.upto(7) do |d| %> <th style="width:14%"><%= day_name(d) %></th> <% end %> @@ -56,7 +31,7 @@ while day <= @date_to if day.cwday == 1 %> <th><%= day.cweek %></th> <% end %> - <td valign="top" class="<%= day.month==@month ? "even" : "odd" %>" style="width:14%; <%= Date.today == day ? 'background:#FDFED0;' : '' %>"> + <td valign="top" class="<%= day.month==@month ? "even" : "odd" %> <%= Date.today == day ? 'today' : '' %>" style="width:14%;"> <p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> <% ((@ending_events_by_days[day] || []) + (@starting_events_by_days[day] || [])).uniq.each do |i| %> <% if i.is_a? Issue %> @@ -68,7 +43,11 @@ while day <= @date_to elsif day == i.due_date image_tag('arrow_to.png') end %> - <small><%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small> + <small> + <%= h("#{i.project.name} -") unless @project && @project == i.project %> + <%= link_to_issue i %>: + <%= h(truncate(i.subject, 30)) %> + </small> <span class="tip"> <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> </span> @@ -90,3 +69,20 @@ end %> <%= image_tag 'arrow_to.png' %> <%= l(:text_tip_task_end_day) %><br /> <%= image_tag 'arrow_bw.png' %> <%= l(:text_tip_task_begin_end_day) %><br /> <% end %> + +<% content_for :sidebar do %> + <h3><%= l(:label_calendar) %></h3> + + <% form_tag() do %> + <p><%= select_month(@month, :prefix => "month", :discard_type => true) %> + <%= select_year(@year, :prefix => "year", :discard_type => true) %></p> + + <% @trackers.each do |tracker| %> + <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %><br /> + <% end %> + <% if @project.active_children.any? %> + <br /><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%> + <% end %> + <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> + <% end %> +<% end %> diff --git a/app/views/projects/changelog.rhtml b/app/views/projects/changelog.rhtml index 91c5b84ec..61ca54a24 100644 --- a/app/views/projects/changelog.rhtml +++ b/app/views/projects/changelog.rhtml @@ -1,17 +1,8 @@ <h2><%=l(:label_change_log)%></h2> -<div class="rightbox" style="width:140px;"> -<% form_tag do %> -<p><strong><%=l(:label_tracker_plural)%></strong><br /> -<% @trackers.each do |tracker| %> - <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> - <%= tracker.name %><br /> -<% end %></p> -<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> +<% if @versions.empty? %> +<p class="nodata"><%= l(:label_no_data) %></p> <% end %> -</div> - -<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> <% @versions.each do |version| %> <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> @@ -33,3 +24,19 @@ </ul> <% end %> <% end %> + +<% content_for :sidebar do %> +<% form_tag do %> +<h3><%= l(:label_change_log) %></h3> +<% @trackers.each do |tracker| %> + <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> + <%= tracker.name %><br /> +<% end %> +<p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> +<% end %> + +<h3><%= l(:label_version_plural) %></h3> +<% @versions.each do |version| %> +<%= link_to version.name, :anchor => version.name %><br /> +<% end %> +<% end %> diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml index 1de8242ea..dbf95d345 100644 --- a/app/views/projects/gantt.rhtml +++ b/app/views/projects/gantt.rhtml @@ -23,14 +23,11 @@ t_height = g_height + headers_height %> <div class="contextual"> -<%= l(:label_export_to) %> -<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %> -<%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %> </div> <h2><%= l(:label_gantt) %></h2> -<% form_tag do %> +<% form_tag(params.merge(:month => nil, :year => nil, :years => nil)) do %> <table width="100%"> <tr> <td align="left"> @@ -41,21 +38,7 @@ t_height = g_height + headers_height <%= hidden_field_tag 'zoom', @zoom %> <%= submit_tag l(:button_submit), :class => "button-small" %> </td> -<td> - <%= toggle_link l(:label_options), "trackerselect" %> - <div id="trackerselect" class="rightbox overlay" style="width:140px; display: none;"> - <p><strong><%=l(:label_tracker_plural)%></strong></p> - <% @trackers.each do |tracker| %> - <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> - <%= tracker.name %><br /> - <% end %> - <% if @project.active_children.any? %> - <p><strong><%=l(:label_subproject_plural)%></strong></p> - <%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%= l(:general_text_Yes) %> - <% end %> - <p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> - </div> -</td> + <td align="right"> <%= if @zoom < 4 link_to image_tag('zoom_in.png'), {:zoom => (@zoom+1), :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects]} @@ -244,3 +227,21 @@ if Date.today >= @date_from and Date.today <= @date_to %> <td align="right"><%= link_to (l(:label_next) + ' »'), :year => (@date_from >> @months).year, :month => (@date_from >> @months).month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] %></td> </tr> </table> + +<div class="contextual"><%= l(:label_export_to) %> +<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %> +<%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %> +</div> + +<% content_for :sidebar do %> + <h3><%= l(:label_gantt) %></h3> + <% form_tag(params.merge(:tracker_ids => nil, :with_subprojects => nil)) do %> + <% @trackers.each do |tracker| %> + <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %><br /> + <% end %> + <% if @project.active_children.any? %> + <br /><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%> + <% end %> + <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> + <% end %> +<% end %> diff --git a/app/views/projects/list.rhtml b/app/views/projects/list.rhtml index 4474eef9f..51c1b544a 100644 --- a/app/views/projects/list.rhtml +++ b/app/views/projects/list.rhtml @@ -1,18 +1,15 @@ <h2><%=l(:label_project_plural)%></h2> -<dl class="projects"> <% @project_tree.keys.sort.each do |project| %> -<dt><%= link_to project.name, {:action => 'show', :id => project}, :class => (User.current.member_of?(project) ? "icon icon-fav" : "") %> -<dd><%= textilizable(project.description, :project => project) %> +<h3><%= link_to project.name, {:action => 'show', :id => project}, :class => (User.current.member_of?(project) ? "icon icon-fav" : "") %></h3> +<%= textilizable(project.description, :project => project) %> <% if @project_tree[project].any? %> - <%= l(:label_subproject_plural) %>: + <p><%= l(:label_subproject_plural) %>: <%= @project_tree[project].sort.collect {|subproject| - link_to(subproject.name, {:action => 'show', :id => subproject}, :class => (User.current.member_of?(subproject) ? "icon icon-fav" : ""))}.join(', ') %> + link_to(subproject.name, {:action => 'show', :id => subproject}, :class => (User.current.member_of?(subproject) ? "icon icon-fav" : ""))}.join(', ') %></p> <% end %> -</dd></dt> <% end %> -</dl> <% if User.current.logged? %> <div class="contextual"> diff --git a/app/views/projects/list_documents.rhtml b/app/views/projects/list_documents.rhtml index b692808b7..9575405f4 100644 --- a/app/views/projects/list_documents.rhtml +++ b/app/views/projects/list_documents.rhtml @@ -4,7 +4,9 @@ <h2><%=l(:label_document_plural)%></h2> -<% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> +<% if @documents.empty? %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> <% documents = @documents.group_by {|d| d.category } %> <% documents.each do |category, docs| %> diff --git a/app/views/projects/list_issues.rhtml b/app/views/projects/list_issues.rhtml index 8d6a91bcc..e17e8bc37 100644 --- a/app/views/projects/list_issues.rhtml +++ b/app/views/projects/list_issues.rhtml @@ -1,8 +1,4 @@ <% if @query.new_record? %> - <div class="contextual"> - <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %> - <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> - </div> <h2><%=l(:label_issue_plural)%></h2> <% set_html_title l(:label_issue_plural) %> @@ -33,17 +29,19 @@ <br /> <% else %> <div class="contextual"> - <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> | - <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %> - <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> - </div> + <% if @query.editable_by?(User.current) %> + <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %> + <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> + <% end %> + </div> + <h2><%= @query.name %></h2> <% set_html_title @query.name %> <% end %> <%= error_messages_for 'query' %> <% if @query.valid? %> <% if @issues.empty? %> -<p><i><%= l(:label_no_data) %></i></p> +<p class="nodata"><%= l(:label_no_data) %></p> <% else %> <% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %> @@ -64,7 +62,7 @@ <th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th> <td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td> <td align="center"><%= issue.tracker.name %></td> - <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td> + <td><%= issue.status.name %></td> <td align="center"><%= issue.priority.name %></td> <td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td> <td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td> @@ -85,3 +83,7 @@ <% end %> <% end %> <% end %> + +<% content_for :sidebar do %> + <%= render :partial => 'issues/sidebar' %> +<% end %> diff --git a/app/views/projects/list_news.rhtml b/app/views/projects/list_news.rhtml index 4ab086d55..82d63a280 100644 --- a/app/views/projects/list_news.rhtml +++ b/app/views/projects/list_news.rhtml @@ -4,7 +4,11 @@ <h2><%=l(:label_news_plural)%></h2> -<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> +<% if @news.empty? %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> + + <%= render :partial => 'news/news', :collection => @news %> <%= pagination_links_full @news_pages %> diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml index 1011bcbff..c370e5a9e 100644 --- a/app/views/projects/roadmap.rhtml +++ b/app/views/projects/roadmap.rhtml @@ -1,18 +1,8 @@ <h2><%=l(:label_roadmap)%></h2> -<div class="rightbox"> -<% form_tag do %> -<p><strong><%=l(:label_tracker_plural)%></strong><br /> -<% @trackers.each do |tracker| %> - <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> - <%= tracker.name %><br /> -<% end %></p> -<p class="small"><label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label></p> -<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> +<% if @versions.empty? %> +<p class="nodata"><%= l(:label_no_data) %></p> <% end %> -</div> - -<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> <% @versions.each do |version| %> <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> @@ -63,3 +53,21 @@ <% end %> </ul> <% end %> + +<% content_for :sidebar do %> +<% form_tag do %> +<h3><%= l(:label_roadmap) %></h3> +<% @trackers.each do |tracker| %> + <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> + <%= tracker.name %><br /> +<% end %> +<br /> +<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %> +<p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> +<% end %> + +<h3><%= l(:label_version_plural) %></h3> +<% @versions.each do |version| %> +<%= link_to version.name, :anchor => version.name %><br /> +<% end %> +<% end %> diff --git a/app/views/projects/settings/_boards.rhtml b/app/views/projects/settings/_boards.rhtml index e3f4629c1..bf6da3ab0 100644 --- a/app/views/projects/settings/_boards.rhtml +++ b/app/views/projects/settings/_boards.rhtml @@ -1,3 +1,4 @@ +<% if @project.boards.any? %> <table class="list"> <thead><th><%= l(:label_board) %></th><th><%= l(:field_description) %></th><th style="width:15%"></th><th style="width:15%"></th><th style="width:15%"></th></thead> <tbody> @@ -14,11 +15,14 @@ <%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %> <% end %> </td> - <td align="center"><small><%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %></small></td> - <td align="center"><small><%= link_to_if_authorized l(:button_delete), {:controller => 'boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small></td> + <td align="center"><%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %></td> + <td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></td> </tr> <% end %> </tbody> </table> - +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> + <p><%= link_to_if_authorized l(:label_board_new), {:controller => 'boards', :action => 'new', :project_id => @project} %></p> diff --git a/app/views/projects/settings/_issue_categories.rhtml b/app/views/projects/settings/_issue_categories.rhtml index c1e77e9cc..6d9dc0d55 100644 --- a/app/views/projects/settings/_issue_categories.rhtml +++ b/app/views/projects/settings/_issue_categories.rhtml @@ -1,3 +1,4 @@ +<% if @project.issue_categories.any? %> <table class="list"> <thead> <th><%= l(:label_issue_category) %></th> @@ -11,12 +12,15 @@ <tr class="<%= cycle 'odd', 'even' %>"> <td><%=h(category.name) %></td> <td><%=h(category.assigned_to.name) if category.assigned_to %></td> - <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'issue_categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %></small></td> - <td align="center"><small><%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => category}, :method => :post, :class => 'icon icon-del' %></small></td> + <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'issue_categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %></td> + <td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => category}, :method => :post, :class => 'icon icon-del' %></td> </tr> <% end %> <% end %> </tbody> </table> - +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> + <p><%= link_to_if_authorized l(:label_issue_category_new), :controller => 'projects', :action => 'add_issue_category', :id => @project %></p> diff --git a/app/views/projects/settings/_members.rhtml b/app/views/projects/settings/_members.rhtml index 1cd69bdfe..55dfde1ac 100644 --- a/app/views/projects/settings/_members.rhtml +++ b/app/views/projects/settings/_members.rhtml @@ -1,7 +1,10 @@ <%= error_messages_for 'member' %> <% roles = Role.find_all_givable %> <% users = User.find_active(:all) - @project.users %> - +<% # members sorted by role position + members = @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position} %> + +<% if members.any? %> <table class="list"> <thead> <th><%= l(:label_user) %></th> @@ -9,7 +12,7 @@ <th style="width:15%"></th> </thead> <tbody> - <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> + <% members.each do |member| %> <% next if member.new_record? %> <tr class="<%= cycle 'odd', 'even' %>"> <td><%= member.name %></td> @@ -22,16 +25,18 @@ <% end %> </td> <td align="center"> - <small><%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member}, + <%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member}, :method => :post }, :title => l(:button_delete), - :class => 'icon icon-del' %></small> + :class => 'icon icon-del' %> </td> </tr> </tbody> <% end; reset_cycle %> </table> - +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> <% if authorize_for('members', 'new') && !users.empty? %> <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post) do |f| %> diff --git a/app/views/projects/settings/_modules.rhtml b/app/views/projects/settings/_modules.rhtml index 9916225b0..2ecdaf7e8 100644 --- a/app/views/projects/settings/_modules.rhtml +++ b/app/views/projects/settings/_modules.rhtml @@ -3,6 +3,8 @@ :html => {:id => 'modules-form'} do |f| %> <div class=box> +<strong>Select modules to enable for this project:</strong> +<br /> <% Redmine::AccessControl.available_project_modules.each do |m| %> <p><label><%= check_box_tag 'enabled_modules[]', m, @project.module_enabled?(m) %> <%= m.to_s.humanize %></label></p> <% end %> diff --git a/app/views/projects/settings/_versions.rhtml b/app/views/projects/settings/_versions.rhtml index a710a847d..63c408b0d 100644 --- a/app/views/projects/settings/_versions.rhtml +++ b/app/views/projects/settings/_versions.rhtml @@ -1,3 +1,4 @@ +<% if @project.versions.any? %> <table class="list"> <thead> <th><%= l(:label_version) %></th> @@ -14,12 +15,15 @@ <td align="center"><%= format_date(version.effective_date) %></td> <td><%=h version.description %></td> <td><%= link_to(version.wiki_page_title, :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td> - <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> - <td align="center"><small><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small></td> + <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td> + <td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></td> </td> </tr> <% end; reset_cycle %> </tbody> </table> - +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> + <p><%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %></p> diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml index e5234f2f7..8d6c0c9a4 100644 --- a/app/views/projects/show.rhtml +++ b/app/views/projects/show.rhtml @@ -1,15 +1,13 @@ -<div class="contextual"> -<%= link_to l(:label_feed_plural), {:action => 'feeds', :id => @project}, :class => 'icon icon-feed' %> -</div> - <h2><%=l(:label_overview)%></h2> <div class="splitcontentleft"> <%= textilizable @project.description %> <ul> <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %> - <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li> - <% unless @project.parent.nil? %> + <% if @subprojects.any? %> + <li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(p.name, :action => 'show', :id => p)}.join(", ") %></li> + <% end %> + <% if @project.parent %> <li><%=l(:field_parent)%>: <%= link_to @project.parent.name, :controller => 'projects', :action => 'show', :id => @project.parent %></li> <% end %> <% for custom_value in @custom_values %> @@ -20,8 +18,7 @@ </ul> <% if User.current.allowed_to?(:view_issues, @project) %> - <div class="box"> - <div class="contextual"><% if authorize_for('projects', 'add_issue') %><%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %></div> + <div class="box"> <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3> <ul> <% for tracker in @trackers %> @@ -32,35 +29,53 @@ <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li> <% end %> </ul> - <p class="textcenter"><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></p> + <p><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></p> </div> <% end %> </div> <div class="splitcontentright"> + <% if @members_by_role.any? %> <div class="box"> <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3> - <% @members_by_role.keys.sort.each do |role| %> - <%= role.name %>: <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %><br /> - <% end %> - </div> - - <% if @subprojects.any? %> - <div class="box"> - <h3 class="icon22 icon22-projects"><%=l(:label_subproject_plural)%></h3> - <%= @subprojects.collect{|p| link_to(p.name, :action => 'show', :id => p)}.join(", ") %> + <p><% @members_by_role.keys.sort.each do |role| %> + <%= role.name %>: + <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %> + <br /> + <% end %></p> </div> - <% end %> - + <% end %> + <% if @news.any? && authorize_for('projects', 'list_news') %> <div class="box"> <h3><%=l(:label_news_latest)%></h3> <%= render :partial => 'news/news', :collection => @news %> - <p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p> + <p><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></p> </div> <% end %> </div> +<% content_for :sidebar do %> + <% if authorize_for('projects', 'add_issue') %> + <h3><%= l(:label_issue_new) %></h3> + <%= l(:label_tracker) %>: <%= new_issue_selector %> + <% end %> + + <h3>Planning</h3> + <p><%= link_to_if_authorized l(:label_calendar), :action => 'calendar', :id => @project %> | + <%= link_to_if_authorized l(:label_gantt), :action => 'gantt', :id => @project %></p> + + <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %> + <h3><%= l(:label_spent_time) %></h3> + <p><span class="icon icon-time"><%= lwr(:label_f_hour, @total_hours) %></span></p> + <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> | + <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p> + <% end %> + + <hr /> + <p><%= link_to l(:label_feed_plural), {:action => 'feeds', :id => @project}, :class => 'icon icon-feed' %></p> +<% end %> + <% content_for :header_tags do %> <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %> <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %> diff --git a/app/views/reports/_details.rhtml b/app/views/reports/_details.rhtml index e16095e2b..af8807fbd 100644 --- a/app/views/reports/_details.rhtml +++ b/app/views/reports/_details.rhtml @@ -6,7 +6,7 @@ <thead><tr> <th style="width:25%"></th> <% for status in @statuses %> -<th style="text-align:left;width:<%= col_width %>%"><div class="square" style="background:#<%= status.html_color %>;"></div> <small><%= status.name %></small></th> +<th style="width:<%= col_width %>%"><%= status.name %></th> <% end %> <th align="center" style="width:<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></th> <th align="center" style="width:<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></th> diff --git a/app/views/reports/issue_report.rhtml b/app/views/reports/issue_report.rhtml index 33f5e4a4d..0eaba58dc 100644 --- a/app/views/reports/issue_report.rhtml +++ b/app/views/reports/issue_report.rhtml @@ -1,11 +1,3 @@ -<% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %> -<div style="float:right;text-align:right;"> -<strong><%= l(:label_spent_time) %></strong>: <span class="icon icon-time"><%= lwr(:label_f_hour, @total_hours) %></span><br /> -<%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> | -<%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %> -</div> -<% end %> - <h2><%=l(:label_report_plural)%></h2> <div class="splitcontentleft"> diff --git a/app/views/repositories/browse.rhtml b/app/views/repositories/browse.rhtml index dffbe5458..0ba24fd86 100644 --- a/app/views/repositories/browse.rhtml +++ b/app/views/repositories/browse.rhtml @@ -1,7 +1,6 @@ <div class="contextual"> <% form_tag do %> -<p><%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> -<%= submit_tag 'OK' %></p> +<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> <% end %> </div> diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index 86bde671f..e982b6e13 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -11,13 +11,14 @@ <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], params[:type]), :onchange => "if (this.value != '') {this.form.submit()}" %></p> <% end %> +<div class="autoscroll"> <% cache(@cache_key) do %> <% @diff.each do |table_file| %> <% if @diff_type == 'sbs' %> - <table class="list CodeRay"> + <table class="filecontent CodeRay"> <thead> <tr> - <th colspan="4" class="list-filename"> + <th colspan="4" class="filename"> <%= table_file.file_name %> </th> </tr> @@ -47,10 +48,10 @@ </table> <% else %> - <table class="list CodeRay"> + <table class="filecontent CodeRay"> <thead> <tr> - <th colspan="3" class="list-filename"> + <th colspan="3" class="filename"> <%= table_file.file_name %> </th> </tr> @@ -85,6 +86,7 @@ <% end %> <% end %> <% end %> +</div> <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/app/views/repositories/entry.rhtml b/app/views/repositories/entry.rhtml index 5ced710f5..7d8cbb318 100644 --- a/app/views/repositories/entry.rhtml +++ b/app/views/repositories/entry.rhtml @@ -1,9 +1,10 @@ <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> -<table class="list CodeRay"> +<div class="autoscroll"> +<table class="filecontent CodeRay"> <thead> <tr> - <th colspan="2" class="list-filename"><%= @path %></th> + <th colspan="2" class="filename"><%= @path %></th> </tr> </thead> <tbody> @@ -17,6 +18,7 @@ <% end %> <tbody> </table> +</div> <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml index b484becce..32f8583a7 100644 --- a/app/views/repositories/revision.rhtml +++ b/app/views/repositories/revision.rhtml @@ -1,7 +1,7 @@ <div class="contextual"> <% form_tag do %> -<p><%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> -<%= submit_tag 'OK' %></p> +<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> +<%= submit_tag 'OK' %> <% end %> </div> diff --git a/app/views/roles/_form.rhtml b/app/views/roles/_form.rhtml index 6213aa2fb..73299293e 100644 --- a/app/views/roles/_form.rhtml +++ b/app/views/roles/_form.rhtml @@ -5,9 +5,9 @@ <p><%= f.check_box :assignable %></p> </div> -<div class="box"> -<h3><%= l(:label_permissions) %></h3> +<h3><%= l(:label_permissions) %></h3> +<div class="box"> <% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %> <% perms_by_module.keys.sort.each do |mod| %> <fieldset><legend><%= mod.blank? ? l(:label_project) : mod.humanize %></legend> diff --git a/app/views/roles/list.rhtml b/app/views/roles/list.rhtml index 14ae260aa..bdea2475f 100644 --- a/app/views/roles/list.rhtml +++ b/app/views/roles/list.rhtml @@ -23,7 +23,7 @@ <% end %> </td> <td align="center" style="width:10%;"> - <%= button_to(l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small") unless role.builtin? %> + <%= button_to(l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small", :disabled => role.builtin? ) %> </tr> <% end %> </tbody> diff --git a/app/views/roles/workflow.rhtml b/app/views/roles/workflow.rhtml index 5f1d8f21a..2bc2abd51 100644 --- a/app/views/roles/workflow.rhtml +++ b/app/views/roles/workflow.rhtml @@ -3,29 +3,24 @@ <p><%=l(:text_workflow_edit)%>:</p> <% form_tag({:action => 'workflow'}, :method => 'get') do %> -<div style="float:left;margin-right:10px;"> -<p><label for="role_id"><%=l(:label_role)%></label><br/> +<p><label for="role_id"><%=l(:label_role)%>:</label> <select id="role_id" name="role_id"> <%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %> -</select></p> -</div> +</select> -<div> -<p><label for="tracker_id"><%=l(:label_tracker)%></label><br/> +<label for="tracker_id"><%=l(:label_tracker)%>:</label> <select id="tracker_id" name="tracker_id"> <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %> </select> - <%= submit_tag l(:button_edit) %> </p> -</div> <% end %> <% unless @tracker.nil? or @role.nil? %> +<% form_tag({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) do %> <div class="box"> - <% form_tag({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) do %> <table> <tr> <td align="center"><strong><%=l(:label_current_status)%></strong></td> @@ -40,7 +35,7 @@ <% for old_status in @statuses %> <tr> - <td><div class="square" style="background:#<%= old_status.html_color %>;"></div> <%= old_status.name %></td> + <td><%= old_status.name %></td> <% for new_status in @statuses %> <td align="center"> @@ -55,14 +50,9 @@ </tr> <% end %> </table> -<br /> -<p> -<a href="javascript:checkAll('workflow_form', true)"><%=l(:button_check_all)%></a> | -<a href="javascript:checkAll('workflow_form', false)"><%=l(:button_uncheck_all)%></a> -</p> -<br /> + <p><%= check_all_links 'workflow_form' %></p> +</div> <%= submit_tag l(:button_save) %> <% end %> <% end %> -</div>
\ No newline at end of file diff --git a/app/views/welcome/index.rhtml b/app/views/welcome/index.rhtml index e5e43f722..4b9b59096 100644 --- a/app/views/welcome/index.rhtml +++ b/app/views/welcome/index.rhtml @@ -14,7 +14,7 @@ <ul> <% for project in @projects %> <li> - <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)<br /> + <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>) <%= textilizable project.description, :project => project %> </li> <% end %> diff --git a/app/views/wiki/_sidebar.rhtml b/app/views/wiki/_sidebar.rhtml new file mode 100644 index 000000000..b45aa7233 --- /dev/null +++ b/app/views/wiki/_sidebar.rhtml @@ -0,0 +1,4 @@ +<h3><%= l(:label_wiki) %></h3> + +<%= link_to l(:label_page_index), {:action => 'special', :page => 'Page_index'} %> + diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index de28ff1e2..96c2fca6d 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -4,7 +4,6 @@ <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :page => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %> <%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %> -<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %> </div> <% if @content.version != @page.content.version %> @@ -43,4 +42,8 @@ <%= stylesheet_link_tag 'scm' %> <% end %> +<% content_for :sidebar do %> + <%= render :partial => 'sidebar' %> +<% end %> + <% set_html_title @page.pretty_title %> |