Le mirroring des dépôts vers Github est maintenant natif dans Gitlab (et donc Framagit). Merci de passer à la fonction native pour que nous puissions couper notre solution maison. Détails sur https://docs.gitlab.com/ee/workflow/repository_mirroring.html#pushing-to-a-remote-repository (pensez à supprimer le webhook de notre solution maison).

Commit 625421a3 authored by Denis Chenu's avatar Denis Chenu

[fix] 2.6X compatible version

parent 7c2294fa
This diff is collapsed.
......@@ -3,14 +3,14 @@
* The plugin event redirect system
*
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2016 Denis Chenu <http://www.sondages.pro>
* @copyright 2016-2017 Denis Chenu <https://www.sondages.pro>
* @copyright 2016 Advantage <http://www.advantage.fr>
* @license GPL v3
* @version 0.1.1
* @license AGPL v3
* @version 1.1.1
*
* 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
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
......@@ -296,6 +296,7 @@ class adminStats extends \ls\pluginmanager\PluginBase
break;
case "F":
$iNumAnswers=Answer::model()->count("qid=:qid AND concat('',code * 1) = code",array(":qid"=>$oQuestion->qid));
if($iNumAnswers)
{
$oSubQuestions=Question::model()->findAll(array("condition"=>"parent_qid=:qid AND language=:language","order"=>"question_order","params"=>array(":qid"=>$oQuestion->qid,":language"=>$oSurvey->language)));
......@@ -437,10 +438,10 @@ class adminStats extends \ls\pluginmanager\PluginBase
{
Yii::import('application.helpers.viewHelper');
if ($this->event->get('target') != get_class())
if ($this->event->get('target') != get_class()) {
return;
if(Yii::app()->user->getIsGuest())
{
}
if(Yii::app()->user->getIsGuest()) {
App()->user->setReturnUrl(App()->request->requestUri);
App()->controller->redirect(array('/admin/authentication'));
}
......@@ -1015,10 +1016,16 @@ class adminStats extends \ls\pluginmanager\PluginBase
*/
private function render($fileRender)
{
Yii::app()->bootstrap->init();
Yii::setPathOfAlias('adminStats', dirname(__FILE__));
Yii::app()->clientScript->addPackage( 'boostrap-adminStats', array(
'basePath' => 'adminStats.vendor.bootstrap',
'css' => array('css/bootstrap.min.css'),
'js' => array('js/bootstrap.min.js'),
'depends' => array('jquery')
));
$oEvent=$this->event;
Yii::app()->controller->layout='bare'; // bare don't have any HTML
Yii::app()->getClientScript()->registerPackage('boostrap-adminStats');
$this->aRenderData['assetUrl']=$sAssetUrl=Yii::app()->assetManager->publish(dirname(__FILE__) . '/assets');
//~ $this->aRenderData['chartjsUrl']=Yii::app()->assetManager->publish(dirname(__FILE__) . '/vendor/Chart.js');
$this->aRenderData['jqplotUrl']=Yii::app()->assetManager->publish(dirname(__FILE__) . '/vendor/jquery.jqplot');
......
assets/logo.png

4.62 KB | W: | H:

assets/logo.png

4.4 KB | W: | H:

assets/logo.png
assets/logo.png
assets/logo.png
assets/logo.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
......@@ -44,42 +44,25 @@
?>
</head>
<body>
<div class="navbar navbar-top">
<div class="navbar-inner">
<nav class="navbar navbar-default navbar-top">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="brand" href="#"><?php echo CHtml::link(
CHtml::image("{$assetUrl}/logo.png").
CHtml::tag("div",array("class"=>'sr-only'),Yii::app()->getConfig("sitename")),
array("plugins/direct","plugin"=>"adminStats","function"=>"list")
); ?>
</div>
<div class="nav-collapse collapse">
<ul class="nav pull-right">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php echo CHtml::link(
CHtml::tag("span",array("class"=>''),Yii::app()->getConfig("sitename")),
array("plugins/direct","plugin"=>"adminStats","function"=>"list"),
array("class"=>'navbar-brand')
); ?>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="http://extensions.sondages.pro/">About</a><li>
<?php
if(!empty($surveyList))
{
echo CHtml::tag('li',array(),
CHtml::link(gt("Surveys"),array('plugins/direct',"plugin"=>"adminStats","function"=>"list"))
);
//~ echo CHtml::tag('li',array('class'=>"dropdown"),"",false);
//~ echo CHtml::tag('a',array('class'=>"dropdown-toggle",'aria-expanded'=>'false','aria-haspopup'=>'true','role'=>'button','data-toggle'=>'dropdown'),gT("Surveys").' <b class="caret"></b>');
//~ echo CHtml::tag('ul',array('class'=>"dropdown-menu"),"",false);
//~ foreach($surveyList as $survey)
//~ {
//~ echo CHtml::tag('li',array(),
//~ CHtml::link($survey["surveyls_title"],array("plugins/direct","plugin"=>"adminStats","function"=>"stat","sid"=>$survey["sid"]))
//~ );
//~ }
//~ echo CHtml::closeTag('ul');
//~ echo CHtml::closeTag('li');
}
echo CHtml::tag('li',array('class'=>"dropdown"),"",false);
echo CHtml::tag('a',array('class'=>"dropdown-toggle",'aria-expanded'=>'false','aria-haspopup'=>'true','role'=>'button','data-toggle'=>'dropdown'),Yii::app()->user->getName().' <b class="caret"></b>');
echo CHtml::tag('ul',array('class'=>"dropdown-menu"),"",false);
......@@ -94,12 +77,9 @@
echo CHtml::closeTag('ul');
echo CHtml::closeTag('li');
?>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.nav-collapse -->
</div>
</div>
</div>
</nav>
<div class="container">
<?php
Yii::app()->getController()->renderPartial("adminStats.views.{$subview}",$_data_);
......
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