From 1fb1733644c394880dc4a2495cb4fb0b65062ae8 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 12 Jun 2015 12:31:57 +0800 Subject: [PATCH] Adding link to user guide to enterprises index and dashboard --- app/views/admin/enterprises/index.html.haml | 2 ++ app/views/admin/shared/_user_guide_link.html.haml | 1 + .../admin/overview/multi_enterprise_dashboard.html.haml | 6 +++++- .../admin/overview/single_enterprise_dashboard.html.haml | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/views/admin/shared/_user_guide_link.html.haml diff --git a/app/views/admin/enterprises/index.html.haml b/app/views/admin/enterprises/index.html.haml index ecd526a977..826d09336c 100644 --- a/app/views/admin/enterprises/index.html.haml +++ b/app/views/admin/enterprises/index.html.haml @@ -2,6 +2,8 @@ Enterprises - content_for :page_actions do + = render 'admin/shared/user_guide_link' + - if spree_current_user.can_own_more_enterprises? %li#new_product_link = button_link_to "New Enterprise", main_app.new_admin_enterprise_path, :icon => 'icon-plus', :id => 'admin_new_enterprise_link' diff --git a/app/views/admin/shared/_user_guide_link.html.haml b/app/views/admin/shared/_user_guide_link.html.haml new file mode 100644 index 0000000000..af83d96936 --- /dev/null +++ b/app/views/admin/shared/_user_guide_link.html.haml @@ -0,0 +1 @@ += button_link_to "User Guide", "http://global.openfoodnetwork.org/platform/user-guide/", :icon => 'icon-external-link', :id => 'user_guide_link', target: '_blank' diff --git a/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml b/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml index f230d7e44e..420196d3ce 100644 --- a/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml +++ b/app/views/spree/admin/overview/multi_enterprise_dashboard.html.haml @@ -1,3 +1,7 @@ +- content_for :page_actions do + = render 'admin/shared/user_guide_link' + + %h1{ :style => 'margin-bottom: 30px'} Dashboard - if @enterprises.unconfirmed.any? @@ -21,4 +25,4 @@ - if can? :admin, OrderCycle = render partial: "order_cycles" - = render partial: "enterprises" \ No newline at end of file + = render partial: "enterprises" diff --git a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml index ec7d274cd9..3998f736de 100644 --- a/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml +++ b/app/views/spree/admin/overview/single_enterprise_dashboard.html.haml @@ -5,6 +5,8 @@ = "(#{enterprise_type_name(@enterprise)})" - content_for :page_actions do + = render 'admin/shared/user_guide_link' + :javascript function toggleType(){ if( $('#package_selection').is(":visible") ){