diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index a8b0f6a..177b595 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -176,7 +176,7 @@ } #main-nav-tabs li.active a, #main-nav-tabs li.active a:active, #main-nav-tabs li a:hover, lang-dropdown-link:hover{ - background-color: @orange_colour!important;; + background-color: @orange_colour; color: @white_colour !important; font-weight: bold; border: 1px solid @orange_colour; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 182ee9a..cf4b5da 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,7 +23,7 @@ # if locales data is present in the parameter from url use it I18n.locale = params[:locale] elsif user_signed_in? and !current_user[:language_id].nil? - I18n.locale = Language.find_by_id(current_user[:language_id]).name + I18n.locale = Language.find_by_id(current_user[:language_id]).abbreviation # if user has set preferred language use it elsif false # TODO # use user's organization language, keep in mine the "OTHER ORG" edge case which should use english diff --git a/app/models/version.rb b/app/models/version.rb index 129edf9..db03966 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -1,4 +1,3 @@ -<<<<<<< HEAD class Version < ActiveRecord::Base #associations between tables @@ -40,40 +39,3 @@ end end -======= -class Version < ActiveRecord::Base - - #associations between tables - belongs_to :phase - - has_many :sections, :dependent => :destroy - has_many :questions, :through => :sections, :dependent => :destroy - has_many :plans - - #Link the data -# accepts_nested_attributes_for :phase - accepts_nested_attributes_for :sections, :allow_destroy => true - - attr_accessible :id, :description, :number, :published, :title, :phase_id, - :sections_attributes, :as => [:default, :admin] - - def to_s - "#{title}" - end - - - - def global_sections - sections.where("organisation_id = ? ", phase.dmptemplate.organisation_id).load - end - - amoeba do - include_association :sections - include_association :questions - set :published => 'false' - prepend :title => "Copy of " - end - - -end ->>>>>>> locales