@@ -126,6 +126,16 module ApplicationHelper | |||
|
126 | 126 | title.compact.join(' - ') |
|
127 | 127 | end |
|
128 | 128 | |
|
129 | ACCESSKEYS = {:edit => 'e', | |
|
130 | :preview => 'r', | |
|
131 | :quick_search => 'f', | |
|
132 | :search => '4', | |
|
133 | }.freeze | |
|
134 | ||
|
135 | def accesskey(s) | |
|
136 | ACCESSKEYS[s] | |
|
137 | end | |
|
138 | ||
|
129 | 139 | # format text according to system settings |
|
130 | 140 | def textilizable(text, options = {}) |
|
131 | 141 | return "" if text.blank? |
@@ -1,5 +1,5 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %> | |
|
2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> | |
|
3 | 3 | <%= 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' %> |
|
4 | 4 | </div> |
|
5 | 5 |
@@ -1,6 +1,6 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= show_and_goto_link(l(:label_add_note), 'add-note', :class => 'icon icon-note') if authorize_for('issues', 'add_note') %> |
|
3 | <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %> | |
|
3 | <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> | |
|
4 | 4 | <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %> |
|
5 | 5 | <%= watcher_tag(@issue, User.current) %> |
|
6 | 6 | <%= 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 | |||
|
38 | 38 | <div id="header"> |
|
39 | 39 | <div id="quick-search"> |
|
40 | 40 | <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> |
|
41 |
<%= link_to l(:label_search), :controller => 'search', :action => 'index', :id => @project |
|
|
41 | <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>: | |
|
42 | <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %> | |
|
42 | 43 | <% end %> |
|
43 | 44 | <%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %> |
|
44 | 45 | </div> |
@@ -2,6 +2,7 | |||
|
2 | 2 | <%= link_to_if_authorized l(:button_edit), |
|
3 | 3 | {:controller => 'news', :action => 'edit', :id => @news}, |
|
4 | 4 | :class => 'icon icon-edit', |
|
5 | :accesskey => accesskey(:edit), | |
|
5 | 6 | :onclick => 'Element.show("edit-news"); return false;' %> |
|
6 | 7 | <%= 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' %> |
|
7 | 8 | </div> |
@@ -8,7 +8,7 | |||
|
8 | 8 | <%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' }, |
|
9 | 9 | :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;" %> |
|
10 | 10 | </div> |
|
11 | <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p> | |
|
11 | <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %></p> | |
|
12 | 12 | <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p> |
|
13 | 13 | <p><%= submit_tag l(:button_save) %> |
|
14 | 14 | <%= link_to_remote l(:label_preview), |
@@ -17,7 +17,7 | |||
|
17 | 17 | :update => 'preview', |
|
18 | 18 | :with => "Form.serialize('wiki_form')", |
|
19 | 19 | :complete => "location.href='#preview-top'" |
|
20 | } %></p> | |
|
20 | }, :accesskey => accesskey(:preview) %></p> | |
|
21 | 21 | <%= wikitoolbar_for 'content_text' %> |
|
22 | 22 | <% end %> |
|
23 | 23 |
@@ -1,5 +1,5 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') if @content.version == @page.content.version %> | |
|
2 | <%= 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 %> | |
|
3 | 3 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %> |
|
4 | 4 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> |
|
5 | 5 | <%= 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 %> |
General Comments 0
You need to be logged in to leave comments.
Login now