Add some links on application view
This commit is contained in:
parent
20feaf6a12
commit
f217f07a83
3 changed files with 14 additions and 4 deletions
|
@ -7,7 +7,14 @@
|
||||||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
%body
|
%body
|
||||||
- flash.each do |key, value|
|
.pure-menu.pure-menu-horizontal
|
||||||
.pure-alert{ class: "pure-alert-#{key}" }
|
%ul.pure-menu-list
|
||||||
= value
|
- 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
|
= yield
|
||||||
|
|
3
app/views/partials/_flash.html.haml
Normal file
3
app/views/partials/_flash.html.haml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
- flash.each do |key, value|
|
||||||
|
.pure-alert{ class: "pure-alert-#{key}" }
|
||||||
|
= value
|
|
@ -5,7 +5,7 @@
|
||||||
- else
|
- else
|
||||||
= f.hidden_field :debtor, value: current_user.name
|
= f.hidden_field :debtor, value: current_user.name
|
||||||
= f.collection_select :creditor, User.all, :name, :name, {}, { class: 'select2-selector' }
|
= 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
|
= f.input :message, required: true
|
||||||
.pure-controls
|
.pure-controls
|
||||||
= f.button :submit, "Send it!"
|
= f.button :submit, "Send it!"
|
||||||
|
|
Loading…
Reference in a new issue