diff --git a/app/views/account_automatic_topup_configs/edit.html.slim b/app/views/account_automatic_topup_configs/edit.html.slim index ff7d7504..939162e3 100644 --- a/app/views/account_automatic_topup_configs/edit.html.slim +++ b/app/views/account_automatic_topup_configs/edit.html.slim @@ -5,5 +5,8 @@ .field = f.text_field :amount, autofocus: true, class: "input", placeholder: "Weekly amount" div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', account_path(account), class: 'button is-light' + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back = f.submit 'Update', class: "button is-primary" diff --git a/app/views/account_automatic_topup_configs/new.html.slim b/app/views/account_automatic_topup_configs/new.html.slim index 7f369bf7..68f5e3b6 100644 --- a/app/views/account_automatic_topup_configs/new.html.slim +++ b/app/views/account_automatic_topup_configs/new.html.slim @@ -5,5 +5,8 @@ .field = f.text_field :amount, autofocus: true, class: "input", placeholder: "Weekly amount" div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', account_path(account), class: 'button is-light' + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back = f.submit 'Save', class: "button is-primary" diff --git a/app/views/account_shares/_account_share.html.slim b/app/views/account_shares/_account_share.html.slim index 0973a6fc..1d583ea5 100644 --- a/app/views/account_shares/_account_share.html.slim +++ b/app/views/account_shares/_account_share.html.slim @@ -11,4 +11,8 @@ tr td= link_to 'link', public_account_path(token: account_share.token) - else td= link_to 'link', accept_account_share_url(token: account_share.token) - td= link_to 'Cancel', account_share_path(account, account_share), method: :delete, data: {confirm: 'Cancel this share?'}, class: 'button is-small is-light' + td + =link_to account_share_path(account, account_share), method: :delete, data: {confirm: 'Cancel this share?'}, class: 'button is-small is-light' do + span.icon + i.fa.fa-undo + |   Cancel \ No newline at end of file diff --git a/app/views/account_shares/index.html.slim b/app/views/account_shares/index.html.slim index 60c8f444..0e16c7ba 100644 --- a/app/views/account_shares/index.html.slim +++ b/app/views/account_shares/index.html.slim @@ -1,9 +1,32 @@ h2.title.is-4 | Account shares -.buttons.mt-4 - = link_to 'Back', account_path(account), class: 'button is-light' - = link_to 'New private share', new_account_share_path, class: 'button is-light mr-4' - = link_to 'New public share', new_account_public_account_share_path, class: 'button is-light' +.buttons.for-desktop.mt-4 + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = link_to new_account_share_path, class: 'button is-light mr-4' do + span.icon + i.fa.fa-user + |   Private share + = link_to new_account_public_account_share_path, class: 'button is-light' do + span.icon + i.fa.fa-users + |   Public share + +.buttons.for-mobile.mt-4 + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + = link_to new_account_share_path, class: 'button is-light mr-4' do + span.icon + i.fa.fa-user + |   Private share + = link_to new_account_public_account_share_path, class: 'button is-light' do + span.icon + i.fa.fa-users + |   Public share + .columns .column .card diff --git a/app/views/account_shares/new.html.slim b/app/views/account_shares/new.html.slim index c6dccb37..d2cf4fce 100644 --- a/app/views/account_shares/new.html.slim +++ b/app/views/account_shares/new.html.slim @@ -8,8 +8,14 @@ .field = f.text_field :name, name: 'account_share[name]', autofocus: true, class: "input", placeholder: "Name" .field - = f.email_field :email, name: 'account_share[email]', type: "email" + = f.email_field :email, name: 'account_share[email]', type: "email", placeholder: "email" br div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', account_shares_path(account), class: 'button is-light' - = f.submit "Send invitation", class: 'button is-primary' + = link_to account_shares_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to account_shares_path, class: 'button is-primary' do + span.icon + i.fa.fa-paper-plane + |   Send invitation diff --git a/app/views/accounts/_objective.html.slim b/app/views/accounts/_objective.html.slim index 268d9dca..559f3af8 100644 --- a/app/views/accounts/_objective.html.slim +++ b/app/views/accounts/_objective.html.slim @@ -9,4 +9,8 @@ tr | #{goal_percentage(account, objective)} progress.progress.is-small(value="#{goal_percentage(account, objective).chomp('%')}" max="100") #{goal_percentage(account, objective)} td= ([objective.amount - account.balance, 0].max / account.automatic_topup_configs.sum(:amount).+(0.1)).ceil - td= link_to 'Delete', objective_path(objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-small is-light' + td + = link_to objective_path(objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-small is-light' do + span.icon + i.fa.fa-trash-o + |   Delete diff --git a/app/views/accounts/_transaction.html.slim b/app/views/accounts/_transaction.html.slim index 5a7522b5..123bdebc 100644 --- a/app/views/accounts/_transaction.html.slim +++ b/app/views/accounts/_transaction.html.slim @@ -6,7 +6,11 @@ tr - else td.is-plus-color= transaction.signed_amount(account) td= transaction.description - td.for-desktop= link_to 'Cancel', transaction_path(transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-small is-light' + td.for-desktop + = link_to transaction_path(transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-small is-light' do + span.icon + i.fa.fa-undo + |   Cancel td.for-mobile.px-0 div.dropdown.is-right dropdown-id="dropdown-transaction-#{transaction.id}" .dropdown-trigger @@ -16,6 +20,11 @@ tr .dropdown-menu.cover#dropdown-menu role="menu" .dropdown-content.cover = link_to transaction_path(id: transaction, account_id: account), class: "button is-small is-white is-fullwidth" do - | View details + span.icon + i.fa.fa-list-ul + |   View details = link_to transaction_path(id: transaction, account_id: account), method: :delete, data: { confirm: 'Cancel this transaction?' }, class: 'button is-danger is-small is-fullwidth' do - | Cancel transaction + span.icon + i.fa.fa-undo + |   Cancel transaction + diff --git a/app/views/accounts/edit.html.slim b/app/views/accounts/edit.html.slim index 0ad334db..8a156a42 100644 --- a/app/views/accounts/edit.html.slim +++ b/app/views/accounts/edit.html.slim @@ -11,6 +11,12 @@ |   = f.label :notification, "Report transactions" br - div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', account_path(account), class: 'button is-light' - = f.submit 'Save', class: 'button is-primary' + buttons.is-flex.is-justify-content-flex-end + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to account_path, class: 'button is-primary' do + span.icon + i.fa.fa-hdd-o + |   Save diff --git a/app/views/accounts/new.html.slim b/app/views/accounts/new.html.slim index b81b798c..2d51d192 100644 --- a/app/views/accounts/new.html.slim +++ b/app/views/accounts/new.html.slim @@ -10,5 +10,11 @@ .notification.is-light | This amount will be automatically added to the account every week. You will receive an email notification about that .buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', my_account_path, class: 'button is-light' - = form.submit 'Save', class: "button is-primary is-fullwidth" + = link_to my_account_path, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to my_account_path, class: 'button is-primary' do + span.icon + i.fa.fa-hdd-o + |   Save diff --git a/app/views/accounts/show.html.slim b/app/views/accounts/show.html.slim index fc3fa183..a71d7c67 100644 --- a/app/views/accounts/show.html.slim +++ b/app/views/accounts/show.html.slim @@ -1,10 +1,38 @@ h2.title.is-4 | Account details -.buttons - = link_to 'Back', my_account_path, class: 'button is-light' - = link_to 'Edit', edit_account_path(account), class: 'button is-light' - = link_to 'Account shares', account_shares_path(account), class: 'button is-light' - = link_to 'Archive', archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger' + +.buttons.for-desktop + = link_to my_account_path, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = link_to edit_account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-pencil + |   Edit + = link_to account_shares_path(account), class: 'button is-light' do + span.icon + i.fa.fa-share-alt + |   Account shares + = link_to archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger' do + span.icon + i.fa.fa-archive + |   Archive + +.buttons.for-mobile + = link_to my_account_path, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + = link_to edit_account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-pencil + = link_to account_shares_path(account), class: 'button is-light' do + span.icon + i.fa.fa-share-alt + = link_to archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger' do + span.icon + i.fa.fa-archive + .columns .column .card @@ -82,9 +110,14 @@ h2.title.is-4 td= config.from_account.name || config.from_account.email td= config.amount td - = link_to 'Edit', edit_account_account_automatic_topup_config_path(account, config), class: 'button is-small is-light' - |   - = link_to 'Cancel', account_account_automatic_topup_config_path(account, config), method: :delete, data: { confirm: 'Cancel this top up?' }, class: 'button is-small is-light' + = link_to edit_account_account_automatic_topup_config_path(account, config), class: 'button is-small is-light' do + span.icon + i.fa.fa-pencil + |   Edit + = link_to account_account_automatic_topup_config_path(account, config), method: :delete, data: { confirm: 'Cancel this top up?' }, class: 'button is-small is-light' do + span.icon + i.fa.fa-undo + |   Cancel .card-footer = link_to '+Add', new_account_account_automatic_topup_config_path(account), class: 'card-footer-item' - if account.accumulative_balance_data.present? diff --git a/app/views/devise/registrations/edit.html.slim b/app/views/devise/registrations/edit.html.slim index e8464846..ca96cfcb 100644 --- a/app/views/devise/registrations/edit.html.slim +++ b/app/views/devise/registrations/edit.html.slim @@ -19,5 +19,8 @@ p.help | (we need your current password to confirm your changes) div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', request.referer.present? && request.referer != edit_user_registration_path ? request.referer : root_path, class: 'button is-light' + = link_to request.referer.present? && request.referer != edit_user_registration_path ? request.referer : root_path, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back = f.submit "Update", class: "button is-primary" diff --git a/app/views/feedbacks/new.html.slim b/app/views/feedbacks/new.html.slim index 0d7d3487..80423fae 100644 --- a/app/views/feedbacks/new.html.slim +++ b/app/views/feedbacks/new.html.slim @@ -6,5 +6,8 @@ = form.text_area :description, autofocus: true, class: "textarea", placeholder: "Your feedback" .field .buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', request.referer, class: 'button is-light' + = link_to request.referer, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back = form.submit 'Save', class: "button is-primary is-fullwidth" diff --git a/app/views/my_accounts/show.html.slim b/app/views/my_accounts/show.html.slim index 90d8e964..9a5f3470 100644 --- a/app/views/my_accounts/show.html.slim +++ b/app/views/my_accounts/show.html.slim @@ -1,7 +1,10 @@ .columns .column.is-flex.is-justify-content-flex-end - if account.children.unarchived.present? || shared_accounts.present? - = link_to 'Add account', new_account_path, class: 'button is-primary' + = button_to new_account_path, method: :get, class: 'button is-primary' do + span.icon + i.fa.fa-plus + |   Add account - if account.children.unarchived.present? || shared_accounts.present? - account.children.unarchived.each do |child| diff --git a/app/views/objectives/new.html.slim b/app/views/objectives/new.html.slim index 12cb737c..f2130847 100644 --- a/app/views/objectives/new.html.slim +++ b/app/views/objectives/new.html.slim @@ -7,5 +7,11 @@ .field = f.text_field :amount, class: "input", placeholder: "Amount" div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', account_path(account), class: 'button is-light' - = f.submit 'Save', class: 'button is-primary' + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to account_objectives_path(account), class: 'button is-primary' do + span.icon + i.fa.fa-hdd-o + |   Save \ No newline at end of file diff --git a/app/views/public_account_shares/new.html.slim b/app/views/public_account_shares/new.html.slim index 524f485d..fa73876b 100644 --- a/app/views/public_account_shares/new.html.slim +++ b/app/views/public_account_shares/new.html.slim @@ -6,5 +6,8 @@ = link_to account.name, account_path(account) = form_with(url: account_public_account_shares_path, method: :post) do |form| .buttons.is-centered - = link_to 'Back', account_shares_path(account), class: 'button is-light' + = link_to account_shares_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back = form.submit 'Create', class: 'button is-primary' diff --git a/app/views/public_account_shares/show.html.slim b/app/views/public_account_shares/show.html.slim index 58519908..3b97dda6 100644 --- a/app/views/public_account_shares/show.html.slim +++ b/app/views/public_account_shares/show.html.slim @@ -1,7 +1,10 @@ h2.title.is-4 | Account details .buttons - = link_to 'Back', my_account_path, class: 'button is-light' + = link_to my_account_path, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back .columns .column .card diff --git a/app/views/spends/new.html.slim b/app/views/spends/new.html.slim index 3b00d1f6..481f824f 100644 --- a/app/views/spends/new.html.slim +++ b/app/views/spends/new.html.slim @@ -13,5 +13,11 @@ .field = f.text_field :description, class: "input", placeholder: "Description" div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', request.referer, class: 'button is-light' - = f.submit 'Save', class: "button is-primary is-fullwidth" + = link_to request.referer, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to account_spend_path(account), class: 'button is-primary' do + span.icon + i.fa.fa-hdd-o + |   Save diff --git a/app/views/topups/new.html.slim b/app/views/topups/new.html.slim index 1b3499c2..6c507d51 100644 --- a/app/views/topups/new.html.slim +++ b/app/views/topups/new.html.slim @@ -13,5 +13,11 @@ .field = f.text_field :description, class: "input", placeholder: "Description" div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Back', request.referer, class: 'button is-light' - = f.submit 'Save', class: "button is-primary is-fullwidth" + = link_to request.referer, class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back + = button_to account_topup_path(account), class: 'button is-primary' do + span.icon + i.fa.fa-hdd-o + |   Save diff --git a/app/views/transactions/show.html.slim b/app/views/transactions/show.html.slim index 746a2675..38c8020f 100644 --- a/app/views/transactions/show.html.slim +++ b/app/views/transactions/show.html.slim @@ -18,5 +18,11 @@ div.content td= 'Description ' td= transaction.description div.buttons.is-flex.is-justify-content-flex-end - = link_to 'Cancel transaction', transaction_path(id: transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-danger' - = link_to 'Back', account_path(account), class: 'button is-light' \ No newline at end of file + = link_to transaction_path(id: transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-danger' do + span.icon + i.fa.fa-undo + |   Cancel transaction + = link_to account_path(account), class: 'button is-light' do + span.icon + i.fa.fa-chevron-left + |   Back \ No newline at end of file