diff --git a/view/admin/blog/list.html.php b/view/admin/blog/list.html.php index 5b26807a..1ca27ccd 100644 --- a/view/admin/blog/list.html.php +++ b/view/admin/blog/list.html.php @@ -21,47 +21,128 @@ use Goteo\Library\Text, Goteo\Core\ACL; +// paginacion +require_once 'library/pagination/pagination.php'; + $translator = ACL::check('/translate') ? true : false; + +$filters = $this['filters']; +if (empty($filters['show'])) $filters['show'] = 'all'; +$the_filters = ''; +foreach ($filters as $key=>$value) { + $the_filters .= "&{$key}={$value}"; +} + +$pagedResults = new \Paginated($this['posts'], 10, isset($_GET['page']) ? $_GET['page'] : 1); ?> - + +    +Ordenar la portada + +
+
+
+
+ +
+ + +
+
+ +
+ + + +
+
+ +
+ +
+
- - + + - - - - - - + - + fetchPagedRow()) : ?> - - - - - - - - - - - + + + + - + + + + + + + + + + + + + -
Autor
[]title; ?>date; ?>publish ? Text::_("Sí") : ''; ?>home ? Text::_("Sí") : ''; ?>footer ? Text::_("Sí") : ''; ?>[]');">[][]publish) echo 'Publicada'; ?>id])) + $style .= ' font-weight:bold;'; + if (empty($_SESSION['admin_node']) || $_SESSION['admin_node'] == \GOTEO_NODE) { + if (isset($this['footers'][$post->id])) + $style .= ' font-style:italic;'; + } + + echo "{$post->title}"; + ?>fecha; ?>user->name . ' (' . $post->owner_name . ')'; ?>
[Ver]owner_type == 'node' && $post->owner_id == $node) || $node == \GOTEO_NODE) : ?> + [Editar] + id])) { + echo '[Quitar de portada]'; + } elseif ($post->publish) { + echo '[Poner en portada]'; + } ?>id])) { + echo '[Quitar del footer]'; + } elseif ($post->publish) { + echo '[Poner en footer]'; + } + } ?> + [Traducir] + owner_type == 'node' && $post->owner_id == $node)) : ?>[Traducir] + publish && (($post->owner_type == 'node' && $post->owner_id == $_SESSION['admin_node']) || !isset($_SESSION['admin_node']))) : ?> + [Eliminar] +

- -

- -
\ No newline at end of file + + + +

No se han encontrado registros

+ diff --git a/view/admin/criteria/edit.html.php b/view/admin/criteria/edit.html.php index d4ee8d2c..3e50bbfe 100644 --- a/view/admin/criteria/edit.html.php +++ b/view/admin/criteria/edit.html.php @@ -36,7 +36,7 @@
-
+ diff --git a/view/admin/criteria/list.html.php b/view/admin/criteria/list.html.php index 6bad0c07..36f0206f 100644 --- a/view/admin/criteria/list.html.php +++ b/view/admin/criteria/list.html.php @@ -22,15 +22,16 @@ Goteo\Core\ACL; $translator = ACL::check('/translate') ? true : false; +$filters = $this['filters']; ?> - +
- $sectionName) : ?> - + @@ -54,15 +55,15 @@ - [Editar] + [Editar] title; ?> order; ?> - [↑] - [↓] + [↑] + [↓] [Traducir] - [Quitar] + [Quitar] diff --git a/view/admin/faq/edit.html.php b/view/admin/faq/edit.html.php index 71930200..55486078 100644 --- a/view/admin/faq/edit.html.php +++ b/view/admin/faq/edit.html.php @@ -35,7 +35,7 @@ });
-
+ diff --git a/view/admin/faq/list.html.php b/view/admin/faq/list.html.php index 36d233f8..4f5b0baf 100644 --- a/view/admin/faq/list.html.php +++ b/view/admin/faq/list.html.php @@ -22,15 +22,16 @@ Goteo\Core\ACL; $translator = ACL::check('/translate') ? true : false; +$filters = $this['filters']; ?> - +
- - $sectionName) : ?> - + @@ -42,8 +43,8 @@ - - + + @@ -54,15 +55,15 @@ - [Editar] + [Editar] title; ?> order; ?> - [↑] - [↓] + [↑] + [↓] [Traducir] - [Quitar] + [Quitar] diff --git a/view/admin/glossary/edit.html.php b/view/admin/glossary/edit.html.php index 96b4b901..843bc2c6 100644 --- a/view/admin/glossary/edit.html.php +++ b/view/admin/glossary/edit.html.php @@ -18,13 +18,10 @@ * */ - use Goteo\Library\Text, Goteo\Model, Goteo\Core\Redirection, - Goteo\Library\SuperForm; - -define('ADMIN_NOAUTOSAVE', true); + Goteo\Library\NormalForm; $post = $this['post']; @@ -32,19 +29,17 @@ throw new Redirection('/admin/glossary'); } -// Superform - $images = array(); - foreach ($post->gallery as $image) { - $images[] = array( - 'type' => 'html', - 'class' => 'inline gallery-image', - 'html' => is_object($image) ? +$images = array(); +foreach ($post->gallery as $image) { + $images[] = array( + 'type' => 'html', + 'class' => 'inline gallery-image', + 'html' => is_object($image) ? $image . ''.Text::_(' : - '' - ); - - } + '' + ); +} ?> -
+ - '', 'level' => 3, @@ -96,14 +91,12 @@ ), 'title' => array( 'type' => 'textbox', - 'required' => true, 'size' => 20, 'title' => Text::_("Término"), 'value' => $post->title, ), 'text' => array( 'type' => 'textarea', - 'required' => true, 'cols' => 40, 'rows' => 4, 'title' => Text::_("Explicación del término"), diff --git a/view/admin/glossary/list.html.php b/view/admin/glossary/list.html.php index bc522d62..5024d51c 100644 --- a/view/admin/glossary/list.html.php +++ b/view/admin/glossary/list.html.php @@ -23,7 +23,7 @@ $translator = ACL::check('/translate') ? true : false; ?> - +
diff --git a/view/admin/icons/edit.html.php b/view/admin/icons/edit.html.php index 35c7b068..3036e08e 100644 --- a/view/admin/icons/edit.html.php +++ b/view/admin/icons/edit.html.php @@ -23,7 +23,7 @@ ?>
- + diff --git a/view/admin/icons/list.html.php b/view/admin/icons/list.html.php index 18082017..61582bd8 100644 --- a/view/admin/icons/list.html.php +++ b/view/admin/icons/list.html.php @@ -22,16 +22,15 @@ Goteo\Core\ACL; $translator = ACL::check('/translate') ? true : false; +$filters = $this['filters']; ?> - -
- $groupName) : ?> - + @@ -54,14 +53,13 @@ - + name; ?> description; ?> group) ? $this['groups'][$icon->group] : Text::_('Ambas'); ?> - diff --git a/view/admin/invests/details.html.php b/view/admin/invests/details.html.php index 597d4893..513a8961 100644 --- a/view/admin/invests/details.html.php +++ b/view/admin/invests/details.html.php @@ -26,6 +26,9 @@ $campaign = $this['campaign']; $user = $this['user']; +$rewards = $invest->rewards; +array_walk($rewards, function (&$reward) { $reward = $reward->reward; }); + ?>

@@ -111,7 +114,7 @@ class="button red">

- rewards); ?> +
diff --git a/view/admin/invests/list.html.php b/view/admin/invests/list.html.php index 7d374f7b..5b8f3a83 100644 --- a/view/admin/invests/list.html.php +++ b/view/admin/invests/list.html.php @@ -18,7 +18,8 @@ * */ -use Goteo\Library\Text; +use Goteo\Library\Text, + Goteo\Model\Invest; $filters = $this['filters']; @@ -47,12 +48,6 @@ 'label' => Text::_("Extra"), 'first' => Text::_("Todos")) ); ?> - - -
-     - -

Filtros

@@ -60,23 +55,39 @@ $data) : ?>

- $itemName) : ?> - +
+
+ +
+
+ +
+ +
+ +
+ +

- +

+amount; } ?> +

TOTAL:

+

OJO! Resultado limitado a 999 registros como máximo.

+ @@ -89,7 +100,7 @@ - + diff --git a/view/admin/licenses/edit.html.php b/view/admin/licenses/edit.html.php index 750b8738..ebbf7737 100644 --- a/view/admin/licenses/edit.html.php +++ b/view/admin/licenses/edit.html.php @@ -22,7 +22,7 @@ ?>
-
+ diff --git a/view/admin/licenses/list.html.php b/view/admin/licenses/list.html.php index 760afa93..d6aeaf58 100644 --- a/view/admin/licenses/list.html.php +++ b/view/admin/licenses/list.html.php @@ -25,8 +25,6 @@ $filters = $this['filters']; ?> - -
@@ -68,18 +66,17 @@
- + - - + + - diff --git a/view/admin/mailing/list.html.php b/view/admin/mailing/list.html.php index ce995974..eb31627e 100644 --- a/view/admin/mailing/list.html.php +++ b/view/admin/mailing/list.html.php @@ -82,10 +82,6 @@ - diff --git a/view/admin/pages/edit.html.php b/view/admin/pages/edit.html.php index b1109c10..6ff6f76f 100644 --- a/view/admin/pages/edit.html.php +++ b/view/admin/pages/edit.html.php @@ -42,7 +42,7 @@ skin: 'kama', language: 'es', height: '300px', - width: '800px' + width: '730px' }); }); diff --git a/view/admin/pages/list.html.php b/view/admin/pages/list.html.php index 1c130bf4..7204160a 100644 --- a/view/admin/pages/list.html.php +++ b/view/admin/pages/list.html.php @@ -23,6 +23,10 @@ $translator = ACL::check('/translate') ? true : false; ?> + +Nueva Página + +
Extra
[][] name; ?> <?php echo $license->id; ?> description; ?> group) ? $this['groups'][$license->group] : ''; ?> order; ?>[↑][↓][↑][↓] []
-
- /> -
">
@@ -31,6 +35,7 @@ + @@ -40,9 +45,12 @@ - - + + diff --git a/view/admin/projects/accounts.html.php b/view/admin/projects/accounts.html.php index 04b8b33a..b7dd98be 100644 --- a/view/admin/projects/accounts.html.php +++ b/view/admin/projects/accounts.html.php @@ -21,64 +21,49 @@ use Goteo\Library\Text, Goteo\Model, Goteo\Core\Redirection, - Goteo\Library\SuperForm; - -define('ADMIN_NOAUTOSAVE', true); + Goteo\Library\Message; $project = $this['project']; if (!$project instanceof Model\Project) { + Message::Error('Instancia de proyecto corrupta'); throw new Redirection('/admin/projects'); } $accounts = $this['accounts']; +?> +
+

Es necesario que un proyecto tenga una cuenta PayPal para ejecutar los cargos. La cuenta bancaria es solamente para tener toda la información en el mismo entorno pero no se utiliza en ningún proceso de este sistema.

-$filters = $this['filters']; - -//arrastramos los filtros -$filter = "?status={$filters['status']}&category={$filters['category']}"; - + + -// Superform -?> - +

+
+ +

- +
+ +

- 'action' => '', - 'level' => 3, - 'method' => 'post', - 'title' => '', - 'hint' => 'Es necesario que un proyecto tenga una cuenta PayPal para ejecutar los cargos. La cuenta bancaria es solamente para tener toda la información en el mismo entorno pero no se utiliza en este sistema', - 'class' => 'aqua', - 'footer' => array( - 'view-step-preview' => array( - 'type' => 'submit', - 'name' => 'save-accounts', - 'label' => Text::get('regular-save'), - 'class' => 'next' - ) - ), - 'elements' => array( - 'id' => array ( - 'type' => 'hidden', - 'value' => $project->id - ), - 'bank' => array( - 'type' => 'textbox', - 'title' => 'Cuenta bancaria', - 'value' => $accounts->bank - ), - 'paypal' => array( - 'type' => 'textbox', - 'required' => true, - 'title' => 'Cuenta paypal', - 'value' => $accounts->paypal - ) +

+
+ +

- ) +

+
+ +

- )); - ?> +

+ + allowpp) echo ' checked="checked"'; ?>/> +

- \ No newline at end of file + + + +
\ No newline at end of file diff --git a/view/admin/projects/dates.html.php b/view/admin/projects/dates.html.php index 72427967..a40ab0ff 100644 --- a/view/admin/projects/dates.html.php +++ b/view/admin/projects/dates.html.php @@ -18,9 +18,11 @@ * */ -use Goteo\Library\Text, +use Goteo\Core\View, + Goteo\Library\Text, Goteo\Model, Goteo\Core\Redirection, + Goteo\Library\Message, Goteo\Library\SuperForm; define('ADMIN_NOAUTOSAVE', true); @@ -28,82 +30,75 @@ $project = $this['project']; if (!$project instanceof Model\Project) { + Message::Error('Instancia de proyecto corrupta'); throw new Redirection('/admin/projects'); } -$filters = $this['filters']; +$elements = array( + 'created' => array( + 'type' => 'datebox', + 'title' => 'Fecha de creación', + 'value' => !empty($project->created) ? $project->created : null + ), + 'updated' => array( + 'type' => 'datebox', + 'title' => 'Fecha de enviado a revisión', + 'value' => !empty($project->updated) ? $project->updated : null + ), + 'published' => array( + 'type' => 'datebox', + 'title' => 'Fecha de inicio de campaña', + 'subtitle' => '(Segun esta fecha se calculan los días)', + 'value' => !empty($project->published) ? $project->published : null + ), + 'success' => array( + 'type' => 'datebox', + 'title' => 'Fecha de éxito', + 'subtitle' => '(marca fin de segunda ronda)', + 'value' => !empty($project->success) ? $project->success : null + ), + 'closed' => array( + 'type' => 'datebox', + 'title' => 'Fecha de cierre', + 'value' => !empty($project->closed) ? $project->closed : null + ), + 'passed' => array( + 'type' => 'datebox', + 'title' => 'Fecha de paso a segunda ronda', + 'subtitle' => '(marca fin de primera ronda)', + 'value' => !empty($project->passed) ? $project->passed : null + ) -//arrastramos los filtros -$filter = "?status={$filters['status']}&category={$filters['category']}"; - - -// Superform +); ?> - +
+

+ passed)) { + echo 'El proyecto terminó la primera ronda el día '.date('d/m/Y', strtotime($project->passed)).'.'; + if ($project->passed != $project->willpass) { + echo '
Aunque debería haberla terminado el día '.date('d/m/Y', strtotime($project->willpass)).'.'; + } + } else { + echo 'El proyecto terminará la primera ronda el día '.date('d/m/Y', strtotime($project->willpass)).'.'; + } ?> + +

- Cambiar las fechas puede causar cambios en los días de campaña del proyecto.

- 'action' => '', - 'level' => 3, - 'method' => 'post', - 'title' => '', - 'hint' => 'Cambiar las fechas solamente si se conocen los efectos colaterales', - 'class' => 'aqua', - 'footer' => array( - 'view-step-preview' => array( - 'type' => 'submit', - 'name' => 'save-dates', - 'label' => Text::get('regular-save'), - 'class' => 'next' - ) - ), - 'elements' => array( - 'id' => array ( - 'type' => 'hidden', - 'value' => $project->id - ), - 'created' => array( - 'type' => 'datebox', - 'required' => true, - 'title' => 'Fecha de creación', - 'size' => 8, - 'value' => !empty($project->created) ? $project->created : null - ), - 'updated' => array( - 'type' => 'datebox', - 'required' => true, - 'title' => 'Fecha de enviado a revisión', - 'size' => 8, - 'value' => !empty($project->updated) ? $project->updated : null - ), - 'published' => array( - 'type' => 'datebox', - 'title' => 'Fecha de inicio de campaña', - 'size' => 8, - 'value' => !empty($project->published) ? $project->published : null - ), - 'success' => array( - 'type' => 'datebox', - 'title' => 'Fecha de éxito', - 'size' => 8, - 'value' => !empty($project->success) ? $project->success : null - ), - 'closed' => array( - 'type' => 'datebox', - 'title' => 'Fecha de cierre', - 'size' => 8, - 'value' => !empty($project->closed) ? $project->closed : null - ), - 'passed' => array( - 'type' => 'datebox', - 'title' => 'Fecha de paso a segunda ronda', - 'size' => 8, - 'value' => !empty($project->passed) ? $project->passed : null - ) + + - ) +$element) : ?> +
+

:

+ $element['value'], 'id'=>$id, 'name'=>$id)); ?> + '; ?> +
+
+ - )); - ?> + - \ No newline at end of file + +
diff --git a/view/admin/projects/list.html.php b/view/admin/projects/list.html.php index 34288265..380ece70 100644 --- a/view/admin/projects/list.html.php +++ b/view/admin/projects/list.html.php @@ -20,24 +20,28 @@ use Goteo\Library\Text; +// paginacion +require_once 'library/pagination/pagination.php'; + $filters = $this['filters']; -//arrastramos los filtros -$filter = "?status={$filters['status']}&category={$filters['category']}&owner={$filters['owner']}&name={$filters['name']}&order={$filters['order']}"; +$the_filters = ''; +foreach ($filters as $key=>$value) { + $the_filters .= "&{$key}={$value}"; +} +$pagedResults = new \Paginated($this['projects'], 10, isset($_GET['page']) ? $_GET['page'] : 1); ?> +Asignar traductores +
+
Página Descripción
[Editar] name; ?> description; ?>[Traducir][Ver] + + [Traducir] +
+ + + + - - -
-
- +
+

@@ -51,20 +55,28 @@
-
- +
+

-
+
+ + +
- -
+
+ Quitar filtros + +

Es necesario poner algun filtro, hay demasiados registros!

+ +

No se han encontrado registros

+ +

OJO! Resultado limitado a 999 registros como máximo.

+
+ +fetchPagedRow()) : +?>
- - - - - - - - - + + + + + + + - - + - - - - - + + + + - + + + - + + + + -
Proyecto Creador Recibido Estado% Días Conseguido Mínimo Proyecto Creador Recibido EstadoNodoMínimoÓptimo
name; ?>user->name; ?>user->email, 0, 100); ?> updated)); ?>status]; ?>status < 3) echo $project->progress; ?>status == 3) echo "$project->days (round {$project->round})"; ?>invested; ?>mincost; ?>status == 1 && !$project->draft) ? 'En negociación' : $this['status'][$project->status]; ?>node; ?>mincost).'€'; ?>maxcost).'€'; ?>
>>> Acciones: + status < 3) echo "Información al {$project->progress}%"; + if ($project->status == 3 && $project->round > 0) echo "Le quedan {$project->days} días de la {$project->round}ª ronda.   Conseguido: ".\amount_format($project->invested)."€   Cofin: {$project->num_investors}   Colab: {$project->num_messegers}"; + ?>
+ IR A:  [Editar] - status < 2) : ?>id}{$filter}"; ?>">[A revisión] - status < 3 && $project->status > 0) : ?>id}{$filter}"; ?>" onclick="return confirm('El proyecto va a comenzar los 40 dias de la primera ronda de campaña, ¿comenzamos?');">[Publicar] - status != 1) : ?>id}{$filter}"; ?>" onclick="return confirm('Mucho Ojo! si el proyecto esta en campaña, ¿Reabrimos la edicion?');">[Reabrir] - status == 4) : ?>id}{$filter}"; ?>">[Retorno Cumplido] - status < 3 && $project->status > 0) : ?>id}{$filter}"; ?>" onclick="return confirm('El proyecto va a desaparecer del admin, solo se podra recuperar desde la base de datos, Ok?');">[Descartar] - id}{$filter}"; ?>">[Cambiar fechas] - id}{$filter}"; ?>">[Cuentas] - translate) : ?>id}"; ?>">[Ir a traducción] - id}"; ?>">[Habilitar traducción] - [Informe Financiacion] + [Impulsor] + node == $_SESSION['admin_node'])) : ?> + [Aportes] + + [Aportes] + + [Cofinanciadores] + [Informe Financiacion]

+ CAMBIAR:  + id}"; ?>">[Fechas] + id}"; ?>">[Cuentas] + status < 4) : ?>id}"; ?>" onclick="return confirm('Esto es MUY DELICADO, seguimos?');">[Id] +  |  + status < 2) : ?>id}"; ?>" onclick="return confirm('El creador no podrá editarlo más, ok?');">[A revisión] + status < 3 && $project->status > 0) : ?>id}"; ?>" onclick="return confirm('El proyecto va a comenzar los 40 dias de la primera ronda de campaña, ¿comenzamos?');">[Publicar] + status != 1) : ?>id}"; ?>" onclick="return confirm('Mucho Ojo! si el proyecto esta en campaña, ¿Reabrimos la edicion?');">[Reabrir edición] + status == 4) : ?>id}"; ?>" onclick="return confirm('El proyecto pasara a ser un caso de éxito, ok?');">[Retorno Cumplido] + status == 5) : ?>id}"; ?>" onclick="return confirm('Lo echamos un paso atras, ok?');">[Retorno Pendiente] + status < 3 && $project->status > 0) : ?>id}"; ?>" onclick="return confirm('El proyecto va a desaparecer del admin, solo se podra recuperar desde la base de datos, Ok?');">[Descartar] +
+ GESTIONAR:  + status == 1) : ?>id}"; ?>" onclick="return confirm('Se va a iniciar revisión de un proyecto en estado Edición, ok?');">[Iniciar revisión] + status == 2) : ?>[Ir a la revisión] + translate) : ?>id}"; ?>">[Ir a la traducción] + id}"; ?>">[Habilitar traducción] + [Organizar imágenes] + status, array('1', '2', '3')) && !isset($project->called)) : ?>id}"; ?>">[Asignarlo a una convocatoria] + id])) : ?>id}"; ?>">[Contrato] + status < 3) : ?>id}"; ?>" onclick="return confirm('Se va a enviar un mail automáticamente pero no cambiará el estado, ok?');">[Rechazo express] +
- -

No se han encontrado registros

- -
\ No newline at end of file +
+ +
    +setLayout(new DoubleBarLayout()); + echo $pagedResults->fetchPagedNavigation($the_filters); ?> +
+ diff --git a/view/admin/promote/edit.html.php b/view/admin/promote/edit.html.php index 9c8d3187..4345114d 100644 --- a/view/admin/promote/edit.html.php +++ b/view/admin/promote/edit.html.php @@ -23,9 +23,11 @@ $promo = $this['promo']; +$node = isset($_SESSION['admin_node']) ? $_SESSION['admin_node'] : \GOTEO_NODE; + // proyectos disponibles // si tenemos ya proyecto seleccionado lo incluimos -$projects = Model\Promote::available($promo->project); +$projects = Model\Promote::available($promo->project, $node); $status = Model\Project::status(); ?> @@ -44,15 +46,17 @@

+

- Máximo 20 caracteres
- + Máximo 24 caracteres
+

Máximo 100 caracteres
- +

+


diff --git a/view/admin/promote/list.html.php b/view/admin/promote/list.html.php index a3e67679..d22b6dec 100644 --- a/view/admin/promote/list.html.php +++ b/view/admin/promote/list.html.php @@ -22,15 +22,15 @@ $translator = ACL::check('/translate') ? true : false; ?> -Nuevo destacado +Nuevo destacado

- - + + @@ -45,13 +45,13 @@ - - + + - - - + + + - + diff --git a/view/admin/sended/list.html.php b/view/admin/sended/list.html.php index e9d15ead..9f11df7f 100644 --- a/view/admin/sended/list.html.php +++ b/view/admin/sended/list.html.php @@ -18,80 +18,91 @@ * */ -use Goteo\Library\Text; +use Goteo\Library\Text, + Goteo\Core\View; // paginacion require_once 'library/pagination/pagination.php'; $filters = $this['filters']; $templates = $this['templates']; +$the_filters = ''; +foreach ($filters as $key => $value) { + $the_filters .= "&{$key}={$value}"; +} -//arrastramos los filtros -$filter = "?user={$filters['user']}&template={$filters['template']}"; +$pagedResults = new \Paginated($this['sended'], 20, isset($_GET['page']) ? $_GET['page'] : 1); +?> +
+
+
+
+ +
-$sended = $this['sended']; +
+
+ +
-$pagedResults = new \Paginated($sended, 20, isset($_GET['page']) ? $_GET['page'] : 1); +
-?> -
- +
+
+ $filters['date_from'], 'id' => 'date-filter-from', 'name' => 'date_from')); ?> +
+
+
+ $filters['date_until'], 'id' => 'date-filter-until', 'name' => 'date_until')); ?> +
+
+ +
-
Proyecto Título Proyecto Estado Posición
name; ?>active) ? ''.$promo->title.'' : $promo->title; ?>[Ver]active) ? ''.$promo->name.'' : $promo->name; ?> status; ?> order; ?>[↑][↓][Editar][↑][↓][Editar] active) : ?> [Ocultar] @@ -60,7 +60,7 @@ [Traducir] [Quitar][Quitar]
- - - - - - - -
-
- -
-
- -
-
- - - - - - - - - - - - fetchPagedRow()) : - $link = SITE_URL.'/mail/'.base64_encode(md5(uniqid()).'¬'.$send->email.'¬'.$send->id).'/?email='.$send->email; - ?> - - - - - - - - - -
DestinatarioPlantillaFecha
[Enlace]user . " [ {$send->email} ]"; ?>template]; ?>date; ?>
-
-
    -setLayout(new DoubleBarLayout()); - echo $pagedResults->fetchPagedNavigation(str_replace('?', '&', $filter)); ?> -
+ +

Es necesario poner algun filtro, hay demasiados registros!

+ + + + + + + + + + + + + fetchPagedRow()) : + $link = SITE_URL . '/mail/' . base64_encode(md5(uniqid()) . '¬' . $send->email . '¬' . $send->id) . '/?email=' . urlencode($send->email); + ?> + + + + + + + + + +
DestinatarioPlantillaFecha
[Enlace]email; ?>template]; ?>date; ?>
+
+
    + setLayout(new DoubleBarLayout()); + echo $pagedResults->fetchPagedNavigation(str_replace('?', '&', $the_filters)); ?> +
-

No se han encontrado registros

+

No se han encontrado registros

\ No newline at end of file diff --git a/view/admin/templates/edit.html.php b/view/admin/templates/edit.html.php index 8ba4794c..99ed4190 100644 --- a/view/admin/templates/edit.html.php +++ b/view/admin/templates/edit.html.php @@ -25,6 +25,7 @@
+


diff --git a/view/admin/templates/list.html.php b/view/admin/templates/list.html.php index 6eb97f4a..45c98dae 100644 --- a/view/admin/templates/list.html.php +++ b/view/admin/templates/list.html.php @@ -22,7 +22,36 @@ Goteo\Core\ACL; $translator = ACL::check('/translate') ? true : false; + +$filters = $this['filters']; ?> +

+ + + + + + + + + +
+
+ +
+
+ +
+ +
+ +
+
diff --git a/view/admin/texts/list.html.php b/view/admin/texts/list.html.php index 0a748e81..95d07789 100644 --- a/view/admin/texts/list.html.php +++ b/view/admin/texts/list.html.php @@ -24,17 +24,6 @@ $translator = ACL::check('/translate') ? true : false; $filters = $this['filters']; - -// si hay filtro lo arrastramos -if (!empty($filters)) { - $filter = "?"; - foreach ($filters as $key => $fil) { - $filter .= "$key={$fil['value']}&"; - } -} else { - $filter = ''; -} - $botones = array( 'edit' => '[Editar]', 'remove' => '[Quitar]', @@ -48,7 +37,7 @@ ?> - + @@ -76,7 +65,9 @@
- + +

Es necesario poner algun filtro, hay demasiados registros!

+
@@ -89,7 +80,7 @@ - + diff --git a/view/admin/translates/edit.html.php b/view/admin/translates/edit.html.php index e104bc95..44fe2d84 100644 --- a/view/admin/translates/edit.html.php +++ b/view/admin/translates/edit.html.php @@ -25,11 +25,18 @@ $langs = Lang::getAll(); $filters = $this['filters']; - -//arrastramos los filtros -$filter = "?owner={$filters['owner']}&translator={$filters['translator']}"; - ?> +

Traductores para el proyecto name ?>

@@ -42,13 +49,13 @@ translators as $userId=>$userName) : ?>
- + - + - +
[Editar][Editar] text; ?> group; ?>
owner) echo '(AUTOR) '; ?>[Desasignar][Desasignar]
- id, array_keys($project->translators))) continue; @@ -57,17 +64,17 @@ [Asignar]Asignar

- Cerrar la traducción    - Avisar al autor + Cerrar la traducción    + Avisar al autor
-
+ diff --git a/view/admin/translates/list.html.php b/view/admin/translates/list.html.php index d82ebca3..68a42eb7 100644 --- a/view/admin/translates/list.html.php +++ b/view/admin/translates/list.html.php @@ -21,12 +21,8 @@ use Goteo\Library\Text; $filters = $this['filters']; - -//arrastramos los filtros -$filter = "?owner={$filters['owner']}&translator={$filters['translator']}"; - ?> -Nuevo proyecto para traducir +Nuevo proyecto para traducir
@@ -64,7 +60,7 @@
- + diff --git a/view/admin/users/list.html.php b/view/admin/users/list.html.php index 2e1d24bf..c4f935c1 100644 --- a/view/admin/users/list.html.php +++ b/view/admin/users/list.html.php @@ -20,25 +20,49 @@ use Goteo\Library\Text; +// paginacion +require_once 'library/pagination/pagination.php'; + $filters = $this['filters']; +$users = $this['users']; + +// la ordenación por cantidad y proyectos hay que hacerla aqui +if ($filters['order'] == 'amount') { + uasort($users, + function ($a, $b) { + if ($a->namount == $b->namount) return 0; + return ($a->namount < $b->namount) ? 1 : -1; + } + ); +} +if ($filters['order'] == 'projects') { + uasort($users, + function ($a, $b) { + if ($a->nprojs == $b->nprojs) return 0; + return ($a->nprojs < $b->nprojs) ? 1 : -1; + } + ); +} -//arrastramos los filtros -$filter = "?status={$filters['status']}&interest={$filters['interest']}&role={$filters['role']}&order={$filters['order']}"; +$the_filters = ''; +foreach ($filters as $key=>$value) { + $the_filters .= "&{$key}={$value}"; +} +$pagedResults = new \Paginated($users, 20, isset($_GET['page']) ? $_GET['page'] : 1); ?> -Crear usuario +Crear usuario
-
[Editar][Editar] name; ?> user->name; ?> lang; ?>
@@ -66,10 +90,9 @@ - -
-
- + + $roleName) : ?> +
+
+
+ Quitar filtros
- + +

Es necesario poner algun filtro, hay demasiados registros!

+ - + + - - - - + fetchPagedRow()) : + $adminNode = ($user->admin) ? $user->admin_node : null; + ?> - - - + + + + - + + + + - - - + + + +
Alias User EmailProyectosCantidad Alta - - - - -
[Gestionar]name; ?>id; ?>>name, 0, 20); ?>id, 0, 20); ?> email; ?>nprojs; ?>namount); ?> € register_date; ?> - active ? '' : ' Inactivo'; ?> - hide ? ' Oculto' : ''; ?> - checker ? ' Revisor' : ''; ?> - translator ? ' Traductor' : ''; ?> +
[Gestionar]nprojs > 0) { + if (!isset($_SESSION['admin_node']) || (isset($_SESSION['admin_node']) && $user->node == $_SESSION['admin_node'])) : ?> + [Aportes] + + [Aportes] + + active && $user->hide) ? ' Baja ' : ''; ?> + active ? '' : ' Inactivo '; ?> + hide ? ' Oculto ' : ''; ?> + checker ? ' Revisor ' : ''; ?> + translator ? ' Traductor ' : ''; ?> + caller ? ' Convocador ' : ''; ?> + admin ? ' Admin ' : ''; ?> + manager ? ' Gestor ' : ''; ?> + vip ? ' VIP ' : ''; ?> [Editar][Suplantar]

- -

No se han encontrado registros

- -
\ No newline at end of file +
+
    +setLayout(new DoubleBarLayout()); + echo $pagedResults->fetchPagedNavigation($the_filters); ?> +
+ +

No se han encontrado registros

+ diff --git a/view/admin/users/manage.html.php b/view/admin/users/manage.html.php index 3e0527d2..dc41060a 100644 --- a/view/admin/users/manage.html.php +++ b/view/admin/users/manage.html.php @@ -21,75 +21,114 @@ use Goteo\Library\Text; $user = $this['user']; - -$roles = $user->roles; -array_walk($roles, function (&$role) { $role = $role->name; }); +$roles = $this['roles']; +$langs = $this['langs']; ?>
-
-
Nombre de usuario:
-
name ?>
-
-
-
Login de acceso:
-
id ?>
-
-
-
Email:
-
email ?>
-
-
-
Roles actuales:
-
-
- roles))) : ?> - id}/nochecker"; ?>" class="button red">Quitarlo de revisor - - id}/checker"; ?>" class="button">Hacerlo revisor - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nombre de usuarioname ?>
Login de accesoid ?>
Emailemail ?>
Nodonode] ?>
Roles actuales + roles as $role=>$roleData) { + if (in_array($role, array('user', 'superadmin', 'root'))) { + echo '['.$roleData->name . ']  '; + } else { + // onclick="return confirm('Se le va a quitar el rol de name ? > a este usuario')" + ?> + [name ?>]   + +
Roles disponibles + $roleName) { + if (!in_array($roleId, array_keys($user->roles)) && !in_array($roleId, array('root', 'superadmin'))) { + // onclick="return confirm('Se le va a dar el rol de a este usuario')" + ?> + []   + +
Estado de la cuenta + active) : ?> + id}/ban"; ?>" style="color:green;text-decoration:none;font-weight:bold;">Activa + + id}/unban"; ?>" style="color:red;text-decoration:none;font-weight:bold;">Inactiva + +
Visibilidad + hide) : ?> + id}/hide"; ?>" style="color:green;text-decoration:none;font-weight:bold;">Visible + + id}/show"; ?>" style="color:red;text-decoration:none;font-weight:bold;">Oculto + +
+
+ +roles['translator'])) : ?> +
+

Idiomas de traductor

+ translangs)) : ?>

¡No tiene ningún idioma asignado!

+
+ + + translangs[$lang->id])) ? ' checked="checked"' : ''; + ?> + + + + +
+ +
+
+