mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Condense "Admin", "Help", and "Logout" into a single "Options" menu
This commit is contained in:
parent
1dfdad96fe
commit
5173f94993
4 changed files with 40 additions and 36 deletions
|
|
@ -46,19 +46,6 @@
|
||||||
<%= group_view_by_menu_entry %>
|
<%= group_view_by_menu_entry %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
||||||
<%= t('layouts.navigation.admin') %> <span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><%= link_to t('layouts.navigation.preferences'), preferences_path, accesskey: 'u', title: t('layouts.navigation.preferences_title') %></li>
|
|
||||||
<li><%= link_to t('layouts.navigation.export'), data_path, accesskey: 'e', title: t('layouts.navigation.export_title') %></li>
|
|
||||||
<li><%= link_to t('layouts.navigation.import'), import_data_path, accesskey: 'i', title: t('layouts.navigation.import_title') %></li>
|
|
||||||
<% if current_user.is_admin? -%>
|
|
||||||
<li><%= link_to t('layouts.navigation.manage_users'), users_path, accesskey: 'a', title: t('layouts.navigation.manage_users_title') %></li>
|
|
||||||
<% end -%>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||||
<%= t('layouts.navigation.help') %> <span class="caret"></span>
|
<%= t('layouts.navigation.help') %> <span class="caret"></span>
|
||||||
|
|
@ -76,8 +63,24 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li>
|
<li class="dropdown">
|
||||||
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<%= icon('cog', class: 'hidden-xs') %>
|
||||||
|
<%= content_tag :span, t('layouts.navigation.options'), class: 'visible-xs-inline' %>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><%= link_to icon_fw('sign-out', t('common.logout')), logout_path %></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li class="dropdown-header"><%= current_user.display_name %></li>
|
||||||
|
<li><%= link_to icon_fw('wrench', t('layouts.navigation.preferences')), preferences_path, accesskey: 'u', title: t('layouts.navigation.preferences_title') %></li>
|
||||||
|
<li><%= link_to icon_fw('download', t('layouts.navigation.export')), data_path, accesskey: 'e', title: t('layouts.navigation.export_title') %></li>
|
||||||
|
<li><%= link_to icon_fw('upload', t('layouts.navigation.import')), import_data_path, accesskey: 'i', title: t('layouts.navigation.import_title') %></li>
|
||||||
|
<% if current_user.is_admin? %>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li class="dropdown-header"><%= t('layouts.navigation.admin') %></li>
|
||||||
|
<li><%= link_to icon_fw('users', t('layouts.navigation.manage_users')), users_path, accesskey: 'a', title: t('layouts.navigation.manage_users_title') %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,7 @@ en:
|
||||||
show_empty_containers_project: "Show empty projects"
|
show_empty_containers_project: "Show empty projects"
|
||||||
show_empty_containers_context: "Show empty contexts"
|
show_empty_containers_context: "Show empty contexts"
|
||||||
show_empty_containers_title: "Show or hide the empty projects or contexts"
|
show_empty_containers_title: "Show or hide the empty projects or contexts"
|
||||||
|
options: Options
|
||||||
footer:
|
footer:
|
||||||
send_feedback: Send feedback on %{version}
|
send_feedback: Send feedback on %{version}
|
||||||
sidebar:
|
sidebar:
|
||||||
|
|
|
||||||
|
|
@ -31,24 +31,24 @@ Feature: Existing user logging in
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| page | next page | logout |
|
| page | next page | logout |
|
||||||
| home page | home page | Logout (Test User) |
|
| home page | home page | Logout |
|
||||||
| contexts page | contexts page | Logout (Test User) |
|
| contexts page | contexts page | Logout |
|
||||||
| projects page | projects page | Logout (Test User) |
|
| projects page | projects page | Logout |
|
||||||
| notes page | notes page | Logout (Test User) |
|
| notes page | notes page | Logout |
|
||||||
| recurring todos page | recurring todos page | Logout (Test User) |
|
| recurring todos page | recurring todos page | Logout |
|
||||||
| statistics page | statistics page | Logout (Test User) |
|
| statistics page | statistics page | Logout |
|
||||||
| manage users page | manage users page | 401 Unauthorized |
|
| manage users page | manage users page | 401 Unauthorized |
|
||||||
| integrations page | integrations page | Logout (Test User) |
|
| integrations page | integrations page | Logout |
|
||||||
| starred page | starred page | Logout (Test User) |
|
| starred page | starred page | Logout |
|
||||||
| tickler page | tickler page | Logout (Test User) |
|
| tickler page | tickler page | Logout |
|
||||||
| calendar page | calendar page | Logout (Test User) |
|
| calendar page | calendar page | Logout |
|
||||||
| feeds page | feeds page | Logout (Test User) |
|
| feeds page | feeds page | Logout |
|
||||||
| preference page | preference page | Logout (Test User) |
|
| preference page | preference page | Logout |
|
||||||
| export page | export page | Logout (Test User) |
|
| export page | export page | Logout |
|
||||||
| rest api docs page | rest api docs page | Logout (Test User) |
|
| rest api docs page | rest api docs page | Logout |
|
||||||
| search page | search page | Logout (Test User) |
|
| search page | search page | Logout |
|
||||||
| "top secret" project for user "testuser" | "top secret" project for user "testuser" | Logout (Test User) |
|
| "top secret" project for user "testuser" | "top secret" project for user "testuser" | Logout |
|
||||||
| context page for "@secret location" for user "testuser" | context page for "@secret location" for user "testuser" | Logout (Test User) |
|
| context page for "@secret location" for user "testuser" | context page for "@secret location" for user "testuser" | Logout |
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: When session expires, you should be logged out
|
Scenario: When session expires, you should be logged out
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,6 @@ Feature: Manage preferences
|
||||||
|
|
||||||
Scenario: I can edit preferences
|
Scenario: I can edit preferences
|
||||||
When I go to the preferences page
|
When I go to the preferences page
|
||||||
Then I should see "Logout (testuser)"
|
Then I should see "testuser Preferences"
|
||||||
When I edit my last name to "Tester"
|
When I edit my last name to "Tester"
|
||||||
Then I should see "Logout (Tester)"
|
Then I should see "Tester Preferences"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue