put settings in side bar

This commit is contained in:
Felix Van der Jeugt 2016-02-04 23:28:13 +01:00
parent a2f5b172e3
commit 63539e01f7
2 changed files with 22 additions and 6 deletions

View file

@ -38,6 +38,10 @@ $gray-medium-light: #eaeaea;
text-align: center;
}
.float-right{
float: right;
}
.form-field{
margin-bottom: 15px;
text-align: bottom;

View file

@ -1,10 +1,9 @@
.col-sm-3
%div
%h2
%h2.float-right
= content_tag :div, image_tag(@user.avatar, class: "img-circle img-thumbnail center"), class: "user_avatar center"
%h2.center
= @user.name
- if can? :edit, @user
= link_to content_tag(:small, content_tag(:span, "", class: "glyphicon glyphicon-cog")), edit_user_path(@user)
= content_tag :div, image_tag(@user.avatar, class: "img-circle img-thumbnail center"), class: "user_avatar center"
%ul.list-group
%li.list-group-item.text-muted Orders
%li.list-group-item
@ -19,8 +18,21 @@
%ul.list-group
%li.list-group-item.text-muted
- if @user.dagschotel
Huidige dagschotel
\#{image_tag @user.dagschotel.avatar}
.center
%p= image_tag @user.dagschotel.avatar, title: "Huidige dagschotel"
\#{link_to "Change dagschotel", edit_dagschotel_user_path(@user), class: "btn btn-default btn-block"}
- else
= link_to "Set dagschotel", edit_dagschotel_user_path(@user), class: "btn btn-default btn-block"
%li.list-group-item.text-muted
%p Orders can be placed on koelkast for every public account. Private accounts can only order products by logging in here.
// = link_to "Go #{if @user.private then "public" else "private" end}", toggle_privacy_user_path(@user), class: "btn btn-default btn-block"
= f_form_for @user do |f|
= f.error_messages
.hidden
= f.check_box :private, checked: !@user.private
= f.submit "Go #{@user.private ? "public" : "private"}", class: "btn btn-default btn-block"
%li.list-group-item.text-muted
= f_form_for @user do |f|
= f.error_messages
= f.file_field :avatar
= f.submit "Change avatar", class: "btn btn-default btn-block"