Add some links on application view

This commit is contained in:
benji 2015-09-09 17:34:49 +02:00
parent 20feaf6a12
commit f217f07a83
3 changed files with 14 additions and 4 deletions

View file

@ -7,7 +7,14 @@
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body
- flash.each do |key, value|
.pure-alert{ class: "pure-alert-#{key}" }
= value
.pure-menu.pure-menu-horizontal
%ul.pure-menu-list
- if current_user
%li.pure-menu-item
= link_to current_user.name.capitalize, current_user, class: "pure-menu-link"
%li.pure-menu-item
= link_to "New Transaction", new_transaction_path, class: "pure-menu-link"
- else
= link_to "Sign in", user_omniauth_authorize_path(:zeuswpi), class: "pure-menu-link" unless current_user
= render 'partials/flash'
= yield

View file

@ -0,0 +1,3 @@
- flash.each do |key, value|
.pure-alert{ class: "pure-alert-#{key}" }
= value

View file

@ -5,7 +5,7 @@
- else
= f.hidden_field :debtor, value: current_user.name
= f.collection_select :creditor, User.all, :name, :name, {}, { class: 'select2-selector' }
= f.input :amount
= f.input :cents, input_html: { value: @transaction.amount }
= f.input :message, required: true
.pure-controls
= f.button :submit, "Send it!"