From 0afb5d64f3e9eaef2cd6d48ffd7ead4db09a4e7b Mon Sep 17 00:00:00 2001
From: Mauricio Giacomini Girardello <mauriciogiacomini4@gmail.com>
Date: Fri, 31 Jul 2015 10:40:35 -0300
Subject: [PATCH] adding the welcome controller for management system

---
 .../management/welcome_controller.rb          |   4 +
 app/controllers/management_controller.rb      |   3 +
 app/helpers/management/welcome_helper.rb      |   2 +
 app/views/layouts/management.html.erb         | 133 ++++++++++++++++++
 app/views/management/welcome/index.html.erb   |   8 ++
 config/routes.rb                              |   5 +
 .../management/welcome_controller_test.rb     |   9 ++
 7 files changed, 164 insertions(+)
 create mode 100644 app/controllers/management/welcome_controller.rb
 create mode 100644 app/controllers/management_controller.rb
 create mode 100644 app/helpers/management/welcome_helper.rb
 create mode 100644 app/views/layouts/management.html.erb
 create mode 100644 app/views/management/welcome/index.html.erb
 create mode 100644 test/controllers/management/welcome_controller_test.rb

diff --git a/app/controllers/management/welcome_controller.rb b/app/controllers/management/welcome_controller.rb
new file mode 100644
index 00000000..eaf1c353
--- /dev/null
+++ b/app/controllers/management/welcome_controller.rb
@@ -0,0 +1,4 @@
+class Management::WelcomeController < ManagementController
+  def index
+  end
+end
\ No newline at end of file
diff --git a/app/controllers/management_controller.rb b/app/controllers/management_controller.rb
new file mode 100644
index 00000000..6db75c2c
--- /dev/null
+++ b/app/controllers/management_controller.rb
@@ -0,0 +1,3 @@
+class ManagementController < ApplicationController
+  layout 'management'
+end
diff --git a/app/helpers/management/welcome_helper.rb b/app/helpers/management/welcome_helper.rb
new file mode 100644
index 00000000..c14a7659
--- /dev/null
+++ b/app/helpers/management/welcome_helper.rb
@@ -0,0 +1,2 @@
+module Management::WelcomeHelper
+end
diff --git a/app/views/layouts/management.html.erb b/app/views/layouts/management.html.erb
new file mode 100644
index 00000000..4f3cb243
--- /dev/null
+++ b/app/views/layouts/management.html.erb
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html class="ls-theme-green">
+<head>
+  <title>Portal MEC - Management System</title>
+
+  <%= stylesheet_link_tag 'management', media: 'all', 'data-turbolinks-track' => true %>
+  <%= javascript_include_tag 'management', 'data-turbolinks-track' => true %>
+  <%= csrf_meta_tags %>
+
+  <meta charset="utf-8">
+  <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+  <meta name="description" content="Insira aqui a descrição da página.">
+
+  <link rel="icon" sizes="192x192" href="<%= image_url 'ico-boilerplate.png' %>">
+  <link rel="apple-touch-icon" href="<%= image_url 'ico-boilerplate.png' %>">
+</head>
+<body>
+<div class="ls-topbar">
+
+  <!-- Notification bar -->
+  <div class="ls-notification-topbar">
+    <!-- Link of support/help -->
+    <div class="ls-alerts-list">
+      <a href="#" class="ls-ico-bell-o" data-counter="5" data-ls-module="topbarCurtain" data-target="#ls-notification-curtain"><span>Notificações</span></a>
+      <a href="#" class="ls-ico-bullhorn" data-ls-module="topbarCurtain" data-target="#ls-help-curtain"><span>Ajuda</span></a>
+      <a href="#" class="ls-ico-question" data-ls-module="topbarCurtain" data-target="#ls-feedback-curtain"><span>Sugestões</span></a>
+    </div>
+
+    <!-- User details -->
+    <div data-ls-module="dropdown" class="ls-dropdown ls-user-account">
+      <a href="#" class="ls-ico-user">
+        Zoe Palmer
+        <small>(lstyle)</small>
+      </a>
+      <nav class="ls-dropdown-nav ls-user-menu">
+        <ul>
+          <li><a href="#">Conta</a></li>
+          <li><a href="#">Logout</a></li>
+        </ul>
+      </nav>
+    </div>
+  </div>
+
+  <span class="ls-show-sidebar ls-ico-menu"></span>
+
+  <!-- Nome do produto/marca -->
+  <h1 class="ls-brand-name">
+    <a class="ls-ico-earth" href="/">
+      <small>Management System</small>
+      Portal MEC
+    </a>
+  </h1>
+</div>
+
+<main class="ls-main ">
+  <div class="container-fluid">
+
+    <%= yield %>
+
+  </div>
+</main>
+
+<aside class="ls-sidebar">
+  <!-- Defails of user account -->
+  <div data-ls-module="dropdown" class="ls-dropdown ls-user-account">
+    <a href="#" class="ls-ico-user">
+      Calum Hoyle
+      <small>(lstyle)</small>
+    </a>
+    <nav class="ls-dropdown-nav ls-user-menu">
+      <ul>
+        <li><a href="#">submenu</a></li>
+      </ul>
+    </nav>
+  </div>
+
+  <nav class="ls-menu">
+    <ul>
+      <li><a href="#" class="ls-ico-home">Página inicial</a></li>
+    </ul>
+  </nav>
+</aside>
+
+<aside class="ls-notification">
+  <nav class="ls-notification-list" id="ls-notification-curtain" style="left: 1716px;">
+    <h3 class="ls-title-2">Notificações</h3>
+    <ul>
+      <li class="ls-dismissable">
+        <a href="#">Blanditiis est est dolorem iure voluptatem eos deleniti repellat et laborum consequatur</a>
+        <a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
+      </li>
+      <li class="ls-dismissable">
+        <a href="#">Similique eos rerum perferendis voluptatibus</a>
+        <a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
+      </li>
+      <li class="ls-dismissable">
+        <a href="#">Qui numquam iusto suscipit nisi qui unde</a>
+        <a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
+      </li>
+      <li class="ls-dismissable">
+        <a href="#">Nisi aut assumenda dignissimos qui ea in deserunt quo deleniti dolorum quo et consequatur</a>
+        <a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
+      </li>
+      <li class="ls-dismissable">
+        <a href="#">Sunt consequuntur aut aut a molestiae veritatis assumenda voluptas nam placeat eius ad</a>
+        <a href="#" data-ls-module="dismiss" class="ls-ico-close ls-close-notification"></a>
+      </li>
+    </ul>
+  </nav>
+
+  <nav class="ls-notification-list" id="ls-help-curtain" style="left: 1756px;">
+    <h3 class="ls-title-2">Feedback</h3>
+    <ul>
+      <li><a href="#">&gt; quo fugiat facilis nulla perspiciatis consequatur</a></li>
+      <li><a href="#">&gt; enim et labore repellat enim debitis</a></li>
+    </ul>
+  </nav>
+
+  <nav class="ls-notification-list" id="ls-feedback-curtain" style="left: 1796px;">
+    <h3 class="ls-title-2">Ajuda</h3>
+    <ul>
+      <li class="ls-txt-center hidden-xs">
+        <a href="#" class="ls-btn-dark ls-btn-tour">Fazer um Tour</a>
+      </li>
+      <li><a href="#">&gt; Guia</a></li>
+      <li><a href="#">&gt; Wiki</a></li>
+    </ul>
+  </nav>
+</aside>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/app/views/management/welcome/index.html.erb b/app/views/management/welcome/index.html.erb
new file mode 100644
index 00000000..93bf11f3
--- /dev/null
+++ b/app/views/management/welcome/index.html.erb
@@ -0,0 +1,8 @@
+<h1 class="ls-title-intro ls-ico-home">Página inicial</h1>
+
+<p>Este é nosso boilerplate com a estrutura inicial de um projeto. Você pode <a href="http://locaweb.github.io/locawebstyle/documentacao/exemplos/">ver exemplos completos neste link</a>.</p>
+<p>Confira nossa <a href="http://locaweb.github.io/locawebstyle/documentacao/componentes/">documentação com os componentes</a> que você usar aqui.</p>
+<hr>
+<h6 class="ls-title-5">English disclaimer</h6>
+<p>This is your boilerplate with start structure. You can see <a href="http://locaweb.github.io/locawebstyle/documentacao/exemplos/">completed examples here</a>.</p>
+<p>Check out the docs to <a href="http://locaweb.github.io/locawebstyle/documentacao/componentes/">see the components that you can use</a>.</p>
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 4273fef3..7ea08475 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,9 @@
 Rails.application.routes.draw do
+
+  namespace :management do
+    root 'welcome#index'
+  end
+
   root 'welcome#index'
 
   # The priority is based upon order of creation: first created -> highest priority.
diff --git a/test/controllers/management/welcome_controller_test.rb b/test/controllers/management/welcome_controller_test.rb
new file mode 100644
index 00000000..f19d31e0
--- /dev/null
+++ b/test/controllers/management/welcome_controller_test.rb
@@ -0,0 +1,9 @@
+require 'test_helper'
+
+class Management::WelcomeControllerTest < ActionController::TestCase
+  test "should get index" do
+    get :index
+    assert_response :success
+  end
+
+end
-- 
GitLab