Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #94 from OSC/develop_dropdown_visibility
Browse files Browse the repository at this point in the history
Develop dropdown visibility
  • Loading branch information
ericfranz committed Dec 13, 2016
2 parents b694774 + 4fd66cd commit aa378e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/apps/nav_config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class NavConfig
class << self
attr_accessor :categories
attr_accessor :show_develop_dropdown
end
self.categories = ["Files", "Jobs", "Clusters", "Desktops"]
self.show_develop_dropdown = ENV['OOD_APP_SHARING'].present?
end
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ul class="nav navbar-nav">
<%= content_tag(:li, class: current_page?(root_path) ? "active" : "") { link_to 'Home', root_path } if ENV['OOD_APP_SHARING'].present?%>
<%= render partial: 'layouts/nav/group', collection: @nav_groups %>
<%= render partial: 'layouts/nav/develop_dropdown' if ENV['OOD_APP_SHARING'].present? %>
<%= render partial: 'layouts/nav/develop_dropdown' if NavConfig.show_develop_dropdown %>
</ul>
<ul class="nav navbar-nav navbar-right">
<%= render partial: "layouts/nav/help_dropdown" %>
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/ood.rb.awesim
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

# don't show any apps in nav
NavConfig.categories = []

# don't show develop dropdown unless you are setup for app sharing
NavConfig.show_develop_dropdown = UsrRouter.base_path.directory?

0 comments on commit aa378e1

Please sign in to comment.