Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: fac/errbit
...
head fork: fac/errbit
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
1  app/assets/javascripts/application.js.erb
@@ -7,6 +7,7 @@
//= require rails.alerts
//= require errbit
//= require apps.show
+//= require bootstrap/bootstrap
//= require_self
// Allow any gems named 'errbit_*' to require their own assets
View
4 app/assets/javascripts/bootstrap.js.coffee
@@ -0,0 +1,4 @@
+jQuery ->
+ $("a[rel=popover]").popover()
+ $(".tooltip").tooltip()
+ $("a[rel=tooltip]").tooltip()
View
21 app/helpers/application_helper.rb
@@ -1,4 +1,25 @@
module ApplicationHelper
+
+ def available_apps
+ if current_user.present?
+ if current_user.admin?
+ App.all
+ else
+ current_user.apps
+ end
+ else
+ []
+ end
+ end
+
+ def current_app
+ if @app && @app.persisted?
+ @app
+ else
+ nil
+ end
+ end
+
def message_graph(problem)
create_percentage_table_for(problem.messages)
end
View
15 app/views/shared/_navigation.html.haml
@@ -1,10 +1,21 @@
.nav-collapse
%ul{:class=> 'nav'}
- %li.apps{:class => active_if_here(:apps)}= link_to 'Apps', apps_path
+ %li.dropdown.apps{:class => active_if_here(:apps)}
+ = link_to '#', :class => 'dropdown-toggle', :"data-toggle" => 'dropdown' do
+ - if current_app.present?
+ = current_app.name
+ - else
+ Apps
+ %b.caret
+ %ul.dropdown-menu
+ - for app in available_apps
+ %li= link_to app.name, app_path(app)
+ - if current_user.admin?
+ %li= link_to 'Add a New App', new_app_path
%li.divider-vertical
%li.errs{:class => active_if_here(:errs)}= link_to 'Errors', errs_path
%li.divider-vertical
- if user_signed_in? && current_user.admin?
%li.users{:class => active_if_here(:users)}= link_to 'Users', users_path
%form{:class => 'navbar-search pull-left'}
- %input{:type => 'text', :class => 'search-query span2', :placeholder => 'Search'}
+ %input{:type => 'text', :class => 'search-query span2', :placeholder => 'Search'}

No commit comments for this range

Something went wrong with that request. Please try again.