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
This commit is contained in:
Jean-Philippe Lang 2007-09-22 13:17:49 +00:00
parent 43f583d332
commit 827e998afe
71 changed files with 843 additions and 1612 deletions

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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)%> &#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>

View File

@ -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>

View File

@ -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 %>
<% 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><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>
<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>
<p><%= submit_tag l(:button_save) %></p>
<% end %>

View File

@ -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 %>

View File

@ -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();" %>

View File

@ -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%;">

View File

@ -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>

View File

@ -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>
<% 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 %>
<% 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 %>

View File

@ -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 %>

View File

@ -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' %>

View File

@ -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>

View File

@ -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>
&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 %>

View File

@ -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', ('&#187; ' + project.name), :value => url_for(:controller => 'projects', :action => 'show', :id => project)) %>
<% end %>
<% end %>
</select>

View File

@ -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(('&#187; ' + project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "menuItem") %>
<% end %>
<% end %>
</div>

View File

@ -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 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>
<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 %>
<%= 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>
<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>

View File

@ -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 %>

View File

@ -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 %>

View File

@ -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>

View File

@ -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 @@
&nbsp;
</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 %>

View File

@ -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>

View File

@ -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 ('&#171; ' + (@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)}") + ' &#187;'),
{: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])}
%>&nbsp;
</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' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br />
<%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= 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 %>

View File

@ -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 %>

View File

@ -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) + ' &#187;'), :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 %>

View File

@ -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">

View File

@ -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| %>

View File

@ -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 %>
&nbsp;
<% 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 %>

View File

@ -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 %>

View File

@ -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 %>

View File

@ -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>
&nbsp;
<% 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>

View File

@ -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>
&nbsp;
<% 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>

View File

@ -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>
&nbsp;
<% 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| %>

View File

@ -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 %>

View File

@ -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>
&nbsp;
<% 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>

View File

@ -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 %>
<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>
<% 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(", ") %>
</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)}) %>

View File

@ -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>

View File

@ -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">

View File

@ -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>

View File

@ -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" %>

View File

@ -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" %>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 %>

View File

@ -0,0 +1,4 @@
<h3><%= l(:label_wiki) %></h3>
<%= link_to l(:label_page_index), {:action => 'special', :page => 'Page_index'} %>

View File

@ -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 %>

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Вход
button_submit: Изпращане

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS-Zugriffsschlüssel vor %s erstellt
label_module_plural: Module
label_added_time_by: Von %s vor %s hinzugefügt
label_updated_time: Vor %s aktualisiert
label_jump_to_a_project: Jump to a project...
button_login: Anmelden
button_submit: OK

View File

@ -228,8 +228,8 @@ label_my_page: My page
label_my_account: My account
label_my_projects: My projects
label_administration: Administration
label_login: Login
label_logout: Logout
label_login: Sign in
label_logout: Sign out
label_help: Help
label_reported_issues: Reported issues
label_assigned_to_me_issues: Issues assigned to me
@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Login
button_submit: Submit

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Conexión
button_submit: Someter

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: Clé d'accès RSS créée il y a %s
label_module_plural: Modules
label_added_time_by: Ajouté par %s il y a %s
label_updated_time: Mis à jour il y a %s
label_jump_to_a_project: Aller à un projet...
button_login: Connexion
button_submit: Soumettre

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Login
button_submit: Invia

View File

@ -420,6 +420,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: ログイン
button_submit: 変更

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Inloggen
button_submit: Toevoegen

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Login
button_submit: Enviar

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Login
button_submit: Enviar

View File

@ -419,6 +419,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: Logga in
button_submit: Skicka

View File

@ -421,6 +421,7 @@ label_feeds_access_key_created_on: RSS access key created %s ago
label_module_plural: Modules
label_added_time_by: Added by %s %s ago
label_updated_time: Updated %s ago
label_jump_to_a_project: Jump to a project...
button_login: 登录
button_submit: 提交

View File

@ -89,19 +89,14 @@ end
# Project menu configuration
Redmine::MenuManager.map :project_menu do |menu|
menu.push :label_overview, :controller => 'projects', :action => 'show'
menu.push :label_calendar, :controller => 'projects', :action => 'calendar'
menu.push :label_gantt, :controller => 'projects', :action => 'gantt'
menu.push :label_issue_plural, :controller => 'projects', :action => 'list_issues'
menu.push :label_report_plural, :controller => 'reports', :action => 'issue_report'
menu.push :label_activity, :controller => 'projects', :action => 'activity'
menu.push :label_news_plural, :controller => 'projects', :action => 'list_news'
menu.push :label_change_log, :controller => 'projects', :action => 'changelog'
menu.push :label_roadmap, :controller => 'projects', :action => 'roadmap'
menu.push :label_issue_plural, :controller => 'projects', :action => 'list_issues'
menu.push :label_news_plural, :controller => 'projects', :action => 'list_news'
menu.push :label_document_plural, :controller => 'projects', :action => 'list_documents'
menu.push :label_wiki, { :controller => 'wiki', :action => 'index', :page => nil }, :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
menu.push :label_board_plural, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id, :if => Proc.new { |p| p.boards.any? }
menu.push :label_attachment_plural, :controller => 'projects', :action => 'list_files'
menu.push :label_search, :controller => 'search', :action => 'index'
menu.push :label_repository, { :controller => 'repositories', :action => 'show' }, :if => Proc.new { |p| p.repository && !p.repository.new_record? }
menu.push :label_settings, :controller => 'projects', :action => 'settings'
end

BIN
public/images/contentbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
public/images/mainbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
public/images/note.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

View File

@ -1,556 +0,0 @@
//*****************************************************************************
// Do not remove this notice.
//
// Copyright 2000-2004 by Mike Hall.
// See http://www.brainjar.com for terms of use.
//*****************************************************************************
//----------------------------------------------------------------------------
// Emulation de la fonction push pour IE5.0
//----------------------------------------------------------------------------
if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0;i<arguments.length;i++)this[this.length]=arguments[i];};};
//----------------------------------------------------------------------------
// Code to determine the browser and version.
//----------------------------------------------------------------------------
function Browser() {
var ua, s, i;
this.isIE = false; // Internet Explorer
this.isOP = false; // Opera
this.isNS = false; // Netscape
this.version = null;
//-- debut ajout ci ----
this.isIE5mac = false; // Internet Explorer 5 mac
//-- fin ajout ci ----
ua = navigator.userAgent;
//-- debut ajout ci ----
if (ua.indexOf("Opera")==-1 && ua.indexOf("MSIE 5")>-1 && ua.indexOf("Mac")>-1) {
this.isIE5mac = true;
this.version = "";
return;
}
//-- fin ajout ci ----
s = "Opera";
if ((i = ua.indexOf(s)) >= 0) {
this.isOP = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
s = "Netscape6/";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
// Treat any other "Gecko" browser as Netscape 6.1.
s = "Gecko";
if ((i = ua.indexOf(s)) >= 0) {
this.isNS = true;
this.version = 6.1;
return;
}
s = "MSIE";
if ((i = ua.indexOf(s))) {
this.isIE = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
}
var browser = new Browser();
//----------------------------------------------------------------------------
// Code for handling the menu bar and active button.
//----------------------------------------------------------------------------
var activeButton = null;
function buttonClick(event, menuId) {
var button;
// Get the target button element.
if (browser.isIE)
button = window.event.srcElement;
else
button = event.currentTarget;
// Blur focus from the link to remove that annoying outline.
button.blur();
// Associate the named menu to this button if not already done.
// Additionally, initialize menu display.
if (button.menu == null) {
button.menu = document.getElementById(menuId);
if (button.menu.isInitialized == null)
menuInit(button.menu);
}
// Set mouseout event handler for the button, if not already done.
if (button.onmouseout == null)
button.onmouseout = buttonOrMenuMouseout;
// Exit if this button is the currently active one.
if (button == activeButton)
return false;
// Reset the currently active button, if any.
if (activeButton != null)
resetButton(activeButton);
// Activate this button, unless it was the currently active one.
if (button != activeButton) {
depressButton(button);
activeButton = button;
}
else
activeButton = null;
return false;
}
function buttonMouseover(event, menuId) {
var button;
//-- debut ajout ci ----
if (!browser.isIE5mac) {
//-- fin ajout ci ----
//-- debut ajout ci ----
cicacheselect();
//-- fin ajout ci ----
// Activates this button's menu if no other is currently active.
if (activeButton == null) {
buttonClick(event, menuId);
return;
}
// Find the target button element.
if (browser.isIE)
button = window.event.srcElement;
else
button = event.currentTarget;
// If any other button menu is active, make this one active instead.
if (activeButton != null && activeButton != button)
buttonClick(event, menuId);
//-- debut ajout ci ----
}
//-- fin ajout ci ----
}
function depressButton(button) {
var x, y;
// Update the button's style class to make it look like it's
// depressed.
button.className += " menuButtonActive";
// Set mouseout event handler for the button, if not already done.
if (button.onmouseout == null)
button.onmouseout = buttonOrMenuMouseout;
if (button.menu.onmouseout == null)
button.menu.onmouseout = buttonOrMenuMouseout;
// Position the associated drop down menu under the button and
// show it.
x = getPageOffsetLeft(button);
y = getPageOffsetTop(button) + button.offsetHeight - 1;
// For IE, adjust position.
if (browser.isIE) {
x += button.offsetParent.clientLeft;
y += button.offsetParent.clientTop;
}
button.menu.style.left = x + "px";
button.menu.style.top = y + "px";0
button.menu.style.visibility = "visible";
}
function resetButton(button) {
// Restore the button's style class.
removeClassName(button, "menuButtonActive");
// Hide the button's menu, first closing any sub menus.
if (button.menu != null) {
closeSubMenu(button.menu);
button.menu.style.visibility = "hidden";
}
}
//----------------------------------------------------------------------------
// Code to handle the menus and sub menus.
//----------------------------------------------------------------------------
function menuMouseover(event) {
var menu;
//-- debut ajout ci ----
if (!browser.isIE5mac) {
//-- fin ajout ci ----
//-- debut ajout ci ----
cicacheselect();
//-- fin ajout ci ----
// Find the target menu element.
if (browser.isIE)
menu = getContainerWith(window.event.srcElement, "DIV", "menu");
else
menu = event.currentTarget;
// Close any active sub menu.
if (menu.activeItem != null)
closeSubMenu(menu);
//-- debut ajout ci ----
}
//-- fin ajout ci ----
}
function menuItemMouseover(event, menuId) {
var item, menu, x, y;
//-- debut ajout ci ----
cicacheselect();
//-- fin ajout ci ----
// Find the target item element and its parent menu element.
if (browser.isIE)
item = getContainerWith(window.event.srcElement, "A", "menuItem");
else
item = event.currentTarget;
menu = getContainerWith(item, "DIV", "menu");
// Close any active sub menu and mark this one as active.
if (menu.activeItem != null)
closeSubMenu(menu);
menu.activeItem = item;
// Highlight the item element.
item.className += " menuItemHighlight";
// Initialize the sub menu, if not already done.
if (item.subMenu == null) {
item.subMenu = document.getElementById(menuId);
if (item.subMenu.isInitialized == null)
menuInit(item.subMenu);
}
// Set mouseout event handler for the sub menu, if not already done.
if (item.subMenu.onmouseout == null)
item.subMenu.onmouseout = buttonOrMenuMouseout;
// Get position for submenu based on the menu item.
x = getPageOffsetLeft(item) + item.offsetWidth;
y = getPageOffsetTop(item);
// Adjust position to fit in view.
var maxX, maxY;
if (browser.isIE) {
maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) +
(document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth);
maxY = Math.max(document.documentElement.scrollTop, document.body.scrollTop) +
(document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.body.clientHeight);
}
if (browser.isOP) {
maxX = document.documentElement.scrollLeft + window.innerWidth;
maxY = document.documentElement.scrollTop + window.innerHeight;
}
if (browser.isNS) {
maxX = window.scrollX + window.innerWidth;
maxY = window.scrollY + window.innerHeight;
}
maxX -= item.subMenu.offsetWidth;
maxY -= item.subMenu.offsetHeight;
if (x > maxX)
x = Math.max(0, x - item.offsetWidth - item.subMenu.offsetWidth
+ (menu.offsetWidth - item.offsetWidth));
y = Math.max(0, Math.min(y, maxY));
// Position and show the sub menu.
item.subMenu.style.left = x + "px";
item.subMenu.style.top = y + "px";
item.subMenu.style.visibility = "visible";
// Stop the event from bubbling.
if (browser.isIE)
window.event.cancelBubble = true;
else
event.stopPropagation();
}
function closeSubMenu(menu) {
if (menu == null || menu.activeItem == null)
return;
// Recursively close any sub menus.
if (menu.activeItem.subMenu != null) {
closeSubMenu(menu.activeItem.subMenu);
menu.activeItem.subMenu.style.visibility = "hidden";
menu.activeItem.subMenu = null;
}
removeClassName(menu.activeItem, "menuItemHighlight");
menu.activeItem = null;
}
function buttonOrMenuMouseout(event) {
var el;
// If there is no active button, exit.
if (activeButton == null)
return;
// Find the element the mouse is moving to.
if (browser.isIE)
el = window.event.toElement;
else if (event.relatedTarget != null)
el = (event.relatedTarget.tagName ? event.relatedTarget : event.relatedTarget.parentNode);
// If the element is not part of a menu, reset the active button.
if (getContainerWith(el, "DIV", "menu") == null) {
resetButton(activeButton);
activeButton = null;
//-- debut ajout ci ----
cimontreselect();
//-- fin ajout ci ----
}
}
//----------------------------------------------------------------------------
// Code to initialize menus.
//----------------------------------------------------------------------------
function menuInit(menu) {
var itemList, spanList;
var textEl, arrowEl;
var itemWidth;
var w, dw;
var i, j;
// For IE, replace arrow characters.
if (browser.isIE) {
menu.style.lineHeight = "2.5ex";
spanList = menu.getElementsByTagName("SPAN");
for (i = 0; i < spanList.length; i++)
if (hasClassName(spanList[i], "menuItemArrow")) {
spanList[i].style.fontFamily = "Webdings";
spanList[i].firstChild.nodeValue = "4";
}
}
// Find the width of a menu item.
itemList = menu.getElementsByTagName("A");
if (itemList.length > 0)
itemWidth = itemList[0].offsetWidth;
else
return;
// For items with arrows, add padding to item text to make the
// arrows flush right.
for (i = 0; i < itemList.length; i++) {
spanList = itemList[i].getElementsByTagName("SPAN");
textEl = null;
arrowEl = null;
for (j = 0; j < spanList.length; j++) {
if (hasClassName(spanList[j], "menuItemText"))
textEl = spanList[j];
if (hasClassName(spanList[j], "menuItemArrow"))
arrowEl = spanList[j];
}
if (textEl != null && arrowEl != null) {
textEl.style.paddingRight = (itemWidth
- (textEl.offsetWidth + arrowEl.offsetWidth)) + "px";
// For Opera, remove the negative right margin to fix a display bug.
if (browser.isOP)
arrowEl.style.marginRight = "0px";
}
}
// Fix IE hover problem by setting an explicit width on first item of
// the menu.
if (browser.isIE) {
w = itemList[0].offsetWidth;
itemList[0].style.width = w + "px";
dw = itemList[0].offsetWidth - w;
w -= dw;
itemList[0].style.width = w + "px";
}
// Mark menu as initialized.
menu.isInitialized = true;
}
//----------------------------------------------------------------------------
// General utility functions.
//----------------------------------------------------------------------------
function getContainerWith(node, tagName, className) {
// Starting with the given node, find the nearest containing element
// with the specified tag name and style class.
while (node != null) {
if (node.tagName != null && node.tagName == tagName &&
hasClassName(node, className))
return node;
node = node.parentNode;
}
return node;
}
function hasClassName(el, name) {
var i, list;
// Return true if the given element currently has the given class
// name.
list = el.className.split(" ");
for (i = 0; i < list.length; i++)
if (list[i] == name)
return true;
return false;
}
function removeClassName(el, name) {
var i, curList, newList;
if (el.className == null)
return;
// Remove the given class name from the element's className property.
newList = new Array();
curList = el.className.split(" ");
for (i = 0; i < curList.length; i++)
if (curList[i] != name)
newList.push(curList[i]);
el.className = newList.join(" ");
}
function getPageOffsetLeft(el) {
var x;
// Return the x coordinate of an element relative to the page.
x = el.offsetLeft;
if (el.offsetParent != null)
x += getPageOffsetLeft(el.offsetParent);
return x;
}
function getPageOffsetTop(el) {
var y;
// Return the x coordinate of an element relative to the page.
y = el.offsetTop;
if (el.offsetParent != null)
y += getPageOffsetTop(el.offsetParent);
return y;
}
//-- debut ajout ci ----
function cicacheselect(){
if (browser.isIE && browser.version < 7) {
oSelects = document.getElementsByTagName('SELECT');
if (oSelects.length > 0) {
for (i = 0; i < oSelects.length; i++) {
oSlt = oSelects[i];
if (oSlt.style.visibility != 'hidden') {oSlt.style.visibility = 'hidden';}
}
}
oSelects = document.getElementsByName('masquable');
if (oSelects.length > 0) {
for (i = 0; i < oSelects.length; i++) {
oSlt = oSelects[i];
if (oSlt.style.visibility != 'hidden') {oSlt.style.visibility = 'hidden';}
}
}
}
}
function cimontreselect(){
if (browser.isIE && browser.version < 7) {
oSelects = document.getElementsByTagName('SELECT');
if (oSelects.length > 0) {
for (i = 0; i < oSelects.length; i++) {
oSlt = oSelects[i];
if (oSlt.style.visibility != 'visible') {oSlt.style.visibility = 'visible';}
}
}
oSelects = document.getElementsByName('masquable');
if (oSelects.length > 0) {
for (i = 0; i < oSelects.length; i++) {
oSlt = oSelects[i];
if (oSlt.style.visibility != 'visible') {oSlt.style.visibility = 'visible';}
}
}
}
}
//-- fin ajout ci ----

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,12 @@
/* The main calendar widget. DIV containing a table. */
div.calendar { position: relative; }
img.calendar-trigger {
cursor: pointer;
vertical-align: middle;
margin-left: 4px;
}
div.calendar { position: relative; z-index: 15;}
.calendar, .calendar table {
border: 1px solid #556;

View File

@ -1,3 +1,2 @@
#header, #navigation, #subcontent, #footer { display:none; }
.menu { display:none; }
.contextual, .rightbox { display:none; }
#top-menu, #header, #main-menu, #sidebar, #footer { display:none; }
.contextual { display:none; }

View File

@ -1,14 +1,14 @@
table.filecontent { border: 1px solid #ccc; border-collapse: collapse; width:98%; }
table.filecontent th { border: 1px solid #ccc; background-color: #eee; }
table.filecontent th.filename { background-color: #ddc; text-align: left; }
div.action_M { background: #fd8 }
div.action_D { background: #f88 }
div.action_A { background: #bfb }
table.filecontent tr.spacing { border: 1px solid #d7d7d7; }
tr.spacing {
border: 1px solid #d7d7d7;
}
.line-num {
table.filecontent .line-num {
border: 1px solid #d7d7d7;
font-size: 0.8em;
text-align: right;
@ -16,17 +16,6 @@ tr.spacing {
padding-right: 3px;
}
.line-code {
font-size: 1.4em;
}
table.list thead th.list-filename {
background-color: #ddc;
font-weight: bolder;
text-align: left;
}
/************* Coderay styles *************/
table.CodeRay {
@ -37,7 +26,7 @@ table.CodeRay {
span.CodeRay { white-space: pre; border: 0px; padding: 2px }
.CodeRay .no { padding: 0px 4px }
.CodeRay .code { width: 100% }
.CodeRay .code { }
ol.CodeRay { font-size: 10pt }
ol.CodeRay li { white-space: pre }