Slight modifications on project settings views

git-svn-id: http://redmine.rubyforge.org/svn/trunk@509 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-05-05 15:35:28 +00:00
parent 3eed7e622c
commit 0dbbf776c6
2 changed files with 10 additions and 8 deletions

View File

@ -6,7 +6,7 @@
<thead> <thead>
<th><%= l(:label_user) %></th> <th><%= l(:label_user) %></th>
<th><%= l(:label_role) %></th> <th><%= l(:label_role) %></th>
<th></th> <th style="width:15%"></th>
</thead> </thead>
<tbody> <tbody>
<% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %>
@ -34,10 +34,10 @@
&nbsp; &nbsp;
<% if authorize_for('projects', 'add_member') && !users.empty? %> <% if authorize_for('projects', 'add_member') && !users.empty? %>
<p><label for="member_user_id"><%=l(:label_member_new)%></label></p>
<% remote_form_for(:member, @member, :url => {:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}, :method => :post) do |f| %> <% remote_form_for(:member, @member, :url => {:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}, :method => :post) do |f| %>
<p><label for="member_user_id"><%=l(:label_member_new)%></label><br />
<%= f.select :user_id, users.collect{|user| [user.name, user.id]} %> <%= f.select :user_id, users.collect{|user| [user.name, user.id]} %>
<%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %> <%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %>
<%= submit_tag l(:button_add) %> <%= submit_tag l(:button_add) %></p>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -24,7 +24,7 @@
<div id="tab-content-versions" class="tab-content" style="display:none;"> <div id="tab-content-versions" class="tab-content" style="display:none;">
<table class="list"> <table class="list">
<thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th style="width:15%"></th><th style="width:15%"></th></thead>
<tbody> <tbody>
<% for version in @project.versions %> <% for version in @project.versions %>
<tr class="<%= cycle 'odd', 'even' %>"> <tr class="<%= cycle 'odd', 'even' %>">
@ -38,12 +38,13 @@
<% end; reset_cycle %> <% end; reset_cycle %>
</tbody> </tbody>
</table> </table>
<%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> &nbsp;
<p><%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %></p>
</div> </div>
<div id="tab-content-categories" class="tab-content" style="display:none;"> <div id="tab-content-categories" class="tab-content" style="display:none;">
<table class="list"> <table class="list">
<thead><th><%= l(:label_issue_category) %></th><th></th></thead> <thead><th><%= l(:label_issue_category) %></th><th style="width:15%"></th></thead>
<tbody> <tbody>
<% for @category in @project.issue_categories %> <% for @category in @project.issue_categories %>
<% unless @category.new_record? %> <% unless @category.new_record? %>
@ -64,12 +65,13 @@
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
&nbsp;
<% if authorize_for('projects', 'add_issue_category') %> <% if authorize_for('projects', 'add_issue_category') %>
<% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %>
<label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> <p><label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br />
<%= error_messages_for 'issue_category' %> <%= error_messages_for 'issue_category' %>
<%= text_field 'issue_category', 'name', :size => 25 %> <%= text_field 'issue_category', 'name', :size => 25 %>
<%= submit_tag l(:button_create) %> <%= submit_tag l(:button_add) %></p>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>