Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
32
app/views/common/_calendar.html.erb
Normal file
32
app/views/common/_calendar.html.erb
Normal file
|
@ -0,0 +1,32 @@
|
|||
<table class="cal">
|
||||
<thead>
|
||||
<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<% day = calendar.startdt
|
||||
while day <= calendar.enddt %>
|
||||
<%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == calendar.first_wday %>
|
||||
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if User.current.today == day %>">
|
||||
<p class="day-num"><%= day.day %></p>
|
||||
<% calendar.events_on(day).each do |i| %>
|
||||
<% if i.is_a? Issue %>
|
||||
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
|
||||
<%= "#{i.project} -" unless @project && @project == i.project %>
|
||||
<%= link_to_issue i, :truncate => 30 %>
|
||||
<span class="tip"><%= render_issue_tooltip i %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<span class="icon icon-package">
|
||||
<%= "#{i.project} -" unless @project && @project == i.project %>
|
||||
<%= link_to_version i%>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
|
||||
<% day = day + 1
|
||||
end %>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
68
app/views/common/_diff.html.erb
Normal file
68
app/views/common/_diff.html.erb
Normal file
|
@ -0,0 +1,68 @@
|
|||
<% diff = Redmine::UnifiedDiff.new(
|
||||
diff, :type => diff_type,
|
||||
:max_lines => Setting.diff_max_lines_displayed.to_i,
|
||||
:style => diff_style) -%>
|
||||
|
||||
<% diff.each do |table_file| -%>
|
||||
<div class="autoscroll">
|
||||
<% if diff.diff_type == 'sbs' -%>
|
||||
<table class="filecontent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4" class="filename">
|
||||
<%= table_file.file_name %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% table_file.each_line do |spacing, line| -%>
|
||||
<% if spacing -%>
|
||||
<tr class="spacing">
|
||||
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
<tr>
|
||||
<th class="line-num"><%= line.nb_line_left %></th>
|
||||
<td class="line-code <%= line.type_diff_left %>">
|
||||
<pre><%= line.html_line_left.html_safe %></pre>
|
||||
</td>
|
||||
<th class="line-num"><%= line.nb_line_right %></th>
|
||||
<td class="line-code <%= line.type_diff_right %>">
|
||||
<pre><%= line.html_line_right.html_safe %></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% else -%>
|
||||
<table class="filecontent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" class="filename">
|
||||
<%= table_file.file_name %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% table_file.each_line do |spacing, line| %>
|
||||
<% if spacing -%>
|
||||
<tr class="spacing">
|
||||
<th class="line-num">...</th><th class="line-num">...</th><td></td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
<tr>
|
||||
<th class="line-num"><%= line.nb_line_left %></th>
|
||||
<th class="line-num"><%= line.nb_line_right %></th>
|
||||
<td class="line-code <%= line.type_diff %>">
|
||||
<pre><%= line.html_line.html_safe %></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<%= l(:text_diff_truncated) if diff.truncated? %>
|
18
app/views/common/_file.html.erb
Normal file
18
app/views/common/_file.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<div class="autoscroll">
|
||||
<table class="filecontent syntaxhl">
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
|
||||
<tr id="L<%= line_num %>">
|
||||
<th class="line-num">
|
||||
<a href="#L<%= line_num %>"><%= line_num %></a>
|
||||
</th>
|
||||
<td class="line-code">
|
||||
<pre><%= line.html_safe %></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
1
app/views/common/_image.html.erb
Normal file
1
app/views/common/_image.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= image_tag path, :alt => alt, :class => 'filecontent image' %>
|
7
app/views/common/_other.html.erb
Normal file
7
app/views/common/_other.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<p class="nodata">
|
||||
<% if defined? download_link %>
|
||||
<%= t(:label_no_preview_alternative_html, link: download_link) %>
|
||||
<% else %>
|
||||
<%= l(:label_no_preview) %>
|
||||
<% end %>
|
||||
</p>
|
3
app/views/common/_preview.html.erb
Normal file
3
app/views/common/_preview.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
|
||||
<%= textilizable @text, :attachments => @attachments, :object => @previewed %>
|
||||
</fieldset>
|
21
app/views/common/_tabs.html.erb
Normal file
21
app/views/common/_tabs.html.erb
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div class="tabs">
|
||||
<ul>
|
||||
<% tabs.each do |tab| -%>
|
||||
<li><%= link_to l(tab[:label]), (tab[:url] || { :tab => tab[:name] }),
|
||||
:id => "tab-#{tab[:name]}",
|
||||
:class => (tab[:name] != selected_tab ? nil : 'selected'),
|
||||
:onclick => tab[:partial] ? "showTab('#{tab[:name]}', this.href); this.blur(); return false;" : nil %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
<div class="tabs-buttons" style="display:none;">
|
||||
<button class="tab-left" type="button" onclick="moveTabLeft(this);"></button>
|
||||
<button class="tab-right" type="button" onclick="moveTabRight(this);"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% tabs.each do |tab| -%>
|
||||
<%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ),
|
||||
:id => "tab-content-#{tab[:name]}",
|
||||
:style => (tab[:name] != selected_tab ? 'display:none' : nil),
|
||||
:class => 'tab-content') if tab[:partial] %>
|
||||
<% end -%>
|
8
app/views/common/error.html.erb
Normal file
8
app/views/common/error.html.erb
Normal file
|
@ -0,0 +1,8 @@
|
|||
<h2><%= @status %></h2>
|
||||
|
||||
<% if @message.present? %>
|
||||
<p id="errorExplanation"><%= @message %></p>
|
||||
<% end %>
|
||||
<p><a href="javascript:history.back()"><%= l(:button_back) %></a></p>
|
||||
|
||||
<% html_title @status %>
|
5
app/views/common/error_messages.api.rsb
Normal file
5
app/views/common/error_messages.api.rsb
Normal file
|
@ -0,0 +1,5 @@
|
|||
api.array :errors do
|
||||
@error_messages.each do |message|
|
||||
api.error message
|
||||
end
|
||||
end
|
32
app/views/common/feed.atom.builder
Normal file
32
app/views/common/feed.atom.builder
Normal file
|
@ -0,0 +1,32 @@
|
|||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
xml.title truncate_single_line_raw(@title, 100)
|
||||
xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom')
|
||||
xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false)
|
||||
xml.id home_url
|
||||
xml.icon favicon_url
|
||||
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
||||
xml.author { xml.name "#{Setting.app_title}" }
|
||||
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
|
||||
@items.each do |item|
|
||||
xml.entry do
|
||||
url = url_for(item.event_url(:only_path => false))
|
||||
if @project
|
||||
xml.title truncate_single_line_raw(item.event_title, 100)
|
||||
else
|
||||
xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
|
||||
end
|
||||
xml.link "rel" => "alternate", "href" => url
|
||||
xml.id url
|
||||
xml.updated item.event_datetime.xmlschema
|
||||
author = item.event_author if item.respond_to?(:event_author)
|
||||
xml.author do
|
||||
xml.name(author)
|
||||
xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
|
||||
end if author
|
||||
xml.content "type" => "html" do
|
||||
xml.text! textilizable(item, :event_description, :only_path => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue