diff --git a/app/assets/stylesheets/themes/blue1/application.css.scss b/app/assets/stylesheets/themes/blue1/application.css.scss index 28f08bb..53484fe 100755 --- a/app/assets/stylesheets/themes/blue1/application.css.scss +++ b/app/assets/stylesheets/themes/blue1/application.css.scss @@ -12,7 +12,8 @@ *= require_self * require_tree . *= require jquery.fileupload-ui -*= require jquery.datetimepicker + *= require jquery.datetimepicker + *= require jquery.ui.dialog * require 'bootstrap' * require 'neuigkeiten' diff --git a/app/controllers/moduls_controller.rb b/app/controllers/moduls_controller.rb index 9934e86..d53aed8 100755 --- a/app/controllers/moduls_controller.rb +++ b/app/controllers/moduls_controller.rb @@ -175,11 +175,12 @@ end end def load_toolbar_show - @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("lva.add"), :path=>new_lva_path(:modul_id =>@modul.id)}] - @toolbar_elements << {:hicon=>'icon-pencil', :text=>"Lvas bearbeiten", :path=>edit_lvas_modul_path(@modul)} - @toolbar_elements << {:hicon=>'icon-plus-sign', :text=>"ADD FROM TISS", :path=>load_tiss_modul_path(:modul_id =>@modul.id)} - @toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t("modul.edit"), :path=>edit_modul_path(@modul)} - @toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t("common.delete"),:path=>@modul , :method=>:delete , :data=>{:confirm =>'Are you sure'}} + @toolbar_elements=[] + @toolbar_elements = {:hicon=>'icon-plus-sign', :text=>I18n.t("lva.add"), :path=>new_lva_path(:modul_id =>@modul.id)} if can? :new, Lva + @toolbar_elements << {:hicon=>'icon-pencil', :text=>"Lvas bearbeiten", :path=>edit_lvas_modul_path(@modul)} if can? :edit, Lva + @toolbar_elements << {:hicon=>'icon-plus-sign', :text=>"ADD FROM TISS", :path=>load_tiss_modul_path(:modul_id =>@modul.id)} if can? :load_tiss, Modul + @toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t("modul.edit"), :path=>edit_modul_path(@modul)} if can? :edit, @modul + @toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t("common.delete"),:path=>@modul , :method=>:delete , :data=>{:confirm =>'Are you sure'}} if can? :delete, @modul @topbar_elements = [{:hicon=>'icon-list', :text=>I18n.t("modul.list"),:path=>moduls_path}] @tb=[] @@ -188,7 +189,7 @@ end def load_toolbar_index - @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}] + @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}] if can? :new , Modul @topbar_elements =[{:hicon=>'icon-list', :text=>I18n.t("studien.allestudien"),:path=>studien_path}] @topbar_elements<<{:hicon=>'icon-list', :text=>I18n.t("modul.list"),:path=>moduls_path} @topbar_elements<<{:hicon=>'icon-list', :text=>I18n.t("lva.list"),:path=>lvas_path} diff --git a/app/models/ability.rb b/app/models/ability.rb index e42d236..530d4e9 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -94,7 +94,7 @@ class Ability can :showintern, Rubrik can :seeintern, User can :shownonpublic, Rubrik - + can :manage, Nlink end if user.has_role?("newsadmin") || user.has_role?("fetadmin") can :addmoderator, Rubrik diff --git a/app/views/home/_beispiele.html.erb b/app/views/home/_beispiele.html.erb index 5b73511..7c48beb 100644 --- a/app/views/home/_beispiele.html.erb +++ b/app/views/home/_beispiele.html.erb @@ -16,7 +16,7 @@ <%=b.name%> (<%=b.lva.full_name%>)