Revision 443:350acce374a2 app/views/projects

View differences:

app/views/projects/settings/_members.rhtml
2 2
<% roles = Role.find_all_givable
3 3
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
4 4

  
5

  
5 6
<div class="splitcontentleft">
6 7
<% if members.any? %>
7 8
<table class="list members">
......
73 74
		<% end %>
74 75
		</div>
75 76
		
76
    <p><%= l(:label_role_plural) %>:
77
    <p><%= l(:label_set_role_plural) %>:</p>
77 78
    <% roles.each do |role| %>
78
    	<label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %></label>
79
   	<% end %></p>
79
    	<label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %> </label><div style="margin-left: 2em; margin-bottom: 0.5em"><i><%=l( 'label_' + role.name.downcase + "_description").to_sym %></i></div>
80
   	<% end %>
80 81
   	
81 82
    <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
82 83
		</fieldset>
app/views/projects/settings/_overview.rhtml
1

  
2
<% form_for :project, @project,
3
            :url => { :action => 'overview', :id => @project },
4
            :html => {:id => 'overview-form'} do |f| %>
5

  
6
<div class="box tabular">
7

  
8
<p><%= l(:text_has_welcome_page_info, { :overview_link => link_to(l(:label_overview), { :controller => 'projects', :action => 'show' } ) } ) %></p>
9

  
10
<% if @project.module_enabled? :wiki %>
11

  
12
<p><%= link_to(l(:button_welcome_page_edit), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
13

  
14
<% else %>
15

  
16
<p><%= l(:text_has_welcome_page_wiki_disabled, { :modules_link => link_to(l(:label_module_plural), { :controller => 'projects', :action => 'settings', :tab => 'modules' } ) } ) %></p>
17

  
18
<% end %>
19

  
20
<p><label for="has_welcome_page"><%= l(:label_has_welcome_page) %></label>
21
<%= check_box_tag 'has_welcome_page', 1, @project.has_welcome_page? -%>
22
<br/><em><%= l(:setting_has_welcome_page) %></em>
23

  
24
</p>
25

  
26
</div>
27

  
28
<%= submit_tag l(:button_save) %>
29

  
30
<% end %>
app/views/projects/settings/_repository.rhtml
1

  
2
<%= javascript_include_tag 'repository' %>
3

  
1 4
<% remote_form_for :repository, @repository,
2 5
                   :url => { :controller => 'repositories', :action => 'edit', :id => @project },
3 6
                   :builder => TabularFormBuilder,
......
6 9
<%= error_messages_for 'repository' %>
7 10

  
8 11
<div class="box tabular">
9
<% if !@repository || !@repository.url %>
10
<ul><li><%= l(:text_settings_repo_creation) %></li></ul>
11
<% end %>
12
<p><%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %></p>
13
<%= repository_field_tags(f, @repository) if @repository %>
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

  
14 42
</div>
15 43

  
16 44
<div class="contextual">
......
22 50
                :id         => @project
23 51
                },
24 52
             :class => 'icon icon-user') %>
25
<%= link_to(l(:button_delete), {:controller => 'repositories', :action => 'destroy', :id => @project},
26
            :confirm => l(:text_are_you_sure),
27
            :method  => :post,
28
            :class   => 'icon icon-del') %>
29 53
<% end %>
30 54
</div>
31 55

  
32
<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save), :disabled => @repository.nil?) %>
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>
33 60
<% end %>
61

  
62
<% end %>
app/views/projects/show.rhtml
4 4
	<% end %>
5 5
</div>
6 6

  
7
<% if @project.has_welcome_page %>
8
<% page = @project.wiki.find_page("Overview") %>
9
<% end %>
10

  
11
<% if page %>
12

  
13
<div class="contextual" style="clear: right">
14
<ul>
15
<% @users_by_role.keys.sort.each do |role| %>
16
<li><%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %></li>
17
<% end %>
18
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
19
<% if @subprojects.any? %>
20
	<li><%=l(:label_subproject_plural)%>:
21
	    <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
22
<% end %>
23
</ul>
24
</div>
25

  
26
<%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
27

  
28
<% else %>
29

  
7 30
<h2><%=l(:label_overview)%></h2> 
8 31
	
9 32
<div class="splitcontentleft">
......
23 46
	<% end %>
24 47
	</ul>	
25 48

  
26
  <% if User.current.allowed_to?(:view_issues, @project) %>
49
  <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
50

  
27 51
  <div class="issues box">    
28 52
    <h3><%=l(:label_issue_tracking)%></h3>
29 53
    <ul>
......
46 70
			<% end %>
47 71
		</p>
48 72
  </div>
73

  
49 74
  <% end %>
75

  
50 76
  <%= call_hook(:view_projects_show_left, :project => @project) %>
51 77
</div>
52 78

  
......
60 86
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
61 87
  </div>  
62 88
  <% end %>
89

  
90
  <%= render :partial => 'activities/recent' %>
91

  
63 92
  <%= call_hook(:view_projects_show_right, :project => @project) %>
64 93
</div>
65 94

  
......
73 102
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
74 103
<% end %>
75 104

  
105
<% end %>
106

  
76 107
<% content_for :header_tags do %>
77 108
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
78 109
<% end %>

Also available in: Unified diff