##// END OF EJS Templates
Escapes HTML tags....
Jean-Philippe Lang -
r1598:9703f576d96c
parent child
Show More
@@ -1,28 +1,28
1 <h2><%=h @user.name %></h2>
1 <h2><%=h @user.name %></h2>
2
2
3 <p>
3 <p>
4 <%= mail_to @user.mail unless @user.pref.hide_mail %>
4 <%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %>
5 <ul>
5 <ul>
6 <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
6 <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
7 <% for custom_value in @custom_values %>
7 <% for custom_value in @custom_values %>
8 <% if !custom_value.value.empty? %>
8 <% if !custom_value.value.empty? %>
9 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
9 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
10 <% end %>
10 <% end %>
11 <% end %>
11 <% end %>
12 </ul>
12 </ul>
13 </p>
13 </p>
14
14
15 <% unless @memberships.empty? %>
15 <% unless @memberships.empty? %>
16 <h3><%=l(:label_project_plural)%></h3>
16 <h3><%=l(:label_project_plural)%></h3>
17 <ul>
17 <ul>
18 <% for membership in @memberships %>
18 <% for membership in @memberships %>
19 <li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %>
19 <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %>
20 (<%= membership.role.name %>, <%= format_date(membership.created_on) %>)</li>
20 (<%=h membership.role.name %>, <%= format_date(membership.created_on) %>)</li>
21 <% end %>
21 <% end %>
22 </ul>
22 </ul>
23 <% end %>
23 <% end %>
24
24
25 <h3><%=l(:label_activity)%></h3>
25 <h3><%=l(:label_activity)%></h3>
26 <p>
26 <p>
27 <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
27 <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
28 </p> No newline at end of file
28 </p>
@@ -1,80 +1,80
1 <h2><%=l(:label_overview)%></h2>
1 <h2><%=l(:label_overview)%></h2>
2
2
3 <div class="splitcontentleft">
3 <div class="splitcontentleft">
4 <%= textilizable @project.description %>
4 <%= textilizable @project.description %>
5 <ul>
5 <ul>
6 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
6 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
7 <% if @subprojects.any? %>
7 <% if @subprojects.any? %>
8 <li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(h(p.name), :action => 'show', :id => p)}.join(", ") %></li>
8 <li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(h(p.name), :action => 'show', :id => p)}.join(", ") %></li>
9 <% end %>
9 <% end %>
10 <% if @project.parent %>
10 <% if @project.parent %>
11 <li><%=l(:field_parent)%>: <%= link_to h(@project.parent.name), :controller => 'projects', :action => 'show', :id => @project.parent %></li>
11 <li><%=l(:field_parent)%>: <%= link_to h(@project.parent.name), :controller => 'projects', :action => 'show', :id => @project.parent %></li>
12 <% end %>
12 <% end %>
13 <% @project.custom_values.each do |custom_value| %>
13 <% @project.custom_values.each do |custom_value| %>
14 <% if !custom_value.value.empty? %>
14 <% if !custom_value.value.empty? %>
15 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
15 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
16 <% end %>
16 <% end %>
17 <% end %>
17 <% end %>
18 </ul>
18 </ul>
19
19
20 <% if User.current.allowed_to?(:view_issues, @project) %>
20 <% if User.current.allowed_to?(:view_issues, @project) %>
21 <div class="box">
21 <div class="box">
22 <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
22 <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
23 <ul>
23 <ul>
24 <% for tracker in @trackers %>
24 <% for tracker in @trackers %>
25 <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
25 <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
26 :set_filter => 1,
26 :set_filter => 1,
27 "tracker_id" => tracker.id %>:
27 "tracker_id" => tracker.id %>:
28 <%= @open_issues_by_tracker[tracker] || 0 %> <%= lwr(:label_open_issues, @open_issues_by_tracker[tracker] || 0) %>
28 <%= @open_issues_by_tracker[tracker] || 0 %> <%= lwr(:label_open_issues, @open_issues_by_tracker[tracker] || 0) %>
29 <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li>
29 <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li>
30 <% end %>
30 <% end %>
31 </ul>
31 </ul>
32 <p><%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %></p>
32 <p><%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %></p>
33 </div>
33 </div>
34 <% end %>
34 <% end %>
35 </div>
35 </div>
36
36
37 <div class="splitcontentright">
37 <div class="splitcontentright">
38 <% if @members_by_role.any? %>
38 <% if @members_by_role.any? %>
39 <div class="box">
39 <div class="box">
40 <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
40 <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
41 <p><% @members_by_role.keys.sort.each do |role| %>
41 <p><% @members_by_role.keys.sort.each do |role| %>
42 <%= role.name %>:
42 <%= role.name %>:
43 <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %>
43 <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %>
44 <br />
44 <br />
45 <% end %></p>
45 <% end %></p>
46 </div>
46 </div>
47 <% end %>
47 <% end %>
48
48
49 <% if @news.any? && authorize_for('news', 'index') %>
49 <% if @news.any? && authorize_for('news', 'index') %>
50 <div class="box">
50 <div class="box">
51 <h3><%=l(:label_news_latest)%></h3>
51 <h3><%=l(:label_news_latest)%></h3>
52 <%= render :partial => 'news/news', :collection => @news %>
52 <%= render :partial => 'news/news', :collection => @news %>
53 <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
53 <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
54 </div>
54 </div>
55 <% end %>
55 <% end %>
56 </div>
56 </div>
57
57
58 <% content_for :sidebar do %>
58 <% content_for :sidebar do %>
59 <% planning_links = []
59 <% planning_links = []
60 planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :id => @project)
60 planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :id => @project)
61 planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :id => @project)
61 planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :id => @project)
62 planning_links.compact!
62 planning_links.compact!
63 unless planning_links.empty? %>
63 unless planning_links.empty? %>
64 <h3><%= l(:label_planning) %></h3>
64 <h3><%= l(:label_planning) %></h3>
65 <p><%= planning_links.join(' | ') %></p>
65 <p><%= planning_links.join(' | ') %></p>
66 <% end %>
66 <% end %>
67
67
68 <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
68 <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
69 <h3><%= l(:label_spent_time) %></h3>
69 <h3><%= l(:label_spent_time) %></h3>
70 <p><span class="icon icon-time"><%= lwr(:label_f_hour, @total_hours) %></span></p>
70 <p><span class="icon icon-time"><%= lwr(:label_f_hour, @total_hours) %></span></p>
71 <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> |
71 <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> |
72 <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>
72 <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>
73 <% end %>
73 <% end %>
74 <% end %>
74 <% end %>
75
75
76 <% content_for :header_tags do %>
76 <% content_for :header_tags do %>
77 <%= auto_discovery_link_tag(:atom, {:action => 'activity', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
77 <%= auto_discovery_link_tag(:atom, {:action => 'activity', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
78 <% end %>
78 <% end %>
79
79
80 <% html_title(l(:label_overview)) -%>
80 <% html_title(l(:label_overview)) -%>
@@ -1,44 +1,44
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_user_new), {:action => 'add'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_user_new), {:action => 'add'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_user_plural)%></h2>
5 <h2><%=l(:label_user_plural)%></h2>
6
6
7 <% form_tag({}, :method => :get) do %>
7 <% form_tag({}, :method => :get) do %>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
9 <label><%= l(:field_status) %> :</label>
9 <label><%= l(:field_status) %> :</label>
10 <%= select_tag 'status', status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
10 <%= select_tag 'status', status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
11 </fieldset>
11 </fieldset>
12 <% end %>
12 <% end %>
13 &nbsp;
13 &nbsp;
14
14
15 <table class="list">
15 <table class="list">
16 <thead><tr>
16 <thead><tr>
17 <%= sort_header_tag('login', :caption => l(:field_login)) %>
17 <%= sort_header_tag('login', :caption => l(:field_login)) %>
18 <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
18 <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
19 <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
19 <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
20 <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
20 <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
21 <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
21 <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
22 <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
22 <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
23 <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
23 <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
24 <th></th>
24 <th></th>
25 </tr></thead>
25 </tr></thead>
26 <tbody>
26 <tbody>
27 <% for user in @users -%>
27 <% for user in @users -%>
28 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
28 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
29 <td class="username"><%= link_to user.login, :action => 'edit', :id => user %></td>
29 <td class="username"><%= link_to h(user.login), :action => 'edit', :id => user %></td>
30 <td class="firstname"><%= user.firstname %></td>
30 <td class="firstname"><%= h(user.firstname) %></td>
31 <td class="lastname"><%= user.lastname %></td>
31 <td class="lastname"><%= h(user.lastname) %></td>
32 <td class="email"><%= user.mail %></td>
32 <td class="email"><%= h(user.mail) %></td>
33 <td align="center"><%= image_tag('true.png') if user.admin? %></td>
33 <td align="center"><%= image_tag('true.png') if user.admin? %></td>
34 <td class="created_on" align="center"><%= format_time(user.created_on) %></td>
34 <td class="created_on" align="center"><%= format_time(user.created_on) %></td>
35 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
35 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
36 <td><small><%= change_status_link(user) %></small></td>
36 <td><small><%= change_status_link(user) %></small></td>
37 </tr>
37 </tr>
38 <% end -%>
38 <% end -%>
39 </tbody>
39 </tbody>
40 </table>
40 </table>
41
41
42 <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
42 <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
43
43
44 <% html_title(l(:label_user_plural)) -%>
44 <% html_title(l(:label_user_plural)) -%>
@@ -1,35 +1,35
1 <h2><%= l(:label_home) %></h2>
1 <h2><%= l(:label_home) %></h2>
2
2
3 <div class="splitcontentleft">
3 <div class="splitcontentleft">
4 <%= textilizable Setting.welcome_text %>
4 <%= textilizable Setting.welcome_text %>
5 <% if @news.any? %>
5 <% if @news.any? %>
6 <div class="box">
6 <div class="box">
7 <h3><%=l(:label_news_latest)%></h3>
7 <h3><%=l(:label_news_latest)%></h3>
8 <%= render :partial => 'news/news', :collection => @news %>
8 <%= render :partial => 'news/news', :collection => @news %>
9 <%= link_to l(:label_news_view_all), :controller => 'news' %>
9 <%= link_to l(:label_news_view_all), :controller => 'news' %>
10 </div>
10 </div>
11 <% end %>
11 <% end %>
12 </div>
12 </div>
13
13
14 <div class="splitcontentright">
14 <div class="splitcontentright">
15 <% if @projects.any? %>
15 <% if @projects.any? %>
16 <div class="box">
16 <div class="box">
17 <h3 class="icon22 icon22-projects"><%=l(:label_project_latest)%></h3>
17 <h3 class="icon22 icon22-projects"><%=l(:label_project_latest)%></h3>
18 <ul>
18 <ul>
19 <% for project in @projects %>
19 <% for project in @projects %>
20 <li>
20 <li>
21 <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)
21 <%= link_to h(project.name), :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)
22 <%= textilizable project.short_description, :project => project %>
22 <%= textilizable project.short_description, :project => project %>
23 </li>
23 </li>
24 <% end %>
24 <% end %>
25 </ul>
25 </ul>
26 </div>
26 </div>
27 <% end %>
27 <% end %>
28 </div>
28 </div>
29
29
30 <% content_for :header_tags do %>
30 <% content_for :header_tags do %>
31 <%= auto_discovery_link_tag(:atom, {:controller => 'news', :action => 'index', :key => User.current.rss_key, :format => 'atom'},
31 <%= auto_discovery_link_tag(:atom, {:controller => 'news', :action => 'index', :key => User.current.rss_key, :format => 'atom'},
32 :title => "#{Setting.app_title}: #{l(:label_news_latest)}") %>
32 :title => "#{Setting.app_title}: #{l(:label_news_latest)}") %>
33 <%= auto_discovery_link_tag(:atom, {:controller => 'projects', :action => 'activity', :key => User.current.rss_key, :format => 'atom'},
33 <%= auto_discovery_link_tag(:atom, {:controller => 'projects', :action => 'activity', :key => User.current.rss_key, :format => 'atom'},
34 :title => "#{Setting.app_title}: #{l(:label_activity)}") %>
34 :title => "#{Setting.app_title}: #{l(:label_activity)}") %>
35 <% end %>
35 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now