mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Adds p/n access keys for previous/next links (#18692).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@13794 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e723081ff4
commit
bfd8113046
@ -111,7 +111,8 @@ module ApplicationHelper
|
||||
link_to(
|
||||
h(text),
|
||||
{:controller => 'repositories', :action => 'revision', :id => repository.project, :repository_id => repository.identifier_param, :rev => rev},
|
||||
:title => l(:label_revision_id, format_revision(revision))
|
||||
:title => l(:label_revision_id, format_revision(revision)),
|
||||
:accesskey => options[:accesskey]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@ -53,6 +53,6 @@ module CalendarsHelper
|
||||
end
|
||||
|
||||
def link_to_month(link_name, year, month, options={})
|
||||
link_to_content_update(h(link_name), params.merge(:year => year, :month => month))
|
||||
link_to_content_update(h(link_name), params.merge(:year => year, :month => month), options)
|
||||
end
|
||||
end
|
||||
|
||||
@ -24,12 +24,14 @@
|
||||
<div style="float:left;">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(:from => @date_to - @days - 1),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %>
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)),
|
||||
:accesskey => accesskey(:previous)) %>
|
||||
</div>
|
||||
<div style="float:right;">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(:from => @date_to + @days - 1),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %>
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)),
|
||||
:accesskey => accesskey(:next)) unless @date_to >= Date.today %>
|
||||
</div>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</fieldset>
|
||||
|
||||
<p style="float:right;">
|
||||
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
|
||||
<%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
|
||||
@ -295,11 +295,13 @@
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(@gantt.params_previous)) %>
|
||||
params.merge(@gantt.params_previous),
|
||||
:accesskey => accesskey(:previous)) %>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(@gantt.params_next)) %>
|
||||
params.merge(@gantt.params_next),
|
||||
:accesskey => accesskey(:next)) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -8,14 +8,16 @@
|
||||
<%= link_to_if @prev_issue_id,
|
||||
"\xc2\xab #{l(:label_previous)}",
|
||||
(@prev_issue_id ? issue_path(@prev_issue_id) : nil),
|
||||
:title => "##{@prev_issue_id}" %> |
|
||||
:title => "##{@prev_issue_id}",
|
||||
:accesskey => accesskey(:previous) %> |
|
||||
<% if @issue_position && @issue_count %>
|
||||
<span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
|
||||
<% end %>
|
||||
<%= link_to_if @next_issue_id,
|
||||
"#{l(:label_next)} \xc2\xbb",
|
||||
(@next_issue_id ? issue_path(@next_issue_id) : nil),
|
||||
:title => "##{@next_issue_id}" %>
|
||||
:title => "##{@next_issue_id}",
|
||||
:accesskey => accesskey(:next) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
<div class="contextual">
|
||||
«
|
||||
<% unless @changeset.previous.nil? -%>
|
||||
<%= link_to_revision(@changeset.previous, @repository, :text => l(:label_previous)) %>
|
||||
<%= link_to_revision(@changeset.previous, @repository,
|
||||
:text => l(:label_previous), :accesskey => accesskey(:previous)) %>
|
||||
<% else -%>
|
||||
<%= l(:label_previous) %>
|
||||
<% end -%>
|
||||
|
|
||||
<% unless @changeset.next.nil? -%>
|
||||
<%= link_to_revision(@changeset.next, @repository, :text => l(:label_next)) %>
|
||||
<%= link_to_revision(@changeset.next, @repository,
|
||||
:text => l(:label_next), :accesskey => accesskey(:next)) %>
|
||||
<% else -%>
|
||||
<%= l(:label_next) %>
|
||||
<% end -%>
|
||||
|
||||
@ -21,7 +21,9 @@ module Redmine
|
||||
:preview => 'r',
|
||||
:quick_search => 'f',
|
||||
:search => '4',
|
||||
:new_issue => '7'
|
||||
:new_issue => '7',
|
||||
:previous => 'p',
|
||||
:next => 'n'
|
||||
}.freeze unless const_defined?(:ACCESSKEYS)
|
||||
|
||||
def self.key_for(action)
|
||||
|
||||
@ -176,7 +176,8 @@ module Redmine
|
||||
if paginator.previous_page
|
||||
# \xc2\xab(utf-8) = «
|
||||
text = "\xc2\xab " + l(:label_previous)
|
||||
html << yield(text, {page_param => paginator.previous_page}, :class => 'previous') + ' '
|
||||
html << yield(text, {page_param => paginator.previous_page},
|
||||
:class => 'previous', :accesskey => accesskey(:previous)) + ' '
|
||||
end
|
||||
|
||||
previous = nil
|
||||
@ -196,7 +197,8 @@ module Redmine
|
||||
if paginator.next_page
|
||||
# \xc2\xbb(utf-8) = »
|
||||
text = l(:label_next) + " \xc2\xbb"
|
||||
html << yield(text, {page_param => paginator.next_page}, :class => 'next') + ' '
|
||||
html << yield(text, {page_param => paginator.next_page},
|
||||
:class => 'next', :accesskey => accesskey(:next)) + ' '
|
||||
end
|
||||
|
||||
html << content_tag('span', "(#{paginator.first_item}-#{paginator.last_item}/#{paginator.item_count})", :class => 'items') + ' '
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user