Revision 1298:4f746d8966dd app/views/projects

View differences:

app/views/projects/_form.html.erb
7 7
  <em class="info"> <%= l(:text_project_name_info).html_safe %></em>
8 8
</p>
9 9

  
10
<% unless @project.allowed_parents.compact.empty? %>
11
    <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p>
12
<% end %>
13

  
14
<p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p>
15
<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen? %>
10
<p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %></p>
11
<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
16 12
<% unless @project.identifier_frozen? %>
17 13
  <br />
18 14
  <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
......
36 32
<br>
37 33
  <em class="info"><%= l(:text_project_visibility_info) %></em>
38 34
</p>
35

  
36
<% unless @project.allowed_parents.compact.empty? %>
37
    <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p>
38
<% end %>
39

  
40
<% if @project.safe_attribute? 'inherit_members' %>
41
<p><%= f.check_box :inherit_members %></p>
42
<% end %>
43

  
39 44
<%= wikitoolbar_for 'project_description' %>
40 45

  
41 46
<% @project.custom_field_values.each do |value| %>
......
88 93
<% end %>
89 94
<% end %>
90 95
<!--[eoform:project]-->
96

  
97
<% unless @project.identifier_frozen? %>
98
  <% content_for :header_tags do %>
99
    <%= javascript_include_tag 'project_identifier' %>
100
  <% end %>
101
<% end %>
102

  
103
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
104
  <%= javascript_tag do %>
105
    $(document).ready(function() {
106
      $("#project_inherit_members").change(function(){
107
        if (!$(this).is(':checked')) {
108
          if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
109
            $("#project_inherit_members").attr("checked", true);
110
          }
111
        }
112
      });
113
    });
114
  <% end %>
115
<% end %>
app/views/projects/settings/_members.html.erb
1 1
<%= error_messages_for 'member' %>
2 2
<% roles = Role.find_all_givable
3
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
3
   members = @project.member_principals.includes(:roles, :principal).all.sort %>
4 4

  
5 5
<div class="splitcontentleft">
6 6
<% if members.any? %>
......
51 51
<% end %>
52 52
</div>
53 53

  
54
<% principals = Principal.active.not_member_of(@project).all(:limit => 100, :order => 'type, login, lastname ASC') %>
55

  
56 54
<div class="splitcontentright">
57
<% if roles.any? && principals.any? %>
55
<% if roles.any? %>
58 56
  <%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
59 57
    <fieldset><legend><%=l(:label_member_new)%></legend>
60 58

  
61 59
    <p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
62
    <%= javascript_tag "observeSearchfield('principal_search', 'principals', '#{ escape_javascript autocomplete_project_memberships_path(@project) }')" %>
60
    <%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
63 61

  
64
    <div id="principals">
65
      <%= principals_check_box_tags 'membership[user_ids][]', principals %>
62
    <div id="principals_for_new_member">
63
      <%= render_principals_for_new_members(@project) %>
66 64
    </div>
67 65

  
68 66
    <p><%= l(:label_role_plural) %>:
app/views/projects/settings/_modules.html.erb
3 3
            :html => {:id => 'modules-form',
4 4
                      :method => :post} do |f| %>
5 5

  
6
<div class="box">
7
<fieldset>
6
<fieldset class="box">
8 7
<legend><%= l(:text_select_project_modules) %></legend>
9 8

  
10 9
<% Redmine::AccessControl.available_project_modules.each do |m| %>
......
12 11
 <%= l_or_humanize(m, :prefix => "project_module_") %></label></p>
13 12
<% end %>
14 13
</fieldset>
15
</div>
14
<p><%= check_all_links 'modules-form' %></p>
16 15

  
17
<p><%= check_all_links 'modules-form' %></p>
18 16
<p><%= submit_tag l(:button_save) %></p>
19 17

  
20 18
<% end %>
app/views/projects/show.html.erb
1 1
<div class="contextual">
2 2
  <% if User.current.allowed_to?(:add_subprojects, @project) %>
3
    <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
3
    <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
4 4
  <% end %>
5 5
  <% if User.current.allowed_to?(:close_project, @project) %>
6 6
    <% if @project.active? %>
......
57 57
  <% end %>
58 58
  <% if @subprojects.any? %>
59 59
    <li><%=l(:label_subproject_plural)%>:
60
      <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
60
      <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li>
61 61
  <% end %>
62 62
  <% @project.visible_custom_field_values.each do |custom_value| %>
63 63
  <% if !custom_value.value.blank? %>
......
72 72
    <h3><%=l(:label_issue_tracking)%></h3>
73 73
    <ul>
74 74
    <% for tracker in @trackers %>
75
      <li><%= link_to h(tracker.name), :controller => 'issues', :action => 'index', :project_id => @project,
76
                                                :set_filter => 1,
77
                                                "tracker_id" => tracker.id %>:
75
      <li><%= link_to h(tracker.name), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>:
78 76
          <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
79 77
                                                    :total => @total_issues_by_tracker[tracker].to_i) %>
80 78
      </li>
81 79
    <% end %>
82 80
    </ul>
83 81
    <p>
84
      <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
82
      <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
85 83
      <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
86
        | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
84
        | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
87 85
      <% end %>
88 86
      <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
89
        | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
87
        | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
90 88
      <% end %>
91 89
    </p>
92 90
  </div>
......
103 101
  <div class="news box">
104 102
    <h3><%=l(:label_news_latest)%></h3>
105 103
    <%= render :partial => 'news/news', :collection => @news %>
106
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
104
    <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
107 105
  </div>
108 106
  <% end %>
109 107

  

Also available in: Unified diff