avance desarrollo control

parent b2be8ee6
......@@ -18,6 +18,7 @@
<ul class="nav">
{% set route = app.request.get('_route') %}
{#<li class="nav-header">Navigation</li>#}
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_BACKEND') %}
<li class="has-sub {% if 'home' in route %}active{% endif %}">
<a href="javascript:;">
<b class="caret pull-right"></b>
......@@ -32,8 +33,12 @@
<li class="{% if route == 'backend_home_dashboard_emailing_detalle' %}active{% endif %}"><a href="{{ path('backend_home_dashboard_emailing_detalle')}}">Emailing Detalle</a></li>
</ul>
</li>
{%endif%}
{% if is_granted('ROLE_RESEARCHER') %}
<li class="{% if 'researcher' in route %}active{% endif %}">
<a href="{{ path('backend_researcher_buscar')}}"><i class="fa fa-users"></i> <span>Búsqueda</span></a>
</li>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<li class="{% if 'backendusuario' in route %}active{% endif %}">
<a href="{{ path('backend_backendusuario_index')}}"><i class="fa fa-users"></i> <span>Usuarios backend</span></a>
......
{% extends 'backend/base/index.html.twig' %}
{% block stylesheets %}
{% endblock %}
{% block contenido %}
<!-- begin breadcrumb -->
<ol class="breadcrumb pull-right">
<li><a href="javascript:;">Home</a></li>
<li>Dashboard</li>
<li class="active">Búsqueda</li>
</ol>
<!-- end breadcrumb -->
<!-- begin page-header -->
<h1 class="page-header">Búsqueda de usuarios<small> </small></h1>
<!-- end page-header -->
<!-- begin row -->
<div class="row">
<form id="fmBuscar" class="form-inline" action="/" method="POST">
<div class="input-group">
<span class="input-group-addon">+56</span>
<input type="text" id="msisdn" name="msisdn" class="form-control" placeholder="Teléfono (9 dígitos)" maxlength="9" value="995064691">
</div>
<button type="button" class="btn btn-primary" onclick="buscar(event)" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Cargando resultados..."><i class="fa fa-search"></i> Buscar</button>
</form>
</div>
{% endblock %}
{% block javascripts %}
<script>
function buscar(event) {
event.preventDefault();
console.log("buscar...");
}
</script>
{% endblock %}
{% block jsApp %}
<script>
</script>
{% endblock %}
\ No newline at end of file
......@@ -91,4 +91,5 @@ security:
role_hierarchy:
ROLE_ADMIN: [ROLE_API,ROLE_BACKEND]
ROLE_BACKEND: [ROLE_RESERACHER]
ROLE_SUPER_ADMIN: [ROLE_ADMIN]
\ No newline at end of file
......@@ -26,6 +26,14 @@ class HomeController extends Controller {
public function indexAction() {
$log = Utiles::setLog('BackendBundle\Controller\HomeController:indexAction', 'backend/backend');
$log->debug('entrando...');
$securityContext = $this->container->get('security.authorization_checker');
if($securityContext->isGranted('ROLE_RESEARCHER')){
$log->debug("Es un usuario buscador.. redireccionando a su pagina...");
return $this->redirectToRoute('backend_researcher_buscar');
}
$estadistica = new Estadistica();
$fechaInicial = '2016-11-11 00:00:01';
$fechaHoy = date('Y-m-d H:i:s');
......
<?php
namespace BackendBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Lib\Utiles;
use AppBundle\Model\UsuarioMcafee;
use AppBundle\Model\UsuarioMcafeeQuery;
class ResearchController extends Controller {
public function busquedaUsuarioAction(){
$log = Utiles::setLog('BackendBundle\Controller\ResearchController:buscarUsuarioAction', 'backend/backend');
$log->debug('Entrando a busqueda');
return $this->render('backend/research/busqueda.html.twig');
}
}
......@@ -80,3 +80,9 @@ backend_home_portalmigraciones_detalle:
backend_home_dashboard_emailing_detalle:
path: /home/dashboard/emailing/detalle
defaults: { _controller: BackendBundle:Home:dashboardEmailingDetalle }
backend_researcher_buscar:
path: /researcher/busqueda/usuario
defaults: { _controller: BackendBundle:Research:busquedaUsuario }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment