From 2e9c22aed2cd4a0e8046b2d9acd71e2001f44b53 Mon Sep 17 00:00:00 2001 From: Alexandre Arias <apa13@inf.ufpr.br> Date: Wed, 5 Aug 2015 11:14:04 -0300 Subject: [PATCH] creating menu interface and views; create estatisticas controller Signed-off-by: Alexandre Arias <apa13@inf.ufpr.br> --- Gemfile.lock | 3 -- .../management/estatisticas_controller.rb | 16 +++++++ .../management/welcome_controller.rb | 5 +- app/controllers/management_controller.rb | 13 +++++ app/views/layouts/management.html.erb | 30 +++++++++++- app/views/management/denuncias.html.erb | 5 ++ app/views/management/destaques.html.erb | 5 ++ .../management/estatisticas/acessos.html.erb | 8 ++++ .../management/estatisticas/colecoes.html.erb | 7 +++ .../estatisticas/downloads.html.erb | 8 ++++ .../management/estatisticas/index.html.erb | 48 +++++++++++++++++++ .../management/estatisticas/usuarios.html.erb | 7 +++ app/views/management/usuarios.html.erb | 6 +++ app/views/management/welcome/index.html.erb | 5 +- config/routes.rb | 10 ++++ 15 files changed, 169 insertions(+), 7 deletions(-) create mode 100644 app/controllers/management/estatisticas_controller.rb create mode 100644 app/views/management/denuncias.html.erb create mode 100644 app/views/management/destaques.html.erb create mode 100644 app/views/management/estatisticas/acessos.html.erb create mode 100644 app/views/management/estatisticas/colecoes.html.erb create mode 100644 app/views/management/estatisticas/downloads.html.erb create mode 100644 app/views/management/estatisticas/index.html.erb create mode 100644 app/views/management/estatisticas/usuarios.html.erb create mode 100644 app/views/management/usuarios.html.erb diff --git a/Gemfile.lock b/Gemfile.lock index d2c29c1eb..91dfc07ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -169,6 +169,3 @@ DEPENDENCIES turbolinks uglifier (>= 1.3.0) web-console (~> 2.0) - -BUNDLED WITH - 1.10.6 diff --git a/app/controllers/management/estatisticas_controller.rb b/app/controllers/management/estatisticas_controller.rb new file mode 100644 index 000000000..29d0c266a --- /dev/null +++ b/app/controllers/management/estatisticas_controller.rb @@ -0,0 +1,16 @@ +class Management::EstatisticasController < ManagementController + def index + end + + def usuarios + end + + def downloads + end + + def acessos + end + + def destaques + end +end diff --git a/app/controllers/management/welcome_controller.rb b/app/controllers/management/welcome_controller.rb index eaf1c353b..436971f32 100644 --- a/app/controllers/management/welcome_controller.rb +++ b/app/controllers/management/welcome_controller.rb @@ -1,4 +1,7 @@ class Management::WelcomeController < ManagementController def index end -end \ No newline at end of file + + def destaques + end +end diff --git a/app/controllers/management_controller.rb b/app/controllers/management_controller.rb index 6db75c2c7..069b0f6bf 100644 --- a/app/controllers/management_controller.rb +++ b/app/controllers/management_controller.rb @@ -1,3 +1,16 @@ class ManagementController < ApplicationController layout 'management' + + + def destaques + end + + def denuncias + end + + def estatisticas + end + + def usuarios + end end diff --git a/app/views/layouts/management.html.erb b/app/views/layouts/management.html.erb index 4f3cb2431..cef433b1d 100644 --- a/app/views/layouts/management.html.erb +++ b/app/views/layouts/management.html.erb @@ -14,6 +14,8 @@ <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"> @@ -75,9 +77,33 @@ </nav> </div> + <!--Menu à esquerda--> <nav class="ls-menu"> <ul> - <li><a href="#" class="ls-ico-home">Página inicial</a></li> + <li><a href="/management" class="ls-ico-home">Página inicial</a></li> + <li><a href="/management/destaques" class="ls-ico-star">Cursos em destaque</a><li> + <li class="ls-submenu"> + <a href="#" class="ls-ico-stats">EstatÃsticas</a> + <ul role="menu"> + <a class="ls-submenu-item" + <%= link_to "Geral", management_estatisticas_index_path %>> + </a> + <a class="ls-submenu-item" + <%= link_to "Usuarios", management_estatisticas_usuarios_path %>> + </a>> + <li><a class="ls-submenu-item" + <%= link_to "Coleções", management_estatisticas_colecoes_path %>> + </a></li> + <li><a class="ls-submenu-item" + <%= link_to "Downloads", management_estatisticas_downloads_path %>> + </a></li> + <li><a class="ls-submenu-item" + <%= link_to "Acessos", management_estatisticas_acessos_path %>> + </a></li> + </ul> + </li> + <li><a href="/management/usuarios" class="ls-ico-users">Usuários</a><li> + <li><a href="/management/denuncias" class="ls-ico-bullhorn">Denúncias</a><li> </ul> </nav> </aside> @@ -130,4 +156,4 @@ </aside> </body> -</html> \ No newline at end of file +</html> diff --git a/app/views/management/denuncias.html.erb b/app/views/management/denuncias.html.erb new file mode 100644 index 000000000..6ce3b2d07 --- /dev/null +++ b/app/views/management/denuncias.html.erb @@ -0,0 +1,5 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li>Denúncias</li> +</ol> +<h1><b> Gerenciamento das Denúncias </b></h1> diff --git a/app/views/management/destaques.html.erb b/app/views/management/destaques.html.erb new file mode 100644 index 000000000..7a0ac0c32 --- /dev/null +++ b/app/views/management/destaques.html.erb @@ -0,0 +1,5 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li>Destaques</li> +</ol> +<h1><b>Gerenciamento dos cursos em destaque</b></h1> diff --git a/app/views/management/estatisticas/acessos.html.erb b/app/views/management/estatisticas/acessos.html.erb new file mode 100644 index 000000000..ce4130bea --- /dev/null +++ b/app/views/management/estatisticas/acessos.html.erb @@ -0,0 +1,8 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li><%= link_to "EstatÃsticas", management_estatisticas_index_path %></li> + <li> Acessos </li> +</ol> +<br><br> + +<h1><div align="Center"> Acessos </div></h1> diff --git a/app/views/management/estatisticas/colecoes.html.erb b/app/views/management/estatisticas/colecoes.html.erb new file mode 100644 index 000000000..5e0da6898 --- /dev/null +++ b/app/views/management/estatisticas/colecoes.html.erb @@ -0,0 +1,7 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li><%= link_to "EstatÃsticas", management_estatisticas_index_path %></li> + <li> Coleções </li> +</ol> +<br><br> +<h1> Coleções </h1> diff --git a/app/views/management/estatisticas/downloads.html.erb b/app/views/management/estatisticas/downloads.html.erb new file mode 100644 index 000000000..2de26d358 --- /dev/null +++ b/app/views/management/estatisticas/downloads.html.erb @@ -0,0 +1,8 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li><%= link_to "EstatÃsticas", management_estatisticas_index_path %></li> + <li> Downloads </li> +</ol> +<br><br> + +<h1><div align="center"> Downloads </div></h1> diff --git a/app/views/management/estatisticas/index.html.erb b/app/views/management/estatisticas/index.html.erb new file mode 100644 index 000000000..b352d01bd --- /dev/null +++ b/app/views/management/estatisticas/index.html.erb @@ -0,0 +1,48 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li>EstatÃsticas</li> +</ol> +<br><br> + + + + + +<div class="ls-box ls-board-box"> + <header class="ls-info-header"> + <h2 class="ls-title-3">Geral</h2> + <p class="ls-float-right ls-float-none-xs ls-small-info">Apurado em <strong><%= Date.today.to_s %></strong></p> + </header> + <div id="sending-stats" class="row"> + <div class="col-sm-6 col-md-3"> + <div class="ls-box"> + <h6 class="ls-title-4">Total de usuários</h6> + <strong class="ls-color-theme">0</strong> + <!--<small>envios por mês</small>--> + <%= link_to "Mais detalhes" , management_estatisticas_usuarios_path, class: "ls-btn ls-btn-sm" %> + </div> + </div> + <div class="col-sm-6 col-md-3"> + <div class="ls-box"> + <h6 class="ls-title-4">Total de coleções</h6> + <strong class="ls-color-theme">0</strong> + <%= link_to "Mais detalhes" , management_estatisticas_colecoes_path, class: "ls-btn ls-btn-sm" %> + </div> + </div> + <div class="col-sm-6 col-md-3"> + <div class="ls-box"> + <h6 class="ls-title-4">Total de downloads</h6> + <strong class="ls-color-theme">0</strong> + <%= link_to "Mais detalhes" , management_estatisticas_downloads_path, class: "ls-btn ls-btn-sm" %> + </div> + </div> + <div class="col-sm-6 col-md-3"> + <div class="ls-box"> + <h6 class="ls-title-4 ">Total de acessos</h6> + <strong class="ls-color-theme">0</strong> + + <%= link_to "Mais detalhes" , management_estatisticas_acessos_path, class: "ls-btn ls-btn-sm" %> + </div> + </div> + </div> +</div> diff --git a/app/views/management/estatisticas/usuarios.html.erb b/app/views/management/estatisticas/usuarios.html.erb new file mode 100644 index 000000000..85c16d4a6 --- /dev/null +++ b/app/views/management/estatisticas/usuarios.html.erb @@ -0,0 +1,7 @@ +<ol class="ls-breadcrumb"> + <li><%= link_to "InÃcio", management_root_path %></li> + <li><%= link_to "EstatÃsticas", management_estatisticas_index_path %></li> + <li> Usuários </li> +</ol> +<br><br> +<h1> USUARIOS </h1> diff --git a/app/views/management/usuarios.html.erb b/app/views/management/usuarios.html.erb new file mode 100644 index 000000000..28ab17ff8 --- /dev/null +++ b/app/views/management/usuarios.html.erb @@ -0,0 +1,6 @@ +<ol class="ls-breadcrumb"> + <!--<li><a href="/manage">Inicio</a></li>--> + <li><%= link_to "InÃcio", management_root_path %></li> + <li>Usuários</li> +</ol> +<h1><b> Gerenciamento de usuários </b></h1> diff --git a/app/views/management/welcome/index.html.erb b/app/views/management/welcome/index.html.erb index 93bf11f3a..3edff73f0 100644 --- a/app/views/management/welcome/index.html.erb +++ b/app/views/management/welcome/index.html.erb @@ -1,3 +1,6 @@ +<ol class="ls-breadcrumb"> + <li>Inicio</li> +</ol> <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> @@ -5,4 +8,4 @@ <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 +<p>Check out the docs to <a href="http://locaweb.github.io/locawebstyle/documentacao/componentes/">see the components that you can use</a>.</p> diff --git a/config/routes.rb b/config/routes.rb index b82c9b786..9725208d2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,16 @@ Rails.application.routes.draw do root 'welcome#index' + get 'management/destaques' => 'management#destaques' + #get 'management/estatisticas/' => 'management#estatisticas' + get 'management/estatisticas/', to: 'management/estatisticas#index', as: 'management_estatisticas_index' + get 'management/estatisticas/usuarios' => 'management/estatisticas#usuarios' + get 'management/estatisticas/colecoes' => 'management/estatisticas#colecoes' + get 'management/estatisticas/acessos' => 'management/estatisticas#acessos' + get 'management/estatisticas/downloads' => 'management/estatisticas#downloads' + get 'management/denuncias' => 'management#denuncias' + get 'management/usuarios' => 'management#usuarios' + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". -- GitLab