create languages pages

This commit is contained in:
Manuel Raynaud
2013-10-22 16:53:37 +02:00
parent 3c69e38a3b
commit c15431a468
3 changed files with 95 additions and 0 deletions

View File

@@ -920,6 +920,12 @@
<!-- end tax rules management -->
<!-- language management -->
<route id="admin.configuration.languages" path="/admin/configuration/languages">
<default key="_controller">Thelia\Controller\Admin\LangController::defaultAction</default>
</route>
<!-- The default route, to display a template -->

View File

@@ -0,0 +1,43 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Controller\Admin;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Security\Resource\AdminResources;
/**
* Class LangController
* @package Thelia\Controller\Admin
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class LangController extends BaseAdminController
{
public function defaultAction()
{
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::VIEW)) return $response;
return $this->render('lang');
}
}

View File

@@ -0,0 +1,46 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Languages an URLs'}{/block}
{block name="check-resource"}admin.configuration.languages{/block}
{block name="check-access"}view{/block}
{block name="main-content"}
<div class="modules">
<div id="wrapper" class="container">
<div class="clearfix">
<ul class="breadcrumb pull-left">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/modules'}">{intl l="Languages & URLs"}</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l="Languages management"}
</caption>
<thead>
<tr>
<th>{intl l="Title"}</th>
<th>{intl l="code ISO 639"}</th>
<th>{intl l="locale"}</th>
<th>{intl l="locale"}</th>
{module_include location='modules_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
{/block}