diff --git a/Gemfile b/Gemfile index f48d47a..4868c0d 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~> 4.0.0' -gem 'announcement', git: 'git@gitlab.tp.rulingcom.com:saurabh/announcement-test.git' +gem 'announcement', path: '/Users/saurabhbhatia/announcement-test' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby diff --git a/app/assets/stylesheets/admin/dashboards.css.scss b/app/assets/stylesheets/admin/dashboards.css.scss deleted file mode 100644 index aa61d87..0000000 --- a/app/assets/stylesheets/admin/dashboards.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the admin/dashboards controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss deleted file mode 100644 index 6ec6a8f..0000000 --- a/app/assets/stylesheets/scaffolds.css.scss +++ /dev/null @@ -1,69 +0,0 @@ -body { - background-color: #fff; - color: #333; - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; -} - -p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; -} - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; -} - -a { - color: #000; - &:visited { - color: #666; - } - &:hover { - color: #fff; - background-color: #000; - } -} - -div { - &.field, &.actions { - margin-bottom: 10px; - } -} - -#notice { - color: green; -} - -.field_with_errors { - padding: 2px; - background-color: red; - display: table; -} - -#error_explanation { - width: 450px; - border: 2px solid red; - padding: 7px; - padding-bottom: 0; - margin-bottom: 20px; - background-color: #f0f0f0; - h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - margin-bottom: 0px; - background-color: #c00; - color: #fff; - } - ul li { - font-size: 12px; - list-style: square; - } -} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b5b458e..6ba90e6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -132,6 +132,14 @@ module ApplicationHelper data end + def active_for_controllers(*controller_names) + (controller_names.include?(controller.controller_name) || controller_names.include?(request.fullpath)) ? 'active' : nil + end + + def visible_for_controllers(*controller_names) + (controller_names.include?(controller.controller_name) || controller_names.include?(request.fullpath)) ? '' : 'hide' + end + def active_for_action(controller_name, action_name) ((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil end diff --git a/app/views/layouts/structure.html.erb b/app/views/layouts/structure.html.erb index c087a70..3636c49 100644 --- a/app/views/layouts/structure.html.erb +++ b/app/views/layouts/structure.html.erb @@ -1,7 +1,7 @@
-