diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_footer.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/_navigation.html.haml | 6 | ||||
-rw-r--r-- | app/views/users/_user.html.haml | 34 | ||||
-rw-r--r-- | app/views/users/index.html.haml | 3 |
4 files changed, 38 insertions, 6 deletions
diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index fa523d4..ff84dff 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -15,3 +15,4 @@ = link_to icon('comment') + t(:contact), contact_path - if paid_service_level? = link_to icon('shopping-cart') + t(:pricing), pricing_path + = link_to icon('barcode') + t(:Donations), new_payment_path if APP_CONFIG[:payment].present? diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index dccba0c..63a361a 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -7,6 +7,8 @@ = link_to_navigation ".tickets", auto_tickets_path, active: controller?(:tickets) - if APP_CONFIG[:billing] - = link_to_navigation :billing_settings, billing_top_link(@user), - active: controller?(:customer, :payments, :subscriptions, :credit_card_info) + = link_to_navigation :donations, new_payment_path, + active: (controller?(:donations) and action?(:new)) + = link_to_navigation :subscriptions, billing_top_link(@braintree_customer_id), + active: controller?(:subscriptions) = link_to_navigation :logout, logout_path, method: :delete diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.haml index 583d22f..1cabcf5 100644 --- a/app/views/users/_user.html.haml +++ b/app/views/users/_user.html.haml @@ -1,4 +1,32 @@ %tr - %td= link_to user.login, user - %td= l(user.created_at, :format => :short) - %td= l(user.updated_at, :format => :short) + %td + = link_to user.username, user + %td + = user.created_at.strftime("%d %b, %Y, %H:%M") + %td + = user.updated_at.strftime("%d %b, %Y, %H:%M") + %td + - if user.enabled + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.disable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_deactivation", username: user.username) + .modal-footer + = form_tag deactivate_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.disable_user")}"} + - else + %button.btn.btn-default{:"data-toggle" => "modal", :"data-target" => "#user-form-#{user.id}", :type => "button"} + = t("actions.enable_user") + .modal.fade.hide{:id => "user-form-#{user.id}"} + .modal-dialog + .modal-content + .modal-header + %button.close{:"data-dismiss" => "modal"} × + = t("actions.confirm_user_activation", username: user.username) + .modal-footer + = form_tag enable_user_path(user) do + %input.btn.btn-default.btn-danger{:type => "submit", :value => "#{t("actions.enable_user")}"} diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 3ed8835..e1136d8 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,4 +1,5 @@ - @show_navigation = false = search :users -= table @users, %w(username, created, updated) += table @users, %w(username, created, updated, actions.toggle_user) + |