Commit 827e998a authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

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
parent 43f583d3
......@@ -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
......
......@@ -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
......
......@@ -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')
......
......@@ -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
......
<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)%> &#187;" 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)%> &#187;" />
</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
<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
<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 %>
......@@ -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 %>
......@@ -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();" %>
......@@ -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%;">
......
......@@ -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>
......
<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') %>&nbsp;
<% 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 %>
<% 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 %>
<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' %>
......
......@@ -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>
......
<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>
&nbsp;
<% 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 %>
<% 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', ('&#187; ' + project.name), :value => url_for(:controller => 'projects', :action => 'show', :id => project)) %>
<% end %>
<% end %>
</select>
<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(('&#187; ' + project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "menuItem") %>
<% end %>
<% end %>
</div>
......@@ -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 %> &copy 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 %> &copy 2006-2007 Jean-Philippe Lang
</div>
</body>
</html>
<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 %>
......@@ -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 %>
......
<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>
<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 %>