project settings tabs redesign

git-svn-id: http://redmine.rubyforge.org/svn/trunk@182 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-01-26 18:27:10 +00:00
parent 190fef513f
commit e51c20c496
2 changed files with 37 additions and 41 deletions

View File

@ -19,15 +19,15 @@
</div> </div>
<div id="tab-content-members" class="tab-content" style="display:none;"> <div id="tab-content-members" class="tab-content" style="display:none;">
<div class="box">
<h3><%=l(:label_member_plural)%></h3>
<%= error_messages_for 'member' %> <%= error_messages_for 'member' %>
<table> <table class="list">
<% for member in @project.members.find(:all, :include => :user) %> <thead><th><%= l(:label_user) %></th><th><%= l(:label_role) %></th><th></th></thead>
<tbody>
<% for member in @project.members.find(:all, :include => :user) %>
<% unless member.new_record? %> <% unless member.new_record? %>
<tr> <tr class="<%= cycle 'odd', 'even' %>">
<td><%= member.user.display_name %></td> <td><%= member.user.display_name %></td>
<td> <td align="center">
<% if authorize_for('members', 'edit') %> <% if authorize_for('members', 'edit') %>
<%= start_form_tag :controller => 'members', :action => 'edit', :id => member %> <%= start_form_tag :controller => 'members', :action => 'edit', :id => member %>
<select name="member[role_id]"> <select name="member[role_id]">
@ -37,15 +37,15 @@
<%= end_form_tag %> <%= end_form_tag %>
<% end %> <% end %>
</td> </td>
<td> <td align="center">
<%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %> <%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
</td> </td>
</tr> </tr>
<% end %> <% end %>
<% end %> </tbody>
<% end; reset_cycle %>
</table> </table>
<% if authorize_for('projects', 'add_member') %> <% if authorize_for('projects', 'add_member') %>
<hr />
<label><%=l(:label_member_new)%></label><br/> <label><%=l(:label_member_new)%></label><br/>
<%= start_form_tag :controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project %> <%= start_form_tag :controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project %>
<select name="member[user_id]"> <select name="member[user_id]">
@ -58,57 +58,50 @@
<%= end_form_tag %> <%= end_form_tag %>
<% end %> <% end %>
</div> </div>
</div>
<div id="tab-content-versions" class="tab-content" style="display:none;"> <div id="tab-content-versions" class="tab-content" style="display:none;">
<div class="box"> <table class="list">
<h3><%=l(:label_version_plural)%></h3> <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead>
<table> <tbody>
<% for version in @project.versions %> <% for version in @project.versions %>
<tr> <tr class="<%= cycle 'odd', 'even' %>">
<td width="100"><strong><%=h version.name %></strong></td> <td><strong><%=h version.name %></strong></td>
<td width="100"><%= format_date(version.effective_date) %></td> <td align="center"><%= format_date(version.effective_date) %></td>
<td><%=h version.description %></td> <td><%=h version.description %></td>
<td> <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td>
<%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %> <td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %></td>
<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
</td> </td>
</tr> </tr>
<% end %> <% end; reset_cycle %>
</tbody>
</table> </table>
<% if authorize_for('projects', 'add_version') %> <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %>
<hr />
<%= link_to l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %>
<% end %>
</div>
</div> </div>
<div id="tab-content-categories" class="tab-content" style="display:none;"> <div id="tab-content-categories" class="tab-content" style="display:none;">
<div class="box"> <table class="list">
<h3><%=l(:label_issue_category_plural)%></h3> <thead><th><%= l(:label_issue_status) %></th><th></th></thead>
<table> <tbody>
<% for @category in @project.issue_categories %> <% for @category in @project.issue_categories %>
<% unless @category.new_record? %> <% unless @category.new_record? %>
<tr> <tr class="<%= cycle 'odd', 'even' %>">
<td> <td>
<%= start_form_tag :controller => 'issue_categories', :action => 'edit', :id => @category %> <%= start_form_tag :controller => 'issue_categories', :action => 'edit', :id => @category %>
<%= text_field 'category', 'name', :size => 25 %> <%= text_field 'category', 'name', :size => 25 %>
</td>
<td>
<% if authorize_for('issue_categories', 'edit') %> <% if authorize_for('issue_categories', 'edit') %>
<%= submit_tag l(:button_save), :class => "button-small" %> <%= submit_tag l(:button_save), :class => "button-small" %>
<%= end_form_tag %> <%= end_form_tag %>
<% end %> <% end %>
</td> </td>
<td> <td align="center">
<%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %> <%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
</td> </td>
</tr> </tr>
<% end %> <% end %>
<% end %> <% end %>
</tbody>
</table> </table>
<% if authorize_for('projects', 'add_issue_category') %> <% if authorize_for('projects', 'add_issue_category') %>
<hr />
<%= start_form_tag :action => 'add_issue_category', :tab => 'categories', :id => @project %> <%= start_form_tag :action => 'add_issue_category', :tab => 'categories', :id => @project %>
<label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/>
<%= error_messages_for 'issue_category' %> <%= error_messages_for 'issue_category' %>
@ -117,7 +110,6 @@
<%= end_form_tag %> <%= end_form_tag %>
<% end %> <% end %>
</div> </div>
</div>
<%= tab = params[:tab] ? h(params[:tab]) : 'info' <%= tab = params[:tab] ? h(params[:tab]) : 'info'
javascript_tag "showTab('#{tab}');" %> javascript_tag "showTab('#{tab}');" %>

View File

@ -336,6 +336,10 @@ table.with-cells td {
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
} }
table.list td {
padding:2px;
}
table.list thead th { table.list thead th {
text-align: center; text-align: center;
background: #eee; background: #eee;