Added some accesskeys:
* e => edit * r => preview * f => quick search * 4 => search git-svn-id: http://redmine.rubyforge.org/svn/trunk@804 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
73dba2ac04
commit
e8971e5f83
|
@ -126,6 +126,16 @@ module ApplicationHelper
|
||||||
title.compact.join(' - ')
|
title.compact.join(' - ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ACCESSKEYS = {:edit => 'e',
|
||||||
|
:preview => 'r',
|
||||||
|
:quick_search => 'f',
|
||||||
|
:search => '4',
|
||||||
|
}.freeze
|
||||||
|
|
||||||
|
def accesskey(s)
|
||||||
|
ACCESSKEYS[s]
|
||||||
|
end
|
||||||
|
|
||||||
# format text according to system settings
|
# format text according to system settings
|
||||||
def textilizable(text, options = {})
|
def textilizable(text, options = {})
|
||||||
return "" if text.blank?
|
return "" if text.blank?
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
|
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= show_and_goto_link(l(:label_add_note), 'add-note', :class => 'icon icon-note') if authorize_for('issues', 'add_note') %>
|
<%= show_and_goto_link(l(:label_add_note), 'add-note', :class => 'icon icon-note') if authorize_for('issues', 'add_note') %>
|
||||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
|
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||||
<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
|
<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
|
||||||
<%= watcher_tag(@issue, User.current) %>
|
<%= watcher_tag(@issue, User.current) %>
|
||||||
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
|
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="quick-search">
|
<div id="quick-search">
|
||||||
<% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
|
<% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
|
||||||
<%= link_to l(:label_search), :controller => 'search', :action => 'index', :id => @project %>: <%= text_field_tag 'q', @question, :size => 20, :class => 'small' %>
|
<%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
|
||||||
|
<%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
|
<%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<%= link_to_if_authorized l(:button_edit),
|
<%= link_to_if_authorized l(:button_edit),
|
||||||
{:controller => 'news', :action => 'edit', :id => @news},
|
{:controller => 'news', :action => 'edit', :id => @news},
|
||||||
:class => 'icon icon-edit',
|
:class => 'icon icon-edit',
|
||||||
|
:accesskey => accesskey(:edit),
|
||||||
:onclick => 'Element.show("edit-news"); return false;' %>
|
:onclick => 'Element.show("edit-news"); return false;' %>
|
||||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
|
<%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
|
||||||
:onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
|
:onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
|
||||||
</div>
|
</div>
|
||||||
<p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
|
<p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %></p>
|
||||||
<p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
|
<p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
|
||||||
<p><%= submit_tag l(:button_save) %>
|
<p><%= submit_tag l(:button_save) %>
|
||||||
<%= link_to_remote l(:label_preview),
|
<%= link_to_remote l(:label_preview),
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
:update => 'preview',
|
:update => 'preview',
|
||||||
:with => "Form.serialize('wiki_form')",
|
:with => "Form.serialize('wiki_form')",
|
||||||
:complete => "location.href='#preview-top'"
|
:complete => "location.href='#preview-top'"
|
||||||
} %></p>
|
}, :accesskey => accesskey(:preview) %></p>
|
||||||
<%= wikitoolbar_for 'content_text' %>
|
<%= wikitoolbar_for 'content_text' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') if @content.version == @page.content.version %>
|
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %>
|
||||||
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
|
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
|
||||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
||||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :page => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %>
|
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :page => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %>
|
||||||
|
|
Loading…
Reference in New Issue