From 0d5a3995bc3483893d967257b2d0e97707d71941 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Fri, 9 Nov 2012 15:29:35 +0100 Subject: [PATCH] add the enquete to the current site --- app/controllers/dashboard_controller.rb | 2 + app/views/dashboard/enquete.html.slim | 2 + app/views/layouts/application.html.slim | 1 + app/views/layouts/theme1-home.html.slim | 76 +++++++++++++++++++++++++ app/views/layouts/theme1.html.slim | 69 ++++++++++++++++++++++ config/routes.rb | 1 + 6 files changed, 151 insertions(+) create mode 100644 app/views/dashboard/enquete.html.slim create mode 100644 app/views/layouts/theme1-home.html.slim create mode 100644 app/views/layouts/theme1.html.slim diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 6eba4bab..12b9a244 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -1,5 +1,7 @@ class DashboardController < ApplicationController + layout 'theme1' def home + render layout: 'theme1-home' end diff --git a/app/views/dashboard/enquete.html.slim b/app/views/dashboard/enquete.html.slim new file mode 100644 index 00000000..93b1cc27 --- /dev/null +++ b/app/views/dashboard/enquete.html.slim @@ -0,0 +1,2 @@ +iframe[ src="https://docs.google.com/spreadsheet/embeddedform?formkey=dEI3NmlWRUFMbnVySWd6SzljYjM3NVE6MQ" width="760" height="1332" + frameborder="0" marginheight="0" marginwidth="0"] Loading.. diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 2a17e857..494bd300 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -42,6 +42,7 @@ html lang="en" ul.nav li= link_to User.model_name.human_plural, user_root_path li= link_to Supplier.model_name.human_plural, supplier_root_path + li= link_to 'Enquete', enquete_path #banner-wrap .left .right diff --git a/app/views/layouts/theme1-home.html.slim b/app/views/layouts/theme1-home.html.slim new file mode 100644 index 00000000..494bd300 --- /dev/null +++ b/app/views/layouts/theme1-home.html.slim @@ -0,0 +1,76 @@ +doctype html +html lang="en" + head + meta charset="utf-8" + meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" + meta name="viewport" content="width=device-width, initial-scale=1.0" + title= content_for?(:title) ? yield(:title) : application_title + = csrf_meta_tags + + /! Le HTML5 shim, for IE6-8 support of HTML elements + /[if lt IE 9] + = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" + = stylesheet_link_tag "application", :media => "all" + link href="/favicon.ico" rel="shortcut icon" + link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css' + + body + .header-nav-banner + #header-wrap + #ceiling + .left + .right + .lights + .light1 + .light2 + .light3 + .container + #header + #header-right + .social + a.wsite-social-facebook href="https://www.facebook.com/Qwaiter" target=:_blank + span.wsite-social-inner + a.wsite-social-twitter href="https://twitter.com/qwaiter" target=:_blank + span.wsite-social-inner + a.wsite-social-linkedin href="http://www.linkedin.com/company/579750" target=:_blank + span.wsite-social-inner + a.wsite-social-rss + span.wsite-social-inner + #logo= link_to image_tag('icons/logo-small.png', alt: application_title), root_path + #nav-wrap + .container + ul.nav + li= link_to User.model_name.human_plural, user_root_path + li= link_to Supplier.model_name.human_plural, supplier_root_path + li= link_to 'Enquete', enquete_path + #banner-wrap + .left + .right + .container + #banner + .wsite-header + .clearing + #main-wrap + .container + .content-top + .main-inner + #wsite-content.wsite-not-footer= yield + #footer-wrap + .footer-shadow + .container + .footer-top + .bottom + p © Companytools 2012 + = yield :footer + + + .content + - if flash[:alert].present? + .alert.alert-error + a.close data-dismiss="alert" × + div= flash[:alert] + - if flash[:notice].present? + .alert.alert-success + a.close data-dismiss="alert" × + div= flash[:notice] + = javascript_include_tag "application" diff --git a/app/views/layouts/theme1.html.slim b/app/views/layouts/theme1.html.slim new file mode 100644 index 00000000..809360a3 --- /dev/null +++ b/app/views/layouts/theme1.html.slim @@ -0,0 +1,69 @@ +doctype html +html lang="en" + head + meta charset="utf-8" + meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" + meta name="viewport" content="width=device-width, initial-scale=1.0" + title= content_for?(:title) ? yield(:title) : application_title + = csrf_meta_tags + + /! Le HTML5 shim, for IE6-8 support of HTML elements + /[if lt IE 9] + = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" + = stylesheet_link_tag "application", :media => "all" + link href="/favicon.ico" rel="shortcut icon" + link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css' + + body + .header-nav-banner + #header-wrap + #ceiling + .left + .right + .lights + .light1 + .light2 + .light3 + .container + #header + #header-right + .social + a.wsite-social-facebook href="https://www.facebook.com/Qwaiter" target=:_blank + span.wsite-social-inner + a.wsite-social-twitter href="https://twitter.com/qwaiter" target=:_blank + span.wsite-social-inner + a.wsite-social-linkedin href="http://www.linkedin.com/company/579750" target=:_blank + span.wsite-social-inner + a.wsite-social-rss + span.wsite-social-inner + #logo= link_to image_tag('icons/logo-small.png', alt: application_title), root_path + #nav-wrap + .container + ul.nav + li= link_to User.model_name.human_plural, user_root_path + li= link_to Supplier.model_name.human_plural, supplier_root_path + li= link_to 'Enquete', enquete_path + #main-wrap + .container + .content-top + .main-inner + #wsite-content.wsite-not-footer= yield + #footer-wrap + .footer-shadow + .container + .footer-top + .bottom + p © Companytools 2012 + = yield :footer + + + .content + - if flash[:alert].present? + .alert.alert-error + a.close data-dismiss="alert" × + div= flash[:alert] + - if flash[:notice].present? + .alert.alert-success + a.close data-dismiss="alert" × + div= flash[:notice] + = javascript_include_tag "application" diff --git a/config/routes.rb b/config/routes.rb index b8dbce0b..4ce1f8d8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -66,6 +66,7 @@ Qrammer::Application.routes.draw do # DEVELOPMENT ONLY match '/qr' => 'dashboard#qr' match '/demo_both' => 'dashboard#demo_both' + match '/enquete' => 'dashboard#enquete' namespace :suppliers, path: '/supplier' do resources :sections do