mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 20:38:48 +01:00
clean up menu bar
This commit is contained in:
parent
8e0013d0df
commit
b725b7b137
3 changed files with 46 additions and 41 deletions
|
|
@ -9,16 +9,15 @@ module ApplicationHelper
|
|||
# if view == context, the menu shows Order By Project
|
||||
menu_name = @group_view_by == 'context' ? 'project' : 'context'
|
||||
|
||||
content_tag(:li) do
|
||||
link_to(
|
||||
t("layouts.navigation.group_view_by_#{menu_name}"),
|
||||
'#',
|
||||
{:id => "group_view_by_link", :accesskey => "g", :title => t('layouts.navigation.group_view_by_title'), :x_current_group_by => @group_view_by} )
|
||||
end
|
||||
return link_to(
|
||||
t("layouts.navigation.group_view_by_#{menu_name}"),
|
||||
'#',
|
||||
{:id => "group_view_by_link", :title => t('layouts.navigation.group_view_by_title'), :x_current_group_by => @group_view_by} )
|
||||
end
|
||||
|
||||
def navigation_link(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
||||
link_to name, options, html_options
|
||||
|
||||
def menu_item(name, path, settings={})
|
||||
return link_to(
|
||||
t("layouts.navigation.#{name}"), path, settings.merge({:title => t("layouts.navigation.#{name}_title")}) )
|
||||
end
|
||||
|
||||
def days_from_today(date)
|
||||
|
|
|
|||
|
|
@ -12,47 +12,48 @@
|
|||
|
||||
<div class="container-fluid nav-collapse">
|
||||
<ul class="nav">
|
||||
<li><%= navigation_link(t('layouts.navigation.home'), root_path, {:accesskey => "t", :title => t('layouts.navigation.home_title')} ) %></li>
|
||||
<li><%= navigation_link(t('layouts.navigation.starred'), tag_path("starred"), :title => t('layouts.navigation.starred_title')) %></li>
|
||||
<li><%= navigation_link(t('common.projects'), projects_path, {:accesskey=>"p", :title=>t('layouts.navigation.projects_title')} ) %></li>
|
||||
<li><%= navigation_link(t('layouts.navigation.tickler'), tickler_path, {:accesskey =>"k", :title => t('layouts.navigation.tickler_title')} ) %></li>
|
||||
<li><%= menu_item("home", root_path) %></li>
|
||||
<li><%= menu_item("starred", tag_path("starred")) %></li>
|
||||
<li><%= menu_item("projects", projects_path) %></li>
|
||||
<li><%= menu_item("tickler", tickler_path) %></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= t('layouts.navigation.organize') %><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= navigation_link( t('common.contexts'), contexts_path, {:accesskey=>"c", :title=>t('layouts.navigation.contexts_title')} ) %></li>
|
||||
<li><%= navigation_link( t('common.notes'), notes_path, {:accesskey => "o", :title => t('layouts.navigation.notes_title')} ) %></li>
|
||||
<li><%= navigation_link( t('common.review'), review_path, {:accesskey => "r", :title => t('layouts.navigation.review_title')} ) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
||||
<li><%= menu_item("contexts", contexts_path) %></li>
|
||||
<li><%= menu_item("notes", notes_path) %></li>
|
||||
<li><%= menu_item("review", review_path) %></li>
|
||||
<li><%= menu_item("recurring_todos", recurring_todos_path) %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" id="menu_view">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="menu_view_link"><%= t('layouts.navigation.view') %><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
||||
<li><%= menu_item("calendar", calendar_path) %></li>
|
||||
<li><%= menu_item("completed_tasks", done_overview_path) %></li>
|
||||
<li><%= menu_item("feeds", feeds_path) %></li>
|
||||
<li><%= menu_item("stats", stats_path) %></li>
|
||||
<li class="divider"></li>
|
||||
<li id="menu_view_toggle_contexts"><%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %></li>
|
||||
<li><%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %></li>
|
||||
<%= group_view_by_menu_entry %>
|
||||
<li><%= menu_item("toggle_contexts", "#", {:id => "toggle-contexts-nav"}) %></li>
|
||||
<li><%= menu_item("toggle_notes", "#", {:id => "toggle-notes-nav"}) %></li>
|
||||
<li><%= group_view_by_menu_entry %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= t('layouts.navigation.admin') %><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= navigation_link( t('layouts.navigation.preferences'), preferences_path, {:accesskey => "u", :title => t('layouts.navigation.preferences_title')} ) %></li>
|
||||
<li><%= navigation_link( t('layouts.navigation.export'), data_path, {:accesskey => "i", :title => t('layouts.navigation.export_title')} ) %></li>
|
||||
<li><%= menu_item("preferences", preferences_path) %></li>
|
||||
<li><%= menu_item("export", data_path) %></li>
|
||||
<% if current_user.is_admin? -%>
|
||||
<li><%= navigation_link(t('layouts.navigation.manage_users'), users_path, {:accesskey => "a", :title => t('layouts.navigation.manage_users_title')} ) %></li>
|
||||
<li><%= menu_item("manage_users", users_path) %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= t('layouts.navigation.help') %><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to t('layouts.navigation.integrations_'), integrations_path %></li>
|
||||
<li><%= link_to t('layouts.navigation.api_docs'), rest_api_docs_path %></li>
|
||||
<li><%= menu_item("keyboard_shortcuts", "#") %></li>
|
||||
<li><%= menu_item("integrations", integrations_path) %></li>
|
||||
<li><%= menu_item("api_docs", rest_api_docs_path) %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -63,10 +64,10 @@
|
|||
<input type="text" class="search-query" placeholder="Search">
|
||||
</form>
|
||||
</li>
|
||||
<li><%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
||||
<li><%= link_to("#{t('common.logout')} (#{current_user.display_name})".html_safe, logout_path) %>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -360,11 +360,7 @@ en:
|
|||
current_plural: Up-to-date
|
||||
current: Up-to-date
|
||||
layouts:
|
||||
toggle_notes: Toggle notes
|
||||
toggle_contexts: "Toggle collapsed contexts"
|
||||
toggle_contexts_title: "Make collapsed contexts (in)visible"
|
||||
next_actions_rss_feed: RSS feed of next actions
|
||||
toggle_notes_title: Toggle all notes
|
||||
mobile_navigation:
|
||||
new_action: New
|
||||
logout: Logout
|
||||
|
|
@ -376,27 +372,36 @@ en:
|
|||
contexts: Contexts
|
||||
home: Home
|
||||
navigation:
|
||||
toggle_notes: Toggle notes
|
||||
toggle_notes_title: Toggle all notes
|
||||
toggle_contexts: "Toggle collapsed contexts"
|
||||
toggle_contexts_title: "Make collapsed contexts (in)visible"
|
||||
manage_users_title: Add or delete users
|
||||
recurring_todos: Repeating todos
|
||||
recurring_todos_title: Manage recurring actions
|
||||
api_docs: REST API Docs
|
||||
api_docs_title: Documentation on how to use the Tracks API
|
||||
feeds: Feeds
|
||||
starred: Starred
|
||||
starred_title: See your starred actions
|
||||
notes_title: View all notes
|
||||
review_title: Make review
|
||||
stats: Statistics
|
||||
tickler_title: Tickler
|
||||
stats_title: See your statistics
|
||||
manage_users: Manage users
|
||||
export_title: Import and export data
|
||||
preferences: Preferences
|
||||
integrations_: Integrate Tracks
|
||||
integrations: Integrate Tracks
|
||||
integrations_title: Integrate Tracks in various other apps
|
||||
feeds_title: See a list of available feeds
|
||||
calendar_title: Calendar of due actions
|
||||
completed_tasks: Done
|
||||
stats_title: See your statistics
|
||||
tickler: Tickler
|
||||
home_title: Home
|
||||
starred_title: See your starred actions
|
||||
recurring_todos_title: Manage recurring actions
|
||||
tickler_title: Tickler
|
||||
home_title: Go to home page
|
||||
contexts: Contexts
|
||||
notes: Notes
|
||||
review: Review
|
||||
view: View
|
||||
organize: Organize
|
||||
completed_tasks_title: Completed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue