AutoCommit Don Sep 3 11:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-09-03 11:03:01 +02:00
parent e7c21ad95b
commit 4835155d06
5 changed files with 42 additions and 15 deletions

View File

@@ -78,46 +78,54 @@ ul.linklist li a i{
ul.linklist > li a.linkbox { ul.linklist > li a.linkbox {
border-radius: 0; border-radius: 0;
border: none; border: $box-border;
border-color:white; /* border-color:white;*/
padding-top: 7px; padding-top: 7px;
margin-bottom:1px; margin-bottom:0px;
margin-top:1px; margin-top:0px;
/* border-bottom: $box-border;
border-top: $box-border;
*/
border-color:white;
/* border-bottom-color:white; */
} }
ul.linklist > li a.linkbox:hover { ul.linklist > li a.linkbox:hover {
border-bottom: $box-border; border: $box-border;
border-top: $box-border; border-top: $box-border;
box-shadow: none; box-shadow: none;
border-color: black;
background: #FCFCFC; background: #FCFCFC;
margin: 0; /* margin: 0;
margin-bottom:0px; margin-bottom:0px;*/
} }
ul.linklist > li:first-child a.linkbox { margin-top:1px;} ul.linklist > li:first-child a.linkbox {}
ul.linklist > li:last-child a.linkbox { margin-bottom:1px; ul.linklist > li:last-child a.linkbox {
} }
ul.linklist > li:first-child a.linkbox { ul.linklist > li:first-child a.linkbox {
border-top-left-radius:$box-border-radius; border-top-left-radius:$box-border-radius;
border-top-right-radius:$box-border-radius; border-top-right-radius:$box-border-radius;
border-top:none; /* border-top:$box-border; */
margin-top:0px;
} }
ul.linklist > li:last-child a.linkbox { ul.linklist > li:last-child a.linkbox {
border-bottom-left-radius:$box-border-radius; border-bottom-left-radius:$box-border-radius;
border-bottom-right-radius:$box-border-radius; border-bottom-right-radius:$box-border-radius;
border-bottom:none; /* border-bottom:$box-border;*/
margin-bottom:0px;
} }
ul.linklist { ul.linklist {
border-radius: $box-border-radius; border-radius: $box-border-radius;
border: $box-border; border: $box-border;
/* box-shadow: 0px 0px 1px 1px lightgray;*/
} }

View File

@@ -1,8 +1,20 @@
class UsersController < ApplicationController class UsersController < ApplicationController
def index def index
authorize!(:index,User)
@users = User.all @users = User.all
end end
def show
@user=User.find(params[:id])
authorize!(:show, @user)
end
def set_preferred_theme
@user=User.find(params[:id])
authorize!(:set_preferred_theme, @user)
redirect_to user_url
end
def add_role def add_role
authorize!(:add_role, User)
@user= User.find(params[:id]) @user= User.find(params[:id])
if (params[:role]=="fetuser" && can?(:addfetuser,User)) if (params[:role]=="fetuser" && can?(:addfetuser,User))
@user.add_role(params[:role]) @user.add_role(params[:role])
@@ -13,6 +25,8 @@ class UsersController < ApplicationController
redirect_to users_url redirect_to users_url
end end
def fb_set_default_publish_page def fb_set_default_publish_page
authorize!(:doadmin, User)
if Fetsite::Application.config.facebookconfig_enabled if Fetsite::Application.config.facebookconfig_enabled
if params["page"].nil? || !(current_user.provider=="facebook") if params["page"].nil? || !(current_user.provider=="facebook")
redirect_to intern_home_index_path redirect_to intern_home_index_path
@@ -27,6 +41,7 @@ class UsersController < ApplicationController
end end
def all_update def all_update
authorize! :doadmin,User
params[:users].each do |id,u| params[:users].each do |id,u|
user=User.find(id) user=User.find(id)
user.fetprofile = Fetprofile.find(u[:fetprofile_id].to_i) if u[:fetprofile_id].to_i>0 user.fetprofile = Fetprofile.find(u[:fetprofile_id].to_i) if u[:fetprofile_id].to_i>0

View File

@@ -152,6 +152,7 @@ end
can :show, Neuigkeit, :cache_is_published=>true, :rubrik=>{:public=>true} can :show, Neuigkeit, :cache_is_published=>true, :rubrik=>{:public=>true}
if loggedin if loggedin
can :show, :id => user.id
end end
if( user.has_role?("fetuser") || user.has_role?("fetadmin")) if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
@@ -169,6 +170,9 @@ end
if user.has_role?("fetadmin") if user.has_role?("fetadmin")
can :addfetuser, User can :addfetuser, User
can :addfetadmin, User can :addfetadmin, User
can :add_role, User
can :show, User
can :index, User
can :edit, User can :edit, User
can :manage, User can :manage, User
end end

View File

@@ -67,7 +67,7 @@ end
</div> </div>
<% if can?(:edit, @fetprofile) %> <% if can?(:edit, @fetprofile) %>
<div> <div>
<span class="btn-group"> <span>
<%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %> <%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %>
<%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %> <%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %>
</span> </span>

View File

@@ -33,7 +33,7 @@
</td> </td>
<td> <td>
<%= semantic_fields_for "users[#{user.id}]", user do |f|%> <%= semantic_fields_for "users[#{user.id}]", user do |f|%>
<%= f.input :fetprofile ,:label=>false , :as=>:select , :collection=>Fetprofile.all %> <%= f.input :fetprofile ,:label=>false , :as=>:select , :collection=>Fetprofile.order(:vorname,:nachname) %>
<% end %> <% end %>
</td> </td>