Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -12,10 +12,18 @@
|
|||
<%= f.text_field :title, :name => 'title', :size => 60, :required => true %>
|
||||
<em class="info"><%= l(:text_unallowed_characters) %>: , . / ? ; : |</em>
|
||||
</p>
|
||||
<p>
|
||||
<% if params[:parent].present? %>
|
||||
<label class="inline">
|
||||
<%= check_box_tag 'parent', params[:parent], true %>
|
||||
<%= l(:field_parent_title) %>: <%= params[:parent] %>
|
||||
</label>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:label_next), :name => nil %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
<%= link_to_function l(:button_cancel), "hideModal(this);" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -12,3 +12,5 @@
|
|||
{:controller => 'wiki', :project_id => @project,
|
||||
:action => 'date_index'}) %></li>
|
||||
</ul>
|
||||
|
||||
<%= call_hook(:view_wiki_show_sidebar_bottom, :wiki => @wiki, :page => @page) %>
|
||||
|
|
|
@ -20,17 +20,17 @@
|
|||
|
||||
<table class="filecontent annotate">
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% line_num = 1; prev_version = nil %>
|
||||
<% @annotate.lines.each do |line| -%>
|
||||
<tr class="bloc-<%= colors[line[0]] %>">
|
||||
<th class="line-num"><%= line_num %></th>
|
||||
<td class="revision"><%= link_to line[0], :controller => 'wiki',
|
||||
:action => 'show', :project_id => @project,
|
||||
:id => @page.title, :version => line[0] %></td>
|
||||
<td class="author"><%= line[1] %></td>
|
||||
:id => @page.title, :version => line[0] unless prev_version == line[0] %></td>
|
||||
<td class="author"><%= line[1] unless prev_version == line[0] %></td>
|
||||
<td class="line-code"><pre><%= line[2] %></pre></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% line_num += 1; prev_version = line[0] %>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<%= watcher_link(@wiki, User.current) %>
|
||||
<% if User.current.allowed_to?(:manage_wiki, @project) %>
|
||||
<%= link_to l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_index_by_date) %></h2>
|
||||
|
@ -11,7 +14,7 @@
|
|||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
<% @pages_by_date.keys.sort.reverse.each do |date| %>
|
||||
<% @pages_by_date.keys.sort.reverse_each do |date| %>
|
||||
<h3><%= format_date(date) %></h3>
|
||||
<ul>
|
||||
<% @pages_by_date[date].each do |page| %>
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
<%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)],
|
||||
[l(:label_history), history_project_wiki_page_path(@page.project, @page.title)],
|
||||
"#{l(:label_version)} #{@diff.content_to.version}" %>
|
||||
"#{l(:label_revision)} #{@diff.content_to.version}" %>
|
||||
|
||||
<p>
|
||||
<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %>
|
||||
<%= l(:label_revision) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %>
|
||||
<em>(<%= @diff.content_from.author ?
|
||||
@diff.content_from.author.name : l(:label_user_anonymous)
|
||||
%>, <%= format_time(@diff.content_from.updated_on) %>)</em>
|
||||
→
|
||||
<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'show',
|
||||
<%= l(:label_revision) %> <%= link_to @diff.content_to.version, :action => 'show',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @diff.content_to.version
|
||||
%>/<%= @page.content.version %>
|
||||
|
@ -24,6 +24,4 @@
|
|||
%>, <%= format_time(@diff.content_to.updated_on) %>)</em>
|
||||
</p>
|
||||
|
||||
<div class="text-diff">
|
||||
<%= simple_format_without_paragraph @diff.to_html %>
|
||||
</div>
|
||||
<pre class="text-diff"><%= @diff.to_html %></pre>
|
||||
|
|
|
@ -13,8 +13,13 @@
|
|||
<%= error_messages_for 'content' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
|
||||
:class => 'wiki-edit', :accesskey => accesskey(:edit) %>
|
||||
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :accesskey => accesskey(:edit),
|
||||
:class => 'wiki-edit',
|
||||
:data => {
|
||||
:auto_complete => true,
|
||||
:issues_url => auto_complete_issues_path(:project_id => @project, :q => '')
|
||||
}
|
||||
%>
|
||||
|
||||
<% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
|
||||
<%= fields_for @page do |fp| %>
|
||||
|
@ -30,19 +35,38 @@
|
|||
<% end %>
|
||||
|
||||
<p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120, :maxlength => 1024 %></p>
|
||||
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||||
<fieldset>
|
||||
<legend><%=l(:label_attachment_plural)%></legend>
|
||||
<% if @page.attachments.any? && @page.safe_attribute?('deleted_attachment_ids') %>
|
||||
<div class="contextual"><%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %></div>
|
||||
<div id="existing-attachments" style="<%= @page.deleted_attachment_ids.blank? ? 'display:none;' : '' %>">
|
||||
<% @page.attachments.each do |attachment| %>
|
||||
<span class="existing-attachment">
|
||||
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %>
|
||||
<label class='inline'>
|
||||
<%= check_box_tag 'wiki_page[deleted_attachment_ids][]',
|
||||
attachment.id,
|
||||
@page.deleted_attachment_ids.include?(attachment.id),
|
||||
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %>
|
||||
</label>
|
||||
</span>
|
||||
<% end %>
|
||||
<hr />
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="new-attachments" style="display:inline-block;">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %>
|
||||
| <%= link_to l(:button_cancel), wiki_page_edit_cancel_path(@page) %>
|
||||
<%= link_to l(:button_cancel), wiki_page_edit_cancel_path(@page) %>
|
||||
</p>
|
||||
<%= wikitoolbar_for 'content_text' %>
|
||||
<%= wikitoolbar_for 'content_text', preview_project_wiki_page_path(:project_id => @project, :id => @page.title) %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= robot_exclusion_tag %>
|
||||
<% end %>
|
||||
|
|
|
@ -16,6 +16,6 @@ h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%= textilizable @content, :text, :wiki_links => :local %>
|
||||
<%= textilizable @content, :text, :wiki_links => :local, :only_path => false %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -18,16 +18,12 @@ h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display
|
|||
<body>
|
||||
|
||||
<strong><%= l(:label_index_by_title) %></strong>
|
||||
<ul>
|
||||
<% @pages.each do |page| %>
|
||||
<li><a href="#<%= page.title %>"><%= page.pretty_title %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render_page_hierarchy(@pages.group_by(&:parent_id), nil, :timestamp => true) %>
|
||||
|
||||
<% @pages.each do |page| %>
|
||||
<hr />
|
||||
<a name="<%= page.title %>" />
|
||||
<%= textilizable page.content ,:text, :wiki_links => :anchor %>
|
||||
<%= textilizable page.content ,:text, :wiki_links => :anchor, :only_path => false %>
|
||||
<% end %>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
<%= form_tag({:controller => 'wiki', :action => 'diff',
|
||||
:project_id => @page.project, :id => @page.title},
|
||||
:method => :get) do %>
|
||||
<% show_diff = @versions.size > 1 %>
|
||||
<% if show_diff %>
|
||||
<p><%= submit_tag l(:label_view_diff) %></p>
|
||||
<% end %>
|
||||
<table class="list wiki-page-versions">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
|
@ -16,7 +20,6 @@
|
|||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = @versions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% @versions.each do |ver| %>
|
||||
<tr class="wiki-page-version">
|
||||
|
@ -35,6 +38,8 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %>
|
||||
<% if show_diff %>
|
||||
<p><%= submit_tag l(:label_view_diff) %></p>
|
||||
<% end %>
|
||||
<span class="pagination"><%= pagination_links_full @version_pages, @version_count %></span>
|
||||
<% end %>
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<%= watcher_link(@wiki, User.current) %>
|
||||
<% if User.current.allowed_to?(:manage_wiki, @project) %>
|
||||
<%= link_to l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_index_by_title) %></h2>
|
||||
|
|
|
@ -9,7 +9,13 @@
|
|||
:html => { :method => :post } do |f| %>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 100 %></p>
|
||||
<% if @page.safe_attribute? 'is_start_page' %>
|
||||
<p><%= f.check_box :is_start_page, :label => :field_start_page, :disabled => @page.is_start_page %></p>
|
||||
<% end %>
|
||||
<p><%= f.check_box :redirect_existing_links %></p>
|
||||
<% if @page.safe_attribute? 'wiki_id' %>
|
||||
<p><%= f.select :wiki_id, wiki_page_wiki_options_for_select(@page), :label => :label_project %></p>
|
||||
<% end %>
|
||||
<p><%= f.select :parent_id,
|
||||
content_tag('option', '', :value => '') +
|
||||
wiki_page_options_for_select(
|
||||
|
@ -17,10 +23,16 @@
|
|||
@page.parent),
|
||||
:label => :field_parent_title %></p>
|
||||
|
||||
<% if @page.safe_attribute? 'wiki_id' %>
|
||||
<p><%= f.select :wiki_id, wiki_page_wiki_options_for_select(@page), :label => :label_project %></p>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<%= submit_tag l(:button_rename) %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$('#wiki_page_wiki_id').change(function() {
|
||||
$.ajax({
|
||||
url: '<%= rename_project_wiki_page_path(@wiki, :format => 'js') %>',
|
||||
type: 'get',
|
||||
data: { 'wiki_page[wiki_id]': $('#wiki_page_wiki_id').val() }
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
|
|
|
@ -1,20 +1,30 @@
|
|||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
|
||||
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= watcher_link(@page, User.current) %>
|
||||
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
|
||||
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= wiki_page_breadcrumb(@page) %>
|
||||
|
@ -22,20 +32,25 @@
|
|||
<% unless @content.current_version? %>
|
||||
<%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)],
|
||||
[l(:label_history), history_project_wiki_page_path(@page.project, @page.title)],
|
||||
"#{l(:label_version)} #{@content.version}" %>
|
||||
"#{l(:label_revision)} #{@content.version}" %>
|
||||
|
||||
<p>
|
||||
<%= link_to(("\xc2\xab " + l(:label_previous)),
|
||||
<% if @content.previous %>
|
||||
<%= link_to ("\xc2\xab " + l(:label_previous)),
|
||||
:action => 'show', :id => @page.title, :project_id => @page.project,
|
||||
:version => @content.previous.version) + " - " if @content.previous %>
|
||||
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
||||
<%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
|
||||
:version => @content.previous.version %> |
|
||||
<% end %>
|
||||
<%= "#{l(:label_revision)} #{@content.version}/#{@page.content.version}" %>
|
||||
<% if @content.previous %>
|
||||
(<%= link_to l(:label_diff), :controller => 'wiki', :action => 'diff',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.version) + ')'.html_safe if @content.previous %> -
|
||||
<%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
|
||||
:version => @content.version %>)
|
||||
<% end %>
|
||||
<% if @content.next %>
|
||||
| <%= link_to (l(:label_next) + " \xc2\xbb"), :action => 'show',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.next.version) + " - " if @content.next %>
|
||||
<%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
|
||||
:version => @content.next.version %>
|
||||
<% end %>
|
||||
<br />
|
||||
<em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)
|
||||
%>, <%= format_time(@content.updated_on) %> </em><br />
|
||||
|
@ -46,9 +61,8 @@
|
|||
|
||||
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
|
||||
|
||||
<% if @page.attachments.length > 0 || (@editable && authorize_for('wiki', 'add_attachment')) %>
|
||||
<fieldset class="collapsible collapsed<% if @page.attachments.length == 0 %> hide-when-print<% end %>">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %> (<%= @page.attachments.length %>)</legend>
|
||||
<fieldset class="collapsible collapsed hide-when-print">
|
||||
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_attachment_plural) %> (<%= @page.attachments.length %>)</legend>
|
||||
<div style="display: none;">
|
||||
|
||||
<%= link_to_attachments @page, :thumbnails => true %>
|
||||
|
@ -67,7 +81,16 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<p class="wiki-update-info">
|
||||
<% if User.current.allowed_to?(:view_wiki_edits, @project) %>
|
||||
<%= wiki_content_update_info(@content) %>
|
||||
· <%= link_to l(:label_x_revisions, :count => @content.version), {:action => 'history', :id => @page.title} %>
|
||||
<% end %>
|
||||
<% if @page.protected? %>
|
||||
<span class="badge badge-status-locked"><%= l('status_locked') %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
|
@ -79,4 +102,8 @@
|
|||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= robot_exclusion_tag unless @content.current_version? %>
|
||||
<% end %>
|
||||
|
||||
<% html_title @page.pretty_title %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue