##// END OF EJS Templates
various modifications to prevent xss...
Jean-Philippe Lang -
r96:2b86ef8e28d0
parent child
Show More
@@ -0,0 +1,3
1 <p><%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %><br />
2 <% unless document.description.empty? %><%=h truncate document.description, 250 %><br /><% end %>
3 <em><%= format_time(document.created_on) %></em></p> No newline at end of file
@@ -0,0 +1,4
1 <p><%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %><br />
2 <% unless news.summary.empty? %><%=h news.summary %><br /><% end %>
3 <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />
4 <%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %><br /></p>
@@ -56,9 +56,9 module IssuesHelper
56
56
57 unless no_html
57 unless no_html
58 label = content_tag('strong', label)
58 label = content_tag('strong', label)
59 old_value = content_tag("i", old_value) if old_value
59 old_value = content_tag("i", h(old_value)) if old_value
60 old_value = content_tag("strike", old_value) if old_value and !value
60 old_value = content_tag("strike", h(old_value)) if old_value and !value
61 value = content_tag("i", value) if value
61 value = content_tag("i", h(value)) if value
62 end
62 end
63
63
64 if value
64 if value
@@ -28,6 +28,7 class CustomField < ActiveRecord::Base
28
28
29 validates_presence_of :name, :field_format
29 validates_presence_of :name, :field_format
30 validates_uniqueness_of :name
30 validates_uniqueness_of :name
31 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
31 validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
32 validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
32 validates_presence_of :possible_values, :if => Proc.new { |field| field.field_format == "list" }
33 validates_presence_of :possible_values, :if => Proc.new { |field| field.field_format == "list" }
33
34
@@ -18,8 +18,9
18 class Enumeration < ActiveRecord::Base
18 class Enumeration < ActiveRecord::Base
19 before_destroy :check_integrity
19 before_destroy :check_integrity
20
20
21 validates_presence_of :opt, :name
21 validates_presence_of :opt, :name
22 validates_uniqueness_of :name, :scope => [:opt]
22 validates_uniqueness_of :name, :scope => [:opt]
23 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
23
24
24 OPTIONS = {
25 OPTIONS = {
25 "IPRI" => :enumeration_issue_priorities,
26 "IPRI" => :enumeration_issue_priorities,
@@ -21,6 +21,7 class IssueStatus < ActiveRecord::Base
21
21
22 validates_presence_of :name
22 validates_presence_of :name
23 validates_uniqueness_of :name
23 validates_uniqueness_of :name
24 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
24 validates_length_of :html_color, :is => 6
25 validates_length_of :html_color, :is => 6
25 validates_format_of :html_color, :with => /^[a-f0-9]*$/i
26 validates_format_of :html_color, :with => /^[a-f0-9]*$/i
26
27
@@ -31,6 +31,7 class Project < ActiveRecord::Base
31 validates_presence_of :name, :description
31 validates_presence_of :name, :description
32 validates_uniqueness_of :name
32 validates_uniqueness_of :name
33 validates_associated :custom_values, :on => :update
33 validates_associated :custom_values, :on => :update
34 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
34
35
35 # returns 5 last created projects
36 # returns 5 last created projects
36 def self.latest
37 def self.latest
@@ -23,6 +23,7 class Role < ActiveRecord::Base
23
23
24 validates_presence_of :name
24 validates_presence_of :name
25 validates_uniqueness_of :name
25 validates_uniqueness_of :name
26 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
26
27
27 private
28 private
28 def check_integrity
29 def check_integrity
@@ -23,7 +23,8 class Tracker < ActiveRecord::Base
23
23
24 validates_presence_of :name
24 validates_presence_of :name
25 validates_uniqueness_of :name
25 validates_uniqueness_of :name
26
26 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
27
27 private
28 private
28 def check_integrity
29 def check_integrity
29 raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id])
30 raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id])
@@ -32,7 +32,8 class User < ActiveRecord::Base
32 validates_presence_of :login, :firstname, :lastname, :mail
32 validates_presence_of :login, :firstname, :lastname, :mail
33 validates_uniqueness_of :login, :mail
33 validates_uniqueness_of :login, :mail
34 # Login must contain lettres, numbers, underscores only
34 # Login must contain lettres, numbers, underscores only
35 validates_format_of :login, :with => /^[a-z0-9_]+$/i
35 validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-]*$/i
36 validates_format_of :login, :with => /^[a-z0-9_\-@\.]+$/i
36 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
37 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
37 # Password length between 4 and 12
38 # Password length between 4 and 12
38 validates_length_of :password, :in => 4..12, :allow_nil => true
39 validates_length_of :password, :in => 4..12, :allow_nil => true
@@ -17,7 +17,7
17 <% for project in @projects %>
17 <% for project in @projects %>
18 <tr class="<%= cycle("odd", "even") %>">
18 <tr class="<%= cycle("odd", "even") %>">
19 <td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
19 <td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
20 <td><%= project.description %>
20 <td><%=h project.description %>
21 <td align="center"><%= image_tag 'true' if project.is_public? %>
21 <td align="center"><%= image_tag 'true' if project.is_public? %>
22 <td align="center"><%= project.projects_count %>
22 <td align="center"><%= project.projects_count %>
23 <td align="center"><%= format_date(project.created_on) %>
23 <td align="center"><%= format_date(project.created_on) %>
@@ -6,6 +6,6
6 <% end %>
6 <% end %>
7 </ul>
7 </ul>
8 <% if journal.notes? %>
8 <% if journal.notes? %>
9 <%= simple_format auto_link journal.notes %>
9 <%= simple_format auto_link h(journal.notes) %>
10 <% end %>
10 <% end %>
11 <% end %>
11 <% end %>
@@ -15,7 +15,7
15 <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br />
15 <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br />
16 <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td>
16 <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td>
17 <td>
17 <td>
18 <p class="small"><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></p>
18 <p class="small"><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></p>
19 </td>
19 </td>
20 </tr>
20 </tr>
21 <% end %>
21 <% end %>
@@ -1,4 +1,4
1 <h2><%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %></h2>
1 <h2><%=l(:label_issue)%> #<%= @issue.id %>: <%=h @issue.subject %></h2>
2
2
3 <%= error_messages_for 'issue' %>
3 <%= error_messages_for 'issue' %>
4 <%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %>
4 <%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %>
@@ -2,7 +2,7
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %>
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %>
3 </div>
3 </div>
4
4
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
6
6
7 <div class="box">
7 <div class="box">
8 <table width="100%">
8 <table width="100%">
@@ -12,7 +12,7
12 </tr>
12 </tr>
13 <tr>
13 <tr>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%= @issue.category ? @issue.category.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
16 </tr>
16 </tr>
17 <tr>
17 <tr>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
@@ -29,7 +29,7
29 <tr>
29 <tr>
30 <% n = 0
30 <% n = 0
31 for custom_value in @custom_values %>
31 for custom_value in @custom_values %>
32 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%= show_value custom_value %></td>
32 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%=h show_value custom_value %></td>
33 <% n = n + 1
33 <% n = n + 1
34 if (n > 1)
34 if (n > 1)
35 n = 0 %>
35 n = 0 %>
@@ -34,7 +34,7 while day <= @date_to
34 elsif day == i.due_date
34 elsif day == i.due_date
35 image_tag('arrow_to')
35 image_tag('arrow_to')
36 end %>
36 end %>
37 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
37 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
38 <% end %>
38 <% end %>
39 </td>
39 </td>
40 <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
40 <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
@@ -1,15 +1,7
1 <h3><%=l(:label_document_plural)%></h3>
1 <h3><%=l(:label_document_plural)%></h3>
2
2
3 <ul>
3 <%= render(:partial => 'documents/document',
4 <% for document in Document.find :all,
4 :collection => Document.find(:all,
5 :limit => 10,
5 :limit => 10,
6 :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
6 :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
7 :include => [:project] %>
7 :include => [:project])) unless @user.projects.empty? %> No newline at end of file
8 <li>
9 <b><%= link_to document.title, :controller => 'documents', :action => 'show', :id => document %></b>
10 <br />
11 <%= truncate document.description, 150 %><br />
12 <em><%= format_time(document.created_on) %></em><br />&nbsp;
13 </li>
14 <% end unless @user.projects.empty? %>
15 </ul> No newline at end of file
@@ -1,13 +1,7
1 <h3><%=l(:label_news_latest)%></h3>
1 <h3><%=l(:label_news_latest)%></h3>
2
2
3 <ul>
3 <%= render (:partial => 'news/news',
4 <% for news in News.find :all,
4 :collection => News.find(:all,
5 :limit => 10,
5 :limit => 10,
6 :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
6 :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
7 :include => [:project, :author] %>
7 :include => [:project, :author])) unless @user.projects.empty? %> No newline at end of file
8 <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br />
9 <% unless news.summary.empty? %><%= news.summary %><br /><% end %>
10 <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />&nbsp;
11 </li>
12 <% end unless @user.projects.empty? %>
13 </ul> No newline at end of file
@@ -1,9 +1,9
1 <h2><%=l(:label_my_page)%></h2>
1 <div class="contextual">
2
2 <%= link_to l(:label_personalize_page), :action => 'page_layout' %>
3 <div class="topright">
4 <small><%= link_to l(:label_personalize_page), :action => 'page_layout' %></small>
5 </div>
3 </div>
6
4
5 <h2><%=l(:label_my_page)%></h2>
6
7 <div id="list-top">
7 <div id="list-top">
8 <% @blocks['top'].each do |b| %>
8 <% @blocks['top'].each do |b| %>
9 <div class="mypage-box">
9 <div class="mypage-box">
@@ -34,11 +34,10 function removeBlock(block) {
34
34
35 </script>
35 </script>
36
36
37 <div style="float:right;">
37 <div class="contextual">
38 <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
38 <%= start_form_tag({:action => "add_block"}, :id => "block-form") %>
39 <%= start_form_tag({:action => "add_block"}, :id => "block-form") %>
39
40 <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
40 <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select", :class => "select-small" %>
41 <small>
42 <%= link_to_remote l(:button_add),
41 <%= link_to_remote l(:button_add),
43 :url => { :action => "add_block" },
42 :url => { :action => "add_block" },
44 :with => "Form.serialize('block-form')",
43 :with => "Form.serialize('block-form')",
@@ -48,16 +47,9 function removeBlock(block) {
48 :loading => "Element.show('indicator')",
47 :loading => "Element.show('indicator')",
49 :loaded => "Element.hide('indicator')"
48 :loaded => "Element.hide('indicator')"
50 %>
49 %>
51 </small>
50 <%= end_form_tag %> |
52 <%= end_form_tag %>
53 <small>|
54 <%= link_to l(:button_save), :action => 'page_layout_save' %> |
51 <%= link_to l(:button_save), :action => 'page_layout_save' %> |
55 <%= link_to l(:button_cancel), :action => 'page' %>
52 <%= link_to l(:button_cancel), :action => 'page' %>
56 </small>
57 </div>
58
59 <div style="float:right;margin-right:20px;">
60 <span id="indicator" style="display:none"><%= image_tag "loading.gif" %></span>
61 </div>
53 </div>
62
54
63 <h2><%=l(:label_my_page)%></h2>
55 <h2><%=l(:label_my_page)%></h2>
@@ -3,9 +3,9
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
4 </div>
4 </div>
5
5
6 <h2><%= @news.title %></h2>
6 <h2><%=h @news.title %></h2>
7
7
8 <p><em><%= @news.summary %><br />
8 <p><em><%=h @news.summary %><br />
9 <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
9 <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
10 <br />
10 <br />
11 <%= textilizable auto_link @news.description %>
11 <%= textilizable auto_link @news.description %>
@@ -18,20 +18,20
18 <% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %>
18 <% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %>
19 <li><p>
19 <li><p>
20 <% if e.is_a? Issue %>
20 <% if e.is_a? Issue %>
21 <%= e.created_on.strftime("%H:%M") %> <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %> (<%= e.status.name %>): <%= e.subject %><br />
21 <%= e.created_on.strftime("%H:%M") %> <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %> (<%= e.status.name %>): <%=h e.subject %><br />
22 <i><%= e.author.name %></i>
22 <i><%= e.author.name %></i>
23 <% elsif e.is_a? News %>
23 <% elsif e.is_a? News %>
24 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to e.title, :controller => 'news', :action => 'show', :id => e %><br />
24 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br />
25 <% unless e.summary.empty? %><%= e.summary %><br /><% end %>
25 <% unless e.summary.empty? %><%=h e.summary %><br /><% end %>
26 <i><%= e.author.name %></i>
26 <i><%= e.author.name %></i>
27 <% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %>
27 <% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %>
28 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%= e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br />
28 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br />
29 <i><%= e.author.name %></i>
29 <i><%= e.author.name %></i>
30 <% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %>
30 <% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %>
31 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to e.container.title, :controller => 'documents', :action => 'show', :id => e.container %>)<br />
31 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br />
32 <i><%= e.author.name %></i>
32 <i><%= e.author.name %></i>
33 <% elsif e.is_a? Document %>
33 <% elsif e.is_a? Document %>
34 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to e.title, :controller => 'documents', :action => 'show', :id => e %><br />
34 <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br />
35 <% end %>
35 <% end %>
36 </p></li>
36 </p></li>
37
37
@@ -50,7 +50,7 while day <= @date_to
50 elsif day == i.due_date
50 elsif day == i.due_date
51 image_tag('arrow_to')
51 image_tag('arrow_to')
52 end %>
52 end %>
53 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
53 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
54 <% end %>
54 <% end %>
55 </td>
55 </td>
56 <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
56 <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %>
@@ -23,6 +23,6
23 <ul>
23 <ul>
24 <% ver_id = issue.fixed_version_id
24 <% ver_id = issue.fixed_version_id
25 end %>
25 end %>
26 <li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%= issue.subject %></li>
26 <li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%=h issue.subject %></li>
27 <% end %>
27 <% end %>
28 </div> No newline at end of file
28 </div>
@@ -1,10 +1,9
1 <% pdf=IfpdfHelper::IFPDF.new
1 <% pdf=IfpdfHelper::IFPDF.new
2 pdf.AliasNbPages
2 pdf.AliasNbPages
3 pdf.footer_date = format_date(Date.today)
3 pdf.footer_date = format_date(Date.today)
4 pdf.AddPage
5 @issues.each {|i|
4 @issues.each {|i|
6 render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i }
7 pdf.AddPage
5 pdf.AddPage
6 render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i }
8 }
7 }
9 %>
8 %>
10
9
@@ -103,7 +103,7 top = headers_heigth + 8
103 @issues.each do |i| %>
103 @issues.each do |i| %>
104 <div style="position: absolute;line-height:1em;height:16px;top:<%= top %>px;left:4px;width:<%= subject_width - 5 %>px;overflow:hidden;">
104 <div style="position: absolute;line-height:1em;height:16px;top:<%= top %>px;left:4px;width:<%= subject_width - 5 %>px;overflow:hidden;">
105 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>:
105 <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>:
106 <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
106 <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small>
107 </div>
107 </div>
108 <% top = top + 20
108 <% top = top + 20
109 end %>
109 end %>
@@ -10,7 +10,7
10 <% for project in @projects %>
10 <% for project in @projects %>
11 <tr class="<%= cycle("odd", "even") %>">
11 <tr class="<%= cycle("odd", "even") %>">
12 <td><%= link_to project.name, :action => 'show', :id => project %>
12 <td><%= link_to project.name, :action => 'show', :id => project %>
13 <td><%= project.description %>
13 <td><%=h project.description %>
14 <td align="center"><%= format_date(project.created_on) %>
14 <td align="center"><%= format_date(project.created_on) %>
15 </tr>
15 </tr>
16 <% end %>
16 <% end %>
@@ -8,16 +8,6
8
8
9 <% documents = @documents.group_by {|d| d.category } %>
9 <% documents = @documents.group_by {|d| d.category } %>
10 <% documents.each do |category, docs| %>
10 <% documents.each do |category, docs| %>
11 <h3><%= category.name %></h3>
11 <h3><%= category.name %></h3>
12 <ul>
12 <%= render :partial => 'documents/document', :collection => docs %>
13 <% docs.each do |d| %>
14 <li>
15 <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b>
16 <br />
17 <%= truncate d.description, 250 %><br />
18 <em><%= format_time(d.created_on) %></em><br />&nbsp;
19 </li>
20
21 <% end %>
22 </ul>
23 <% end %> No newline at end of file
13 <% end %>
@@ -69,7 +69,7
69 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
69 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
70 <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"><%= issue.status.name %></font></td>
70 <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"><%= issue.status.name %></font></td>
71 <td align="center"><%= issue.tracker.name %></td>
71 <td align="center"><%= issue.tracker.name %></td>
72 <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td>
72 <td><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
73 <td align="center"><%= issue.author.display_name %></td>
73 <td align="center"><%= issue.author.display_name %></td>
74 <td align="center"><%= format_time(issue.created_on) %></td>
74 <td align="center"><%= format_time(issue.created_on) %></td>
75 <td align="center"><%= format_time(issue.updated_on) %></td>
75 <td align="center"><%= format_time(issue.updated_on) %></td>
@@ -5,16 +5,5
5 <h2><%=l(:label_news_plural)%></h2>
5 <h2><%=l(:label_news_plural)%></h2>
6
6
7 <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
7 <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
8
8 <%= render :partial => 'news/news', :collection => @news %>
9 <ul>
10 <% for news in @news %>
11 <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br />
12 <% unless news.summary.empty? %><%= news.summary %><br /><% end %>
13 <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />
14 <%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %><br />&nbsp;
15 </li>
16 <% end %>
17 </ul>
18
19
20 <%= pagination_links_full @news_pages %>
9 <%= pagination_links_full @news_pages %>
@@ -1,13 +1,13
1 <h2><%=l(:label_overview)%></h2>
1 <h2><%=l(:label_overview)%></h2>
2
2
3 <div class="splitcontentleft">
3 <div class="splitcontentleft">
4 <%= simple_format(auto_link(@project.description)) %>
4 <%= simple_format(auto_link(h @project.description)) %>
5 <ul>
5 <ul>
6 <% unless @project.homepage.empty? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
6 <% unless @project.homepage.empty? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
7 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
7 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
8 <% for custom_value in @custom_values %>
8 <% for custom_value in @custom_values %>
9 <% if !custom_value.value.empty? %>
9 <% if !custom_value.value.empty? %>
10 <li><%= custom_value.custom_field.name%>: <%= show_value(custom_value) %></li>
10 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
11 <% end %>
11 <% end %>
12 <% end %>
12 <% end %>
13 </ul>
13 </ul>
@@ -32,7 +32,7
32 <% end %>
32 <% end %>
33 </ul>
33 </ul>
34 <% end %>
34 <% end %>
35 <center><small>[ <%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %> ]</small></center>
35 <center><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></center>
36 </div>
36 </div>
37 </div>
37 </div>
38
38
@@ -55,13 +55,8
55
55
56 <div class="box">
56 <div class="box">
57 <h3><%=l(:label_news_latest)%></h3>
57 <h3><%=l(:label_news_latest)%></h3>
58 <% for news in @news %>
58 <%= render :partial => 'news/news', :collection => @news %>
59 <p><b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
59 <center><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></center>
60 <%= news.summary %>
61 <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small></p>
62 <hr />
63 <% end %>
64 <center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center>
65 </div>
60 </div>
66 </div>
61 </div>
67
62
@@ -11,7 +11,7
11
11
12 <% for @custom_value in @custom_values %>
12 <% for @custom_value in @custom_values %>
13 <p><%= custom_field_tag_with_label @custom_value %></p>
13 <p><%= custom_field_tag_with_label @custom_value %></p>
14 <% end %>
14 <% end if @custom_values%>
15
15
16 <p><%= f.check_box :admin %></p>
16 <p><%= f.check_box :admin %></p>
17 <p><%= f.check_box :mail_notification %></p>
17 <p><%= f.check_box :mail_notification %></p>
@@ -4,14 +4,7
4 <% if $RDM_WELCOME_TEXT %><p><%= $RDM_WELCOME_TEXT %></p><br /><% end %>
4 <% if $RDM_WELCOME_TEXT %><p><%= $RDM_WELCOME_TEXT %></p><br /><% end %>
5 <div class="box">
5 <div class="box">
6 <h3><%=l(:label_news_latest)%></h3>
6 <h3><%=l(:label_news_latest)%></h3>
7 <% for news in @news %>
7 <%= render :partial => 'news/news', :collection => @news %>
8 <p>
9 <b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br />
10 <% unless news.summary.empty? %><%= news.summary %><br /><% end %>
11 [<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]
12 </p>
13 <hr />
14 <% end %>
15 </div>
8 </div>
16 </div>
9 </div>
17
10
@@ -22,7 +15,7
22 <% for project in @projects %>
15 <% for project in @projects %>
23 <li>
16 <li>
24 <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)<br />
17 <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)<br />
25 <%= project.description %>
18 <%=h project.description %>
26 </li>
19 </li>
27 <% end %>
20 <% end %>
28 </ul>
21 </ul>
@@ -473,6 +473,9 float: right;
473 font-size: 0.8em;
473 font-size: 0.8em;
474 }
474 }
475
475
476 .contextual select {
477 font-size: 1em;
478 }
476
479
477
480
478 /***** CSS FORM ******/
481 /***** CSS FORM ******/
General Comments 0
You need to be logged in to leave comments. Login now