Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
4
app/views/projects/_edit.html.erb
Normal file
4
app/views/projects/_edit.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<%= labelled_form_for @project, :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
110
app/views/projects/_form.html.erb
Normal file
110
app/views/projects/_form.html.erb
Normal file
|
@ -0,0 +1,110 @@
|
|||
<%= error_messages_for 'project' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<!--[form:project]-->
|
||||
<p><%= f.text_field :name, :required => true, :size => 60 %></p>
|
||||
|
||||
<p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %></p>
|
||||
<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
|
||||
<% end %></p>
|
||||
<p><%= f.text_field :homepage, :size => 60 %></p>
|
||||
<p><%= f.check_box :is_public %></p>
|
||||
|
||||
<% unless @project.allowed_parents.compact.empty? %>
|
||||
<p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.safe_attribute? 'inherit_members' %>
|
||||
<p><%= f.check_box :inherit_members %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.safe_attribute?('default_version_id') && (default_version_options = project_default_version_options(@project)).present? %>
|
||||
<p><%= f.select :default_version_id, project_default_version_options(@project), :include_blank => true %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.safe_attribute?('default_assigned_to_id') && (default_assigned_to_options = project_default_assigned_to_options(@project)).present? %>
|
||||
<p><%= f.select :default_assigned_to_id, default_assigned_to_options, include_blank: true %></p>
|
||||
<% end %>
|
||||
|
||||
<%= wikitoolbar_for 'project_description' %>
|
||||
|
||||
<% @project.custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :project, value %></p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
|
||||
</div>
|
||||
|
||||
<% if @project.new_record? && @project.safe_attribute?('enabled_module_names') %>
|
||||
<fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend>
|
||||
<% Redmine::AccessControl.available_project_modules.each do |m| %>
|
||||
<label class="floating">
|
||||
<%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %>
|
||||
<%= l_or_humanize(m, :prefix => "project_module_") %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% if @project.new_record? || @project.module_enabled?('issue_tracking') %>
|
||||
<% unless @trackers.empty? %>
|
||||
<fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<label class="floating">
|
||||
<%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
|
||||
<%= tracker %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'project[tracker_ids][]', '' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% unless @issue_custom_fields.empty? %>
|
||||
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
|
||||
<% @issue_custom_fields.each do |custom_field| %>
|
||||
<label class="floating">
|
||||
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
|
||||
:disabled => (custom_field.is_for_all? ? "disabled" : nil),
|
||||
:id => nil %>
|
||||
<%= custom_field_name_tag(custom_field) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--[eoform:project]-->
|
||||
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'project_identifier' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function() {
|
||||
$("#project_inherit_members").change(function(){
|
||||
if (!$(this).is(':checked')) {
|
||||
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
|
||||
$("#project_inherit_members").attr("checked", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function() {
|
||||
$('#project_enabled_module_names_issue_tracking').on('change', function(){
|
||||
if ($(this).prop('checked')){
|
||||
$('#project_trackers, #project_issue_custom_fields').show();
|
||||
} else {
|
||||
$('#project_trackers, #project_issue_custom_fields').hide();
|
||||
}
|
||||
}).trigger('change');
|
||||
});
|
||||
<% end %>
|
8
app/views/projects/_members_box.html.erb
Normal file
8
app/views/projects/_members_box.html.erb
Normal file
|
@ -0,0 +1,8 @@
|
|||
<% if @users_by_role.any? %>
|
||||
<div class="members box">
|
||||
<h3 class="icon icon-group"><%=l(:label_member_plural)%></h3>
|
||||
<% @users_by_role.keys.sort.each do |role| %>
|
||||
<p><span class="label"><%= role %>:</span> <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ").html_safe %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
9
app/views/projects/autocomplete.js.erb
Normal file
9
app/views/projects/autocomplete.js.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
<%
|
||||
s = ''
|
||||
if @projects.any?
|
||||
s = render_projects_for_jump_box(@projects)
|
||||
elsif params[:q].present?
|
||||
s = content_tag('span', l(:label_no_data))
|
||||
end
|
||||
%>
|
||||
$('#project-jump .drdn-items.projects').html('<%= escape_javascript s %>');
|
20
app/views/projects/copy.html.erb
Normal file
20
app/views/projects/copy.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<h2><%=l(:label_project_new)%></h2>
|
||||
|
||||
<%= labelled_form_for @project, :url => { :action => "copy" } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
|
||||
<fieldset class="box tabular"><legend><%= l(:button_copy) %></legend>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'members', true, :id => nil %> <%= l(:label_member_plural) %> (<%= @source_project.members.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'versions', true, :id => nil %> <%= l(:label_version_plural) %> (<%= @source_project.versions.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'issue_categories', true, :id => nil %> <%= l(:label_issue_category_plural) %> (<%= @source_project.issue_categories.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'issues', true, :id => nil %> <%= l(:label_issue_plural) %> (<%= @source_project.issues.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'queries', true, :id => nil %> <%= l(:label_query_plural) %> (<%= @source_project.queries.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'boards', true, :id => nil %> <%= l(:label_board_plural) %> (<%= @source_project.boards.count %>)</label>
|
||||
<label class="block"><%= check_box_tag 'only[]', 'wiki', true, :id => nil %> <%= l(:label_wiki_page_plural) %> (<%= @source_project.wiki.nil? ? 0 : @source_project.wiki.pages.count %>)</label>
|
||||
<%= hidden_field_tag 'only[]', '' %>
|
||||
<br />
|
||||
<label class="block"><%= check_box_tag 'notifications', 1, params[:notifications] %> <%= l(:label_project_copy_notifications) %></label>
|
||||
</fieldset>
|
||||
|
||||
<%= submit_tag l(:button_copy) %>
|
||||
<% end %>
|
24
app/views/projects/destroy.html.erb
Normal file
24
app/views/projects/destroy.html.erb
Normal file
|
@ -0,0 +1,24 @@
|
|||
<%= title l(:label_confirmation) %>
|
||||
|
||||
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
|
||||
<div class="warning">
|
||||
<p><strong><%=h @project_to_destroy %></strong></p>
|
||||
|
||||
<p>
|
||||
<%=l(:text_project_destroy_confirmation)%>
|
||||
<% if @project_to_destroy.descendants.any? %>
|
||||
<br />
|
||||
<%= l(:text_subprojects_destroy_warning,
|
||||
content_tag('strong', @project_to_destroy.descendants.collect{|p| p.to_s}.join(', '))).html_safe %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<%= submit_tag l(:button_delete) %>
|
||||
<%= link_to l(:button_cancel), :controller => 'admin', :action => 'projects' %>
|
||||
</p>
|
||||
<% end %>
|
19
app/views/projects/index.api.rsb
Normal file
19
app/views/projects/index.api.rsb
Normal file
|
@ -0,0 +1,19 @@
|
|||
api.array :projects, api_meta(:total_count => @project_count, :offset => @offset, :limit => @limit) do
|
||||
@projects.each do |project|
|
||||
api.project do
|
||||
api.id project.id
|
||||
api.name project.name
|
||||
api.identifier project.identifier
|
||||
api.description project.description
|
||||
api.parent(:id => project.parent.id, :name => project.parent.name) if project.parent && project.parent.visible?
|
||||
api.status project.status
|
||||
api.is_public project.is_public?
|
||||
|
||||
render_api_custom_values project.visible_custom_field_values, api
|
||||
render_api_includes(project, api)
|
||||
|
||||
api.created_on project.created_on
|
||||
api.updated_on project.updated_on
|
||||
end
|
||||
end
|
||||
end
|
31
app/views/projects/index.html.erb
Normal file
31
app/views/projects/index.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<label for="closed">
|
||||
<%= check_box_tag 'closed', 1, params[:closed], :onchange => "this.form.submit();" %>
|
||||
<%= l(:label_show_closed_projects) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= render_project_action_links %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_project_plural) %></h2>
|
||||
|
||||
<div id="projects-index">
|
||||
<%= render_project_hierarchy(@projects) %>
|
||||
</div>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<p style="text-align:right;">
|
||||
<span class="icon icon-fav my-project"><%= l(:label_my_projects) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
7
app/views/projects/new.html.erb
Normal file
7
app/views/projects/new.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<%= title l(:label_project_new) %>
|
||||
|
||||
<%= labelled_form_for @project, :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<% end %>
|
5
app/views/projects/settings.html.erb
Normal file
5
app/views/projects/settings.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h2><%=l(:label_settings)%></h2>
|
||||
|
||||
<%= render_tabs project_settings_tabs %>
|
||||
|
||||
<% html_title(l(:label_settings)) -%>
|
42
app/views/projects/settings/_activities.html.erb
Normal file
42
app/views/projects/settings/_activities.html.erb
Normal file
|
@ -0,0 +1,42 @@
|
|||
<%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th><%= l(:enumeration_system_activity) %></th>
|
||||
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
|
||||
<th><%= value.name %></th>
|
||||
<% end %>
|
||||
<th><%= l(:field_active) %></th>
|
||||
</tr></thead>
|
||||
|
||||
<% @project.activities(true).each do |enumeration| %>
|
||||
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
|
||||
<%= enumeration %>
|
||||
</td>
|
||||
<td class="tick"><%= checked_image !enumeration.project %></td>
|
||||
<% enumeration.custom_field_values.each do |value| %>
|
||||
<td>
|
||||
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td>
|
||||
<%= ff.check_box :active %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:button_reset), project_enumerations_path(@project),
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'icon icon-del') %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
33
app/views/projects/settings/_boards.html.erb
Normal file
33
app/views/projects/settings/_boards.html.erb
Normal file
|
@ -0,0 +1,33 @@
|
|||
<% if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<p><%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.boards.any? %>
|
||||
<div class="table-list boards">
|
||||
<div class="table-list-header">
|
||||
<div class="table-list-cell"><%= l(:label_board) %></div>
|
||||
</div>
|
||||
<%= render_boards_tree(@project.boards) do |board, level| %>
|
||||
<div class="table-list-row">
|
||||
<div class="table-list-cell name" style="padding-left: <%= 2 + level * 16 %>px">
|
||||
<%= link_to board.name, project_board_path(@project, board) %>
|
||||
</div>
|
||||
<div class="table-list-cell description"><%= board.description %></div>
|
||||
<div class="table-list-cell buttons">
|
||||
<% if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<%= reorder_handle(board) %>
|
||||
<%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
|
||||
<%= delete_link project_board_path(@project, board) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(function() { $("div.sort-level").positionedItems(); });
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
29
app/views/projects/settings/_issue_categories.html.erb
Normal file
29
app/views/projects/settings/_issue_categories.html.erb
Normal file
|
@ -0,0 +1,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>
|
||||
|
||||
<% if @project.issue_categories.any? %>
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%= l(:label_issue_category) %></th>
|
||||
<th><%= l(:field_assigned_to) %></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for category in @project.issue_categories %>
|
||||
<% unless category.new_record? %>
|
||||
<tr>
|
||||
<td class="name"><%= category.name %></td>
|
||||
<td><%= category.assigned_to.name if category.assigned_to %></td>
|
||||
<td class="buttons">
|
||||
<% if User.current.allowed_to?(:manage_categories, @project) %>
|
||||
<%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %>
|
||||
<%= delete_link issue_category_path(category) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
40
app/views/projects/settings/_members.html.erb
Normal file
40
app/views/projects/settings/_members.html.erb
Normal file
|
@ -0,0 +1,40 @@
|
|||
<% members = @project.memberships.sorted.to_a %>
|
||||
|
||||
<p><%= link_to l(:label_member_new), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
|
||||
|
||||
<% if members.any? %>
|
||||
<table class="list members">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= l(:label_user) %> / <%= l(:label_group) %></th>
|
||||
<th><%= l(:label_role_plural) %></th>
|
||||
<th style="width:15%"></th>
|
||||
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% members.each do |member| %>
|
||||
<% next if member.new_record? %>
|
||||
<tr id="member-<%= member.id %>" class="member">
|
||||
<td class="name icon icon-<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
|
||||
<td class="roles">
|
||||
<span id="member-<%= member.id %>-roles"><%= member.roles.sort.collect(&:to_s).join(', ') %></span>
|
||||
<div id="member-<%= member.id %>-form"></div>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to l(:button_edit),
|
||||
edit_membership_path(member),
|
||||
:remote => true,
|
||||
:class => 'icon icon-edit' %>
|
||||
<%= delete_link membership_path(member),
|
||||
:remote => true,
|
||||
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {}) if member.deletable? %>
|
||||
</td>
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
18
app/views/projects/settings/_modules.html.erb
Normal file
18
app/views/projects/settings/_modules.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<%= form_for @project,
|
||||
:url => { :action => 'modules', :id => @project },
|
||||
:html => {:id => 'modules-form',
|
||||
:method => :post} do |f| %>
|
||||
|
||||
<fieldset class="box">
|
||||
<legend><%= l(:text_select_project_modules) %></legend>
|
||||
|
||||
<% Redmine::AccessControl.available_project_modules.each do |m| %>
|
||||
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m), :id => nil -%>
|
||||
<%= l_or_humanize(m, :prefix => "project_module_") %></label></p>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<p><%= check_all_links 'modules-form' %></p>
|
||||
|
||||
<p><%= submit_tag l(:button_save) %></p>
|
||||
|
||||
<% end %>
|
41
app/views/projects/settings/_repositories.html.erb
Normal file
41
app/views/projects/settings/_repositories.html.erb
Normal file
|
@ -0,0 +1,41 @@
|
|||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.repositories.any? %>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= l(:field_identifier) %></th>
|
||||
<th><%= l(:field_repository_is_default) %></th>
|
||||
<th><%= l(:label_scm) %></th>
|
||||
<th><%= l(:label_repository) %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @project.repositories.sort.each do |repository| %>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= link_to repository.identifier,
|
||||
{:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
|
||||
</td>
|
||||
<td><%= checked_image repository.is_default? %></td>
|
||||
<td><%= repository.scm_name %></td>
|
||||
<td><%= repository.url %></td>
|
||||
<td class="buttons">
|
||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
||||
:class => 'icon icon-user') %>
|
||||
<%= link_to(l(:button_edit), edit_repository_path(repository),
|
||||
:class => 'icon icon-edit') %>
|
||||
<%= delete_link repository_path(repository) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
53
app/views/projects/settings/_versions.html.erb
Normal file
53
app/views/projects/settings/_versions.html.erb
Normal file
|
@ -0,0 +1,53 @@
|
|||
<p><%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %></p>
|
||||
|
||||
<%= form_tag(settings_project_path(@project, :tab => 'versions'), :method => :get) do %>
|
||||
<fieldset><legend><%= l(:label_filter_plural) %></legend>
|
||||
<label for='status'><%= l(:field_status) %>:</label>
|
||||
<%= select_tag 'version_status', options_for_select([[l(:label_all), '']] + Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, @version_status), :onchange => "this.form.submit(); return false;" %>
|
||||
<label for='name'><%= l(:label_version) %>:</label>
|
||||
<%= text_field_tag 'version_name', @version_name, :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :name => nil %>
|
||||
<%= link_to l(:button_clear), settings_project_path(@project, :tab => 'versions'), :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% if @versions.present? %>
|
||||
<table class="list versions">
|
||||
<thead><tr>
|
||||
<th><%= l(:label_version) %></th>
|
||||
<th><%= l(:field_effective_date) %></th>
|
||||
<th><%= l(:field_description) %></th>
|
||||
<th><%= l(:field_status) %></th>
|
||||
<th><%= l(:field_sharing) %></th>
|
||||
<th><%= l(:label_wiki_page) %></th>
|
||||
<th style="width:15%"></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% @versions.sort.each do |version| %>
|
||||
<tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
|
||||
<td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
|
||||
<td class="date"><%= format_date(version.effective_date) %></td>
|
||||
<td class="description"><%= version.description %></td>
|
||||
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
||||
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
||||
<td><%= link_to_if_authorized(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>
|
||||
<td class="buttons">
|
||||
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
|
||||
<%= delete_link version_path(version) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
<div class="contextual">
|
||||
<% if @versions.any? %>
|
||||
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %>
|
||||
<% end %>
|
||||
</div>
|
19
app/views/projects/settings/_wiki.html.erb
Normal file
19
app/views/projects/settings/_wiki.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<%= labelled_form_for @wiki,
|
||||
:as => :wiki,
|
||||
:url => { :controller => 'wikis', :action => 'edit', :id => @project },
|
||||
:remote => true, :method => 'post' do |f| %>
|
||||
|
||||
<%= error_messages_for 'wiki' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :start_page, :size => 60, :required => true %>
|
||||
<em class="info"><%= l(:text_unallowed_characters) %>: , . / ? ; : |</em></p>
|
||||
</div>
|
||||
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project},
|
||||
:class => 'icon icon-del') if @wiki && !@wiki.new_record? %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag((@wiki.nil? || @wiki.new_record?) ? l(:button_create) : l(:button_save)) %>
|
||||
<% end %>
|
16
app/views/projects/show.api.rsb
Normal file
16
app/views/projects/show.api.rsb
Normal file
|
@ -0,0 +1,16 @@
|
|||
api.project do
|
||||
api.id @project.id
|
||||
api.name @project.name
|
||||
api.identifier @project.identifier
|
||||
api.description @project.description
|
||||
api.homepage @project.homepage
|
||||
api.parent(:id => @project.parent.id, :name => @project.parent.name) if @project.parent && @project.parent.visible?
|
||||
api.status @project.status
|
||||
api.is_public @project.is_public?
|
||||
|
||||
render_api_custom_values @project.visible_custom_field_values, api
|
||||
render_api_includes(@project, api)
|
||||
|
||||
api.created_on @project.created_on
|
||||
api.updated_on @project.updated_on
|
||||
end
|
129
app/views/projects/show.html.erb
Normal file
129
app/views/projects/show.html.erb
Normal file
|
@ -0,0 +1,129 @@
|
|||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:add_subprojects, @project) %>
|
||||
<%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:close_project, @project) %>
|
||||
<% if @project.active? %>
|
||||
<%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
|
||||
<% else %>
|
||||
<%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_overview)%></h2>
|
||||
|
||||
<% unless @project.active? %>
|
||||
<p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
|
||||
<% end %>
|
||||
|
||||
<div class="splitcontentleft">
|
||||
<% if @project.description.present? %>
|
||||
<div class="wiki">
|
||||
<%= textilizable @project.description %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
|
||||
<ul>
|
||||
<% unless @project.homepage.blank? %>
|
||||
<li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
|
||||
<% end %>
|
||||
<% render_custom_field_values(@project) do |custom_field, formatted| %>
|
||||
<li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:view_issues, @project) %>
|
||||
<div class="issues box">
|
||||
<h3 class="icon icon-issue"><%=l(:label_issue_tracking)%></h3>
|
||||
<% if @trackers.present? %>
|
||||
<table class="list issue-report">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%=l(:label_open_issues_plural)%></th>
|
||||
<th><%=l(:label_closed_issues_plural)%></th>
|
||||
<th><%=l(:label_total)%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => 'c') %>
|
||||
</td>
|
||||
<td class="total">
|
||||
<%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
|
||||
<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
|
||||
| <%= link_to l(:label_calendar), project_calendar_path(@project) %>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
|
||||
| <%= link_to l(:label_gantt), project_gantt_path(@project) %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
||||
<div class="spent_time box">
|
||||
<h3 class="icon icon-time"><%= l(:label_spent_time) %></h3>
|
||||
<% if @total_hours.present? %>
|
||||
<p><%= l_hours(@total_hours) %></p>
|
||||
<% end %>
|
||||
<p>
|
||||
<% if User.current.allowed_to?(:log_time, @project) %>
|
||||
<%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
|
||||
<% end %>
|
||||
<%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
|
||||
<%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= call_hook(:view_projects_show_left, :project => @project) %>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<%= render :partial => 'members_box' %>
|
||||
|
||||
<% if @news.any? && authorize_for('news', 'index') %>
|
||||
<div class="news box">
|
||||
<h3 class="icon icon-news"><%=l(:label_news_latest)%></h3>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
<p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @subprojects.any? %>
|
||||
<div class="projects box">
|
||||
<h3 class="icon icon-projects"><%=l(:label_subproject_plural)%></h3>
|
||||
<%= @subprojects.collect{|p| link_to p, project_path(p), :class => p.css_classes}.join(", ").html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_projects_show_right, :project => @project) %>
|
||||
</div>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_overview)) -%>
|
Loading…
Add table
Add a link
Reference in a new issue