Revision 912:5e80956cc792 app/views/projects/settings
| app/views/projects/settings/_activities.html.erb | ||
|---|---|---|
| 1 |
<% form_tag(project_project_enumerations_path(@project), :method => :put, :class => "tabular") do %> |
|
| 2 |
|
|
| 3 |
<table class="list"> |
|
| 4 |
<thead><tr> |
|
| 5 |
<th><%= l(:field_name) %></th> |
|
| 6 |
<th><%= l(:enumeration_system_activity) %></th> |
|
| 7 |
<% TimeEntryActivity.new.available_custom_fields.each do |value| %> |
|
| 8 |
<th><%= h value.name %></th> |
|
| 9 |
<% end %> |
|
| 10 |
<th style="width:15%;"><%= l(:field_active) %></th> |
|
| 11 |
</tr></thead> |
|
| 12 |
|
|
| 13 |
<% @project.activities(true).each do |enumeration| %> |
|
| 14 |
<% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
|
|
| 15 |
<tr class="<%= cycle('odd', 'even') %>">
|
|
| 16 |
<td> |
|
| 17 |
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %> |
|
| 18 |
<%= h(enumeration) %> |
|
| 19 |
</td> |
|
| 20 |
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td> |
|
| 21 |
<% enumeration.custom_field_values.each do |value| %> |
|
| 22 |
<td align="center"> |
|
| 23 |
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
|
|
| 24 |
</td> |
|
| 25 |
<% end %> |
|
| 26 |
<td align="center" style="width:15%;"> |
|
| 27 |
<%= ff.check_box :active %> |
|
| 28 |
</td> |
|
| 29 |
</tr> |
|
| 30 |
<% end %> |
|
| 31 |
<% end %> |
|
| 32 |
</table> |
|
| 33 |
|
|
| 34 |
<div class="contextual"> |
|
| 35 |
<%= link_to(l(:button_reset), project_project_enumerations_path(@project), |
|
| 36 |
:method => :delete, |
|
| 37 |
:confirm => l(:text_are_you_sure), |
|
| 38 |
:class => 'icon icon-del') %> |
|
| 39 |
</div> |
|
| 40 |
|
|
| 41 |
<%= submit_tag l(:button_save) %> |
|
| 42 |
<% end %> |
|
| app/views/projects/settings/_activities.rhtml | ||
|---|---|---|
| 1 |
<% form_tag(project_project_enumerations_path(@project), :method => :put, :class => "tabular") do %> |
|
| 2 |
|
|
| 3 |
<table class="list"> |
|
| 4 |
<thead><tr> |
|
| 5 |
<th><%= l(:field_name) %></th> |
|
| 6 |
<th><%= l(:enumeration_system_activity) %></th> |
|
| 7 |
<% TimeEntryActivity.new.available_custom_fields.each do |value| %> |
|
| 8 |
<th><%= h value.name %></th> |
|
| 9 |
<% end %> |
|
| 10 |
<th style="width:15%;"><%= l(:field_active) %></th> |
|
| 11 |
</tr></thead> |
|
| 12 |
|
|
| 13 |
<% @project.activities(true).each do |enumeration| %> |
|
| 14 |
<% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
|
|
| 15 |
<tr class="<%= cycle('odd', 'even') %>">
|
|
| 16 |
<td> |
|
| 17 |
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %> |
|
| 18 |
<%= h(enumeration) %> |
|
| 19 |
</td> |
|
| 20 |
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td> |
|
| 21 |
<% enumeration.custom_field_values.each do |value| %> |
|
| 22 |
<td align="center"> |
|
| 23 |
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
|
|
| 24 |
</td> |
|
| 25 |
<% end %> |
|
| 26 |
<td align="center" style="width:15%;"> |
|
| 27 |
<%= ff.check_box :active %> |
|
| 28 |
</td> |
|
| 29 |
</tr> |
|
| 30 |
<% end %> |
|
| 31 |
<% end %> |
|
| 32 |
</table> |
|
| 33 |
|
|
| 34 |
<div class="contextual"> |
|
| 35 |
<%= link_to(l(:button_reset), project_project_enumerations_path(@project), |
|
| 36 |
:method => :delete, |
|
| 37 |
:confirm => l(:text_are_you_sure), |
|
| 38 |
:class => 'icon icon-del') %> |
|
| 39 |
</div> |
|
| 40 |
|
|
| 41 |
<%= submit_tag l(:button_save) %> |
|
| 42 |
<% end %> |
|
| app/views/projects/settings/_boards.html.erb | ||
|---|---|---|
| 1 |
<% if @project.boards.any? %> |
|
| 2 |
<table class="list"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_board) %></th> |
|
| 5 |
<th><%= l(:field_description) %></th> |
|
| 6 |
<th></th> |
|
| 7 |
<th></th> |
|
| 8 |
</tr></thead> |
|
| 9 |
<tbody> |
|
| 10 |
<% @project.boards.each do |board| |
|
| 11 |
next if board.new_record? %> |
|
| 12 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 13 |
<td><%=h board.name %></td> |
|
| 14 |
<td><%=h board.description %></td> |
|
| 15 |
<td align="center"> |
|
| 16 |
<% if authorize_for("boards", "edit") %>
|
|
| 17 |
<%= reorder_links('board', {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}) %>
|
|
| 18 |
<% end %> |
|
| 19 |
</td> |
|
| 20 |
<td class="buttons"> |
|
| 21 |
<%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
|
|
| 22 |
<%= 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' %>
|
|
| 23 |
</td> |
|
| 24 |
</tr> |
|
| 25 |
<% end %> |
|
| 26 |
</tbody> |
|
| 27 |
</table> |
|
| 28 |
<% else %> |
|
| 29 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 30 |
<% end %> |
|
| 31 |
|
|
| 32 |
<p><%= link_to_if_authorized l(:label_board_new), {:controller => 'boards', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %></p>
|
|
| app/views/projects/settings/_boards.rhtml | ||
|---|---|---|
| 1 |
<% if @project.boards.any? %> |
|
| 2 |
<table class="list"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_board) %></th> |
|
| 5 |
<th><%= l(:field_description) %></th> |
|
| 6 |
<th></th> |
|
| 7 |
<th></th> |
|
| 8 |
</tr></thead> |
|
| 9 |
<tbody> |
|
| 10 |
<% @project.boards.each do |board| |
|
| 11 |
next if board.new_record? %> |
|
| 12 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 13 |
<td><%=h board.name %></td> |
|
| 14 |
<td><%=h board.description %></td> |
|
| 15 |
<td align="center"> |
|
| 16 |
<% if authorize_for("boards", "edit") %>
|
|
| 17 |
<%= reorder_links('board', {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}) %>
|
|
| 18 |
<% end %> |
|
| 19 |
</td> |
|
| 20 |
<td class="buttons"> |
|
| 21 |
<%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
|
|
| 22 |
<%= 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' %>
|
|
| 23 |
</td> |
|
| 24 |
</tr> |
|
| 25 |
<% end %> |
|
| 26 |
</tbody> |
|
| 27 |
</table> |
|
| 28 |
<% else %> |
|
| 29 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 30 |
<% end %> |
|
| 31 |
|
|
| 32 |
<p><%= link_to_if_authorized l(:label_board_new), {:controller => 'boards', :action => 'new', :project_id => @project} %></p>
|
|
| app/views/projects/settings/_issue_categories.html.erb | ||
|---|---|---|
| 1 |
<% if @project.issue_categories.any? %> |
|
| 2 |
<table class="list"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_issue_category) %></th> |
|
| 5 |
<th><%= l(:field_assigned_to) %></th> |
|
| 6 |
<th></th> |
|
| 7 |
</tr></thead> |
|
| 8 |
<tbody> |
|
| 9 |
<% for category in @project.issue_categories %> |
|
| 10 |
<% unless category.new_record? %> |
|
| 11 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 12 |
<td><%=h(category.name) %></td> |
|
| 13 |
<td><%=h(category.assigned_to.name) if category.assigned_to %></td> |
|
| 14 |
<td class="buttons"> |
|
| 15 |
<% if User.current.allowed_to?(:manage_categories, @project) %> |
|
| 16 |
<%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %> |
|
| 17 |
<%= link_to l(:button_delete), issue_category_path(category), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %> |
|
| 18 |
<% end %> |
|
| 19 |
</td> |
|
| 20 |
</tr> |
|
| 21 |
<% end %> |
|
| 22 |
<% end %> |
|
| 23 |
</tbody> |
|
| 24 |
</table> |
|
| 25 |
<% else %> |
|
| 26 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 27 |
<% end %> |
|
| 28 |
|
|
| 29 |
<p><%= link_to l(:label_issue_category_new), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %></p> |
|
| app/views/projects/settings/_issue_categories.rhtml | ||
|---|---|---|
| 1 |
<% if @project.issue_categories.any? %> |
|
| 2 |
<table class="list"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_issue_category) %></th> |
|
| 5 |
<th><%= l(:field_assigned_to) %></th> |
|
| 6 |
<th></th> |
|
| 7 |
</tr></thead> |
|
| 8 |
<tbody> |
|
| 9 |
<% for category in @project.issue_categories %> |
|
| 10 |
<% unless category.new_record? %> |
|
| 11 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 12 |
<td><%=h(category.name) %></td> |
|
| 13 |
<td><%=h(category.assigned_to.name) if category.assigned_to %></td> |
|
| 14 |
<td class="buttons"> |
|
| 15 |
<%= link_to_if_authorized l(:button_edit), { :controller => 'issue_categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %>
|
|
| 16 |
<%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => category}, :method => :post, :class => 'icon icon-del' %>
|
|
| 17 |
</td> |
|
| 18 |
</tr> |
|
| 19 |
<% end %> |
|
| 20 |
<% end %> |
|
| 21 |
</tbody> |
|
| 22 |
</table> |
|
| 23 |
<% else %> |
|
| 24 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 25 |
<% end %> |
|
| 26 |
|
|
| 27 |
<p><%= link_to_if_authorized l(:label_issue_category_new), :controller => 'issue_categories', :action => 'new', :project_id => @project %></p> |
|
| app/views/projects/settings/_members.html.erb | ||
|---|---|---|
| 1 |
<%= error_messages_for 'member' %> |
|
| 2 |
<% roles = Role.find_all_givable |
|
| 3 |
members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %> |
|
| 4 |
|
|
| 5 |
<div class="splitcontentleft"> |
|
| 6 |
<% if members.any? %> |
|
| 7 |
<table class="list members"> |
|
| 8 |
<thead><tr> |
|
| 9 |
<th><%= l(:label_user) %> / <%= l(:label_group) %></th> |
|
| 10 |
<th><%= l(:label_role_plural) %></th> |
|
| 11 |
<th style="width:15%"></th> |
|
| 12 |
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %> |
|
| 13 |
</tr></thead> |
|
| 14 |
<tbody> |
|
| 15 |
<% members.each do |member| %> |
|
| 16 |
<% next if member.new_record? %> |
|
| 17 |
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member"> |
|
| 18 |
<td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td> |
|
| 19 |
<td class="roles"> |
|
| 20 |
<span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
|
|
| 21 |
<% if authorize_for('members', 'edit') %>
|
|
| 22 |
<% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member},
|
|
| 23 |
:method => :post, |
|
| 24 |
:html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %>
|
|
| 25 |
<p><% roles.each do |role| %> |
|
| 26 |
<label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role), |
|
| 27 |
:disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
|
|
| 28 |
<% end %></p> |
|
| 29 |
<%= hidden_field_tag 'member[role_ids][]', '' %> |
|
| 30 |
<p><%= submit_tag l(:button_change), :class => "small" %> |
|
| 31 |
<%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p>
|
|
| 32 |
<% end %> |
|
| 33 |
<% end %> |
|
| 34 |
</td> |
|
| 35 |
<td class="buttons"> |
|
| 36 |
<%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
|
|
| 37 |
<%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},
|
|
| 38 |
:method => :post, |
|
| 39 |
:confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil) |
|
| 40 |
}, :title => l(:button_delete), |
|
| 41 |
:class => 'icon icon-del') if member.deletable? %> |
|
| 42 |
</td> |
|
| 43 |
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
|
|
| 44 |
</tr> |
|
| 45 |
<% end; reset_cycle %> |
|
| 46 |
</tbody> |
|
| 47 |
</table> |
|
| 48 |
<% else %> |
|
| 49 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 50 |
<% end %> |
|
| 51 |
</div> |
|
| 52 |
|
|
| 53 |
<% principals = Principal.active.find(:all, :limit => 100, :order => 'type, login, lastname ASC') - @project.principals %> |
|
| 54 |
|
|
| 55 |
<div class="splitcontentright"> |
|
| 56 |
<% if roles.any? && principals.any? %> |
|
| 57 |
<% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post,
|
|
| 58 |
:loading => '$(\'member-add-submit\').disable();', |
|
| 59 |
:complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %> |
|
| 60 |
<fieldset><legend><%=l(:label_member_new)%></legend> |
|
| 61 |
|
|
| 62 |
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p> |
|
| 63 |
<%= observe_field(:principal_search, |
|
| 64 |
:frequency => 0.5, |
|
| 65 |
:update => :principals, |
|
| 66 |
:url => { :controller => 'members', :action => 'autocomplete_for_member', :id => @project },
|
|
| 67 |
:with => 'q') |
|
| 68 |
%> |
|
| 69 |
|
|
| 70 |
<div id="principals"> |
|
| 71 |
<%= principals_check_box_tags 'member[user_ids][]', principals %> |
|
| 72 |
</div> |
|
| 73 |
|
|
| 74 |
<p><%= l(:label_role_plural) %>: |
|
| 75 |
<% roles.each do |role| %> |
|
| 76 |
<label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %></label> |
|
| 77 |
<% end %></p> |
|
| 78 |
|
|
| 79 |
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p> |
|
| 80 |
</fieldset> |
|
| 81 |
<% end %> |
|
| 82 |
<% end %> |
|
| 83 |
</div> |
|
| app/views/projects/settings/_modules.html.erb | ||
|---|---|---|
| 1 |
<% form_for :project, @project, |
|
| 2 |
:url => { :action => 'modules', :id => @project },
|
|
| 3 |
:html => {:id => 'modules-form'} do |f| %>
|
|
| 4 |
|
|
| 5 |
<div class="box"> |
|
| 6 |
<fieldset> |
|
| 7 |
<legend><%= l(:text_select_project_modules) %></legend> |
|
| 8 |
|
|
| 9 |
<% Redmine::AccessControl.available_project_modules.each do |m| %> |
|
| 10 |
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%> |
|
| 11 |
<%= l_or_humanize(m, :prefix => "project_module_") %></label></p> |
|
| 12 |
<% end %> |
|
| 13 |
</fieldset> |
|
| 14 |
</div> |
|
| 15 |
|
|
| 16 |
<p><%= check_all_links 'modules-form' %></p> |
|
| 17 |
<p><%= submit_tag l(:button_save) %></p> |
|
| 18 |
|
|
| 19 |
<% end %> |
|
| app/views/projects/settings/_modules.rhtml | ||
|---|---|---|
| 1 |
<% form_for :project, @project, |
|
| 2 |
:url => { :action => 'modules', :id => @project },
|
|
| 3 |
:html => {:id => 'modules-form'} do |f| %>
|
|
| 4 |
|
|
| 5 |
<div class="box"> |
|
| 6 |
<fieldset> |
|
| 7 |
<legend><%= l(:text_select_project_modules) %></legend> |
|
| 8 |
|
|
| 9 |
<% Redmine::AccessControl.available_project_modules.each do |m| %> |
|
| 10 |
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%> |
|
| 11 |
<%= l_or_humanize(m, :prefix => "project_module_") %></label></p> |
|
| 12 |
<% end %> |
|
| 13 |
</fieldset> |
|
| 14 |
</div> |
|
| 15 |
|
|
| 16 |
<p><%= check_all_links 'modules-form' %></p> |
|
| 17 |
<p><%= submit_tag l(:button_save) %></p> |
|
| 18 |
|
|
| 19 |
<% end %> |
|
| app/views/projects/settings/_repository.html.erb | ||
|---|---|---|
| 1 |
|
|
| 2 |
<%= javascript_include_tag 'repository' %> |
|
| 3 |
|
|
| 4 |
<% remote_form_for :repository, @repository, |
|
| 5 |
:url => { :controller => 'repositories', :action => 'edit', :id => @project },
|
|
| 6 |
:builder => TabularFormBuilder, |
|
| 7 |
:lang => current_language do |f| %> |
|
| 8 |
|
|
| 9 |
<%= error_messages_for 'repository' %> |
|
| 10 |
|
|
| 11 |
<div class="box tabular"> |
|
| 12 |
|
|
| 13 |
<p> |
|
| 14 |
<% if @repository %> |
|
| 15 |
<%= l(:text_settings_repo_explanation) %></ br> |
|
| 16 |
<% if @repository.is_external %> |
|
| 17 |
<p><%= l(:text_settings_repo_is_external) %></ br> |
|
| 18 |
<% else %> |
|
| 19 |
<p><%= l(:text_settings_repo_is_internal) %></ br> |
|
| 20 |
<% end %> |
|
| 21 |
</p> |
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
<p> |
|
| 28 |
<%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
|
|
| 29 |
<%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %> |
|
| 30 |
<br/><em><%= l(:setting_external_repository) %></em> |
|
| 31 |
</p> |
|
| 32 |
|
|
| 33 |
|
|
| 34 |
<p> |
|
| 35 |
<%= label_tag('repository_external_url', l(:label_repository_external_url)) %>
|
|
| 36 |
<%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %> |
|
| 37 |
<br/><em><%= l(:setting_external_repository_url) %></em> |
|
| 38 |
</p> |
|
| 39 |
|
|
| 40 |
<p><%= l(:text_settings_repo_need_help) %></p> |
|
| 41 |
|
|
| 42 |
</div> |
|
| 43 |
|
|
| 44 |
<div class="contextual"> |
|
| 45 |
<% if @repository && !@repository.new_record? %> |
|
| 46 |
<%= link_to(l(:label_user_plural), |
|
| 47 |
{
|
|
| 48 |
:controller => 'repositories', |
|
| 49 |
:action => 'committers', |
|
| 50 |
:id => @project |
|
| 51 |
}, |
|
| 52 |
:class => 'icon icon-user') %> |
|
| 53 |
<% end %> |
|
| 54 |
</div> |
|
| 55 |
|
|
| 56 |
<%= submit_tag(l(:button_save), :onclick => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")) %>
|
|
| 57 |
|
|
| 58 |
<% else %> |
|
| 59 |
<%= l(:text_settings_repo_creation) %></ br> |
|
| 60 |
<% end %> |
|
| 61 |
|
|
| 62 |
<% end %> |
|
| app/views/projects/settings/_repository.rhtml | ||
|---|---|---|
| 1 |
|
|
| 2 |
<%= javascript_include_tag 'repository' %> |
|
| 3 |
|
|
| 4 |
<% remote_form_for :repository, @repository, |
|
| 5 |
:url => { :controller => 'repositories', :action => 'edit', :id => @project },
|
|
| 6 |
:builder => TabularFormBuilder, |
|
| 7 |
:lang => current_language do |f| %> |
|
| 8 |
|
|
| 9 |
<%= error_messages_for 'repository' %> |
|
| 10 |
|
|
| 11 |
<div class="box tabular"> |
|
| 12 |
|
|
| 13 |
<p> |
|
| 14 |
<% if @repository %> |
|
| 15 |
<%= l(:text_settings_repo_explanation) %></ br> |
|
| 16 |
<% if @repository.is_external %> |
|
| 17 |
<p><%= l(:text_settings_repo_is_external) %></ br> |
|
| 18 |
<% else %> |
|
| 19 |
<p><%= l(:text_settings_repo_is_internal) %></ br> |
|
| 20 |
<% end %> |
|
| 21 |
</p> |
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
<p> |
|
| 28 |
<%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
|
|
| 29 |
<%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %> |
|
| 30 |
<br/><em><%= l(:setting_external_repository) %></em> |
|
| 31 |
</p> |
|
| 32 |
|
|
| 33 |
|
|
| 34 |
<p> |
|
| 35 |
<%= label_tag('repository_external_url', l(:label_repository_external_url)) %>
|
|
| 36 |
<%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %> |
|
| 37 |
<br/><em><%= l(:setting_external_repository_url) %></em> |
|
| 38 |
</p> |
|
| 39 |
|
|
| 40 |
<p><%= l(:text_settings_repo_need_help) %></p> |
|
| 41 |
|
|
| 42 |
</div> |
|
| 43 |
|
|
| 44 |
<div class="contextual"> |
|
| 45 |
<% if @repository && !@repository.new_record? %> |
|
| 46 |
<%= link_to(l(:label_user_plural), |
|
| 47 |
{
|
|
| 48 |
:controller => 'repositories', |
|
| 49 |
:action => 'committers', |
|
| 50 |
:id => @project |
|
| 51 |
}, |
|
| 52 |
:class => 'icon icon-user') %> |
|
| 53 |
<% end %> |
|
| 54 |
</div> |
|
| 55 |
|
|
| 56 |
<%= submit_tag(l(:button_save), :onclick => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")) %>
|
|
| 57 |
|
|
| 58 |
<% else %> |
|
| 59 |
<%= l(:text_settings_repo_creation) %></ br> |
|
| 60 |
<% end %> |
|
| 61 |
|
|
| 62 |
<% end %> |
|
| app/views/projects/settings/_versions.html.erb | ||
|---|---|---|
| 1 |
<% if @project.shared_versions.any? %> |
|
| 2 |
<table class="list versions"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_version) %></th> |
|
| 5 |
<th><%= l(:field_effective_date) %></th> |
|
| 6 |
<th><%= l(:field_description) %></th> |
|
| 7 |
<th><%= l(:field_status) %></th> |
|
| 8 |
<th><%= l(:field_sharing) %></th> |
|
| 9 |
<th><%= l(:label_wiki_page) %></th> |
|
| 10 |
<th style="width:15%"></th> |
|
| 11 |
</tr></thead> |
|
| 12 |
<tbody> |
|
| 13 |
<% for version in @project.shared_versions.sort %> |
|
| 14 |
<tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>"> |
|
| 15 |
<td class="name"><%= link_to_version version %></td> |
|
| 16 |
<td class="date"><%= format_date(version.effective_date) %></td> |
|
| 17 |
<td class="description"><%=h version.description %></td> |
|
| 18 |
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
|
| 19 |
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td> |
|
| 20 |
<td><%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
|
|
| 21 |
<td class="buttons"> |
|
| 22 |
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %> |
|
| 23 |
<%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %> |
|
| 24 |
<%= link_to l(:button_delete), version_path(version), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %> |
|
| 25 |
<% end %> |
|
| 26 |
</td> |
|
| 27 |
</tr> |
|
| 28 |
<% end; reset_cycle %> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
<% else %> |
|
| 32 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 33 |
<% end %> |
|
| 34 |
|
|
| 35 |
<div class="contextual"> |
|
| 36 |
<% if @project.versions.any? %> |
|
| 37 |
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %> |
|
| 38 |
<% end %> |
|
| 39 |
</div> |
|
| 40 |
|
|
| 41 |
<p><%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %></p> |
|
| app/views/projects/settings/_versions.rhtml | ||
|---|---|---|
| 1 |
<% if @project.shared_versions.any? %> |
|
| 2 |
<table class="list versions"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th><%= l(:label_version) %></th> |
|
| 5 |
<th><%= l(:field_effective_date) %></th> |
|
| 6 |
<th><%= l(:field_description) %></th> |
|
| 7 |
<th><%= l(:field_status) %></th> |
|
| 8 |
<th><%= l(:field_sharing) %></th> |
|
| 9 |
<th><%= l(:label_wiki_page) %></th> |
|
| 10 |
<th style="width:15%"></th> |
|
| 11 |
</tr></thead> |
|
| 12 |
<tbody> |
|
| 13 |
<% for version in @project.shared_versions.sort %> |
|
| 14 |
<tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>"> |
|
| 15 |
<td class="name"><%= link_to_version version %></td> |
|
| 16 |
<td class="date"><%= format_date(version.effective_date) %></td> |
|
| 17 |
<td class="description"><%=h version.description %></td> |
|
| 18 |
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
|
| 19 |
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td> |
|
| 20 |
<td><%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
|
|
| 21 |
<td class="buttons"> |
|
| 22 |
<% if version.project == @project %> |
|
| 23 |
<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
|
|
| 24 |
<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
|
|
| 25 |
<% end %> |
|
| 26 |
</td> |
|
| 27 |
</tr> |
|
| 28 |
<% end; reset_cycle %> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
<% else %> |
|
| 32 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 33 |
<% end %> |
|
| 34 |
|
|
| 35 |
<div class="contextual"> |
|
| 36 |
<% if @project.versions.any? %> |
|
| 37 |
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %> |
|
| 38 |
<% end %> |
|
| 39 |
</div> |
|
| 40 |
|
|
| 41 |
<p><%= link_to_if_authorized l(:label_version_new), :controller => 'versions', :action => 'new', :project_id => @project %></p> |
|
| app/views/projects/settings/_wiki.html.erb | ||
|---|---|---|
| 1 |
<% remote_form_for :wiki, @wiki, |
|
| 2 |
:url => { :controller => 'wikis', :action => 'edit', :id => @project },
|
|
| 3 |
:builder => TabularFormBuilder, |
|
| 4 |
:lang => current_language do |f| %> |
|
| 5 |
|
|
| 6 |
<%= error_messages_for 'wiki' %> |
|
| 7 |
|
|
| 8 |
<div class="box tabular"> |
|
| 9 |
<p><%= f.text_field :start_page, :size => 60, :required => true %><br /> |
|
| 10 |
<em><%= l(:text_unallowed_characters) %>: , . / ? ; : |</em></p> |
|
| 11 |
</div> |
|
| 12 |
|
|
| 13 |
<div class="contextual"> |
|
| 14 |
<%= link_to(l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project},
|
|
| 15 |
:class => 'icon icon-del') if @wiki && !@wiki.new_record? %> |
|
| 16 |
</div> |
|
| 17 |
|
|
| 18 |
<%= submit_tag((@wiki.nil? || @wiki.new_record?) ? l(:button_create) : l(:button_save)) %> |
|
| 19 |
<% end %> |
|
| app/views/projects/settings/_wiki.rhtml | ||
|---|---|---|
| 1 |
<% remote_form_for :wiki, @wiki, |
|
| 2 |
:url => { :controller => 'wikis', :action => 'edit', :id => @project },
|
|
| 3 |
:builder => TabularFormBuilder, |
|
| 4 |
:lang => current_language do |f| %> |
|
| 5 |
|
|
| 6 |
<%= error_messages_for 'wiki' %> |
|
| 7 |
|
|
| 8 |
<div class="box tabular"> |
|
| 9 |
<p><%= f.text_field :start_page, :size => 60, :required => true %><br /> |
|
| 10 |
<em><%= l(:text_unallowed_characters) %>: , . / ? ; : |</em></p> |
|
| 11 |
</div> |
|
| 12 |
|
|
| 13 |
<div class="contextual"> |
|
| 14 |
<%= link_to(l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project},
|
|
| 15 |
:class => 'icon icon-del') if @wiki && !@wiki.new_record? %> |
|
| 16 |
</div> |
|
| 17 |
|
|
| 18 |
<%= submit_tag((@wiki.nil? || @wiki.new_record?) ? l(:button_create) : l(:button_save)) %> |
|
| 19 |
<% end %> |
|
Also available in: Unified diff