作者:martin2014040
项目:lulucms
public function setTheme()
{
$currentTheme = Resource::getHomeTheme();
$moduleId = LuLu::$app->controller->module->id;
$config = ['pathMap' => ['@app/views' => ['@statics/themes/' . $currentTheme . '/views', '@statics/themes/basic/views'], '@source/modules/' . $moduleId . '/home/views' => ['@statics/themes/' . $currentTheme . '/modules/' . $moduleId, '@statics/themes/basic/modules/' . $moduleId]], 'basePath' => '@statics/themes/basic', 'baseUrl' => '@statics/themes/basic'];
$this->theme = new Theme($config);
}
作者:hucongyan
项目:lulucms
public function setTheme()
{
$currentTheme = Resource::getAdminTheme();
$moduleId = LuLu::$app->controller->module->id;
$config = ['pathMap' => ['@app/views' => ['@statics/admin/' . $currentTheme . '/views'], '@source/modules/' . $moduleId . '/admin/views' => ['@statics/admin/' . $currentTheme . '/modules/' . $moduleId]], 'baseUrl' => '@statics/admin/' . $currentTheme];
$this->theme = new Theme($config);
}
作者:snowba
项目:lulucms
public function beginLoopData($dataSource, $item, $appendOptions = [])
{
$options = [];
$options['dataSource'] = $dataSource;
$options['item'] = Resource::getThemePath($item);
return LoopData::begin($options);
}
作者:phpson
项目:lulucms
public function showWidget($name, $params)
{
$currentTheme = Resource::checkHomeThemeFile('/misc/' . $name);
if ($currentTheme) {
$class = '\\statics\\themes\\' . $currentTheme . '\\misc\\' . $name;
echo $class::widget($params);
} else {
echo 'the widget ' . $name . ' does not exist';
}
}
作者:ruzuoju
项目:lulucms
protected function initDefaultButtons()
{
if (!isset($this->buttons['view'])) {
$this->buttons['view'] = function ($url, $model, $key, $index, $gridView) {
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/magnifier.png">', $url, ['title' => Yii::t('yii', 'View'), 'data-pjax' => '0']);
};
}
if (!isset($this->buttons['update'])) {
$this->buttons['update'] = function ($url, $model, $key, $index, $gridView) {
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/pencil.png">', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
};
}
if (!isset($this->buttons['delete'])) {
$this->buttons['delete'] = function ($url, $model, $key, $index, $gridView) {
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/cross.png">', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
};
}
}
作者:huasxi
项目:lulucms
<div class="mod-header-user">
<ul class="pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle mod-bell" data-toggle="dropdown">
<i class="icon icon-bell"></i>
</a>
<ul class="dropdown-menu mod-chat">
<p>没有通知</p>
</ul>
</li>
<li class="dropdown username">
<a href="" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?php echo Resource::getAdminUrl('/images/avatar-mid-img.png')?>" class="img-circle" width="30">
admin888 <span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right mod-user">
<li>
<a href="<?php echo LuLu::getAlias('@web');?>" target="_blank"><i class="icon icon-home"></i>首页</a>
</li>
<li>
<?php echo Html::a('<i class="icon icon-ul"></i>概述',['/site/welcome'],['target'=>'mainFrame'])?>
</li>
<li>
<?php echo Html::a('<i class="icon icon-logout"></i>退出',['/site/logout'],['target'=>'mainFrame'])?>
</li>
作者:phpson
项目:lulucms
public static function checkHomeThemeFile($fileName, $checkDefault = true)
{
$currentTheme = Resource::getHomeTheme();
$path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
if (!FileHelper::exist($path) && $checkDefault) {
$currentTheme = 'd';
$path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
} else {
return $currentTheme;
}
if (!FileHelper::exist($path)) {
return false;
}
return $currentTheme;
}
作者:ruzuoju
项目:lulucms
use source\LuLu;
use source\modules\rbac\models\Role;
use source\libs\Resource;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\rbac\models\search\RoleSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$categoryId = LuLu::getGetValue('category');
$this->title = '角色管理';
$this->params['breadcrumbs'][] = $this->title;
$columns = [['attribute' => 'id', 'width' => '120px;'], ['attribute' => 'name', 'width' => '120px;'], ['attribute' => 'description', 'width' => 'auto'], ['class' => 'source\\core\\grid\\ActionColumn', 'template' => '{permission}{update} {delete}', 'buttons' => ['permission' => function ($url, $model) {
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/key.png">', Url::to(['relation', 'role' => $model['id']]), ['title' => '设置权限']);
}, 'delete' => function ($url, $model) {
if ($model->is_system) {
return '';
}
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/cross.png">', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}]]];
?>
<?php
$this->toolbars([Html::a('新建', ['create', 'category' => $categoryId], ['class' => 'btn btn-xs btn-primary mod-site-save'])]);
?>
<style>
.ui-tabs .ui-tabs-panel{padding:0px;}
</style>
<div class="da-ex-tabs">
<ul>
<li><a href="#tabs-<?php
echo Role::Category_Member;
?>
作者:qq44314081
项目:lulucms
</div>
<!-- Main Content Wrapper -->
<div id="da-content-wrap" class="clearfix">
<!-- Content Area -->
<div id="da-content-area">
<?php
if (LuLu::getViewParam('defaultLayout') === null) {
?>
<div class="grid_4">
<div class="da-panel">
<div class="da-panel-header">
<span class="da-panel-title">
<img src="<?php
echo Resource::getAdminUrl();
?>
/images/icons/black/16/pencil.png" alt="">
<?php
echo $this->title;
?>
</span>
</div>
<?php
if (($toolbars = LuLu::getViewParam('toolbars')) !== null) {
?>
<div class="da-panel-toolbar top">
<ul>
<?php
作者:sym66
项目:lulucms
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use source\LuLu;
use source\libs\Constants;
use source\core\grid\GridView;
use source\modules\fragment\models\Fragment;
use source\libs\Resource;
/* @var $this source\core\back\BackView */
/* @var $searchModel source\modules\fragment\models\search\FragmentSearch */
/* @var $dataProvider source\core\data\ActiveDataProvider */
$type = LuLu::getGetValue('type');
$this->title = Fragment::getTypeItems($type);
$this->params['breadcrumbs'][] = $this->title;
$this->toolbars([Html::a('新建', ['create', 'type' => $type], ['class' => 'btn btn-xs btn-primary mod-site-save'])]);
?>
<?php
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'source\\core\\grid\\IdColumn'], 'code', ['attribute' => 'name', 'width' => '250px', 'value' => function ($model, $key, $index, $column) {
$indexUrl = Url::to(['fragment' . $model->type . '-data/index', 'fid' => $model->id, 'type' => $model->type]);
return Html::a($model->name, $indexUrl);
}], ['attribute' => 'description', 'width' => 'auto'], ['class' => 'source\\core\\grid\\ActionColumn', 'width' => '60px', 'template' => '{data-create}{update} {delete}', 'buttons' => ['data-create' => function ($url, $model, $key, $index, $gridView) {
$addUrl = Url::to(['fragment' . $model->type . '-data/create', 'fid' => $model->id, 'type' => $model->type]);
return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/text_signature.png">', $addUrl, ['title' => '添加内容']);
}]]]]);
?>
作者:ruzuoju
项目:lulucms
public function init()
{
parent::init();
$this->libUrl = Resource::getCommonUrl() . '/libs/kindeditor';
}
作者:liuwz46550123
项目:lscm
/**
* 向视图中注册默认的js资源
* @param type $jsFile
*/
public static function registerJsFile($jsFile)
{
$jsUrl = Resource::getAdminUrl($jsFile);
LsYii::getView()->registerJsFile($jsUrl, ['depends' => 'yii\\web\\YiiAsset']);
}
作者:merlinxi
项目:lulublo
use source\LuLu;
/* @var $this yii\web\View */
if (!isset($orderBy)) {
$orderBy = 'created_at desc';
}
if (!isset($limit)) {
$limit = 5;
}
if (!isset($item)) {
$item = 'item_pic';
}
$where = [];
if (!isset($isPic)) {
$isPic = true;
}
$moduleId = LuLu::$app->controller->module->id;
if ($moduleId !== 'app-frontend') {
$where = ['content_type' => $moduleId];
}
$query = Content::findQuery($where, $orderBy);
if ($isPic) {
$query->andWhere(['!=', 'thumb', '']);
}
$query->limit($limit);
$contents = $query->all();
?>
<?php
foreach ($contents as $content) {
echo $this->render(Resource::getThemePath('/views/_inc/' . $item), ['content' => $content]);
}
作者:liuwz46550123
项目:lscm
<input value="" type="email" name="email" id="email" class="class_input email required" />
<span class="email"></span>
</td>
</tr>
<!-- <tr>
<th height="30" align="right">安装测试数据:</th>
<td>
<input value="Y" type="checkbox" name="testData" style="margin-left: 5px;" id="testData" />
是
</td>
</tr>
<tr>
<th height="30" align="right"> </th>
<td>
<p class="red">全新安装会覆盖旧数据 </p>
</td>
</tr>-->
</table>
<div class="inst_btn_area">
<button type="button" onclick="history.go(-1);return false;" class="button">返 回</button>
<button type="submit" class="button">下一步</button>
</div>
<?php
ActiveForm::end();
?>
</div>
<?php
Resource::jsFile(Resource::getCommonUrl('/js/jquery.min.js'));
Resource::jsFile(Resource::getInstallUrl("/js/jquery.db.validate.js"));
作者:merlinxi
项目:lulublo
<?php
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use source\models\Takonomy;
use source\libs\Resource;
/* @var $this \yii\web\View */
/* @var $content string */
Resource::registerCommon('/libs/bootstrap/3.0.2/css/bootstrap.css');
Resource::registerCommon('/js/common.js');
Resource::registerAdmin('/css/site.css');
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php
echo Yii::$app->language;
?>
">
<head>
<meta charset="<?php
echo Yii::$app->charset;
?>
"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
echo Html::csrfMetaTags();
?>
<title><?php
作者:liuwz46550123
项目:lscm
<?php
use source\LsYii;
use source\helpers\Html;
use source\core\widgets\ActiveForm;
use source\libs\Constants;
use source\libs\Resource;
use source\modules\menu\models\Menu;
use source\helpers\Url;
use backend\assets\AppAsset;
/* @var $this yii\web\View */
/* @var $model common\models\Menu */
/* @var $form yii\widgets\ActiveForm */
$this->registerJsFile(Resource::getAdminUrl('/default/js/bootstrap-smartsearch.js'), ['depends' => 'yii\\web\\YiiAsset']);
?>
<div class="menu-form">
<?php
$form = ActiveForm::begin(['id' => 'menu-form', 'options' => ['class' => 'form-horizontal']]);
?>
<?php
$disabeld = $model->isNewRecord ? false : true;
?>
<?php
echo $form->field($model, 'pid')->textInput(['class' => 'form-control', 'autocomplete' => 'off', 'data-provide' => "smartsearch", 'data-items' => "all", 'data-source' => Menu::getToJson(), 'data-value' => $model->pid, 'disabled' => $disabeld]);
?>
<?php
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
作者:huasxi
项目:lulucms
var G_BASE_URL = "";
var G_USER_ID = "1";
var G_POST_HASH = "";
</script>
<?php Resource::registerAdmin('/css/common.css?v=20150409');?>
<?php Resource::registerAdmin('/js/jquery.2.js?v=20150409');?>
<?php Resource::registerAdmin('/js/aws_admin.js?v=20150409');?>
<?php Resource::registerAdmin('/js/aws_admin_template.js?v=20150409');?>
<?php Resource::registerAdmin('/js/jquery.form.js?v=20150409');?>
<?php Resource::registerAdmin('/js/framework.js?v=20150409');?>
<?php Resource::registerAdmin('/js/global.js?v=20150409');?>
<!--[if lte IE 8]>
<?php Resource::registerAdmin('/js/respond.js');?>
<![endif]-->
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="aw-login">
<div class="mod center-block">
<h1 style="text-align: center;">LuLu CMS</h1>
<?php $form = ActiveForm::begin([
作者:hucongyan
项目:lulucms
<!-- iOS webapp icons -->
<link rel="apple-touch-icon" href="touch-icon-iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="touch-icon-retina.png" />
<?php
Resource::registerAdmin(['/plugins/fileinput/jquery.fileinput.js', '/plugins/placeholder/jquery.placeholder.js', '/plugins/mousewheel/jquery.mousewheel.js', '/plugins/tinyscrollbar/jquery.tinyscrollbar.js', '/plugins/tipsy/jquery.tipsy-min.js', '/plugins/tipsy/tipsy.css']);
?>
<?php
Resource::registerAdmin(['/css/reset.css', '/css/fluid.css', '/css/login.css']);
?>
<?php
Resource::registerAdmin(['/js/jquery-1.7.2.min.js', '/plugins/placeholder/jquery.placeholder.js', '/plugins/validate/jquery.validate.min.js', '/js/core/dandelion.login.js']);
?>
<title>登录——LuLu CMS 管理中心</title>
<?php
$this->head();
?>
</head>
<body>
<?php
$this->beginBody();
?>
<div id="da-login">
作者:liuwz46550123
项目:lscm
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
use yii\bootstrap\ActiveForm;
use source\LsYii;
use source\helpers\Html;
use yii\bootstrap\Widget;
use source\core\back\BackView;
use source\libs\Resource;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
$this->registerJs("\$(function(){\n \$('#captchaImg').click();\n})", BackView::POS_END);
?>
<style type="text/css">
.wrapper {background: url(<?php
echo Resource::getAdminLoginBackground();
?>
) no-repeat center center;}
.wrapper .admin-title {text-align: center;font-weight: bolder;font-size: 30px;color: white;}
</style>
<div class="wrapper">
<div class="wrapper-box">
<div class="admin-title">
<?php
echo LsYii::gT(LsYii::getName() . "后台管理");
?>
</div>
<div class="admin-form">
<?php
$form = ActiveForm::begin(['id' => 'login-form']);
?>
作者:merlinxi
项目:lulublo
<?php
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use source\libs\Resource;
use source\models\Menu;
/* @var $this \yii\web\View */
/* @var $content string */
Resource::registerCommon('/libs/bootstrap/3.0.2/css/bootstrap.css');
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php
echo Yii::$app->language;
?>
">
<head>
<meta charset="<?php
echo Yii::$app->charset;
?>
"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
echo Html::csrfMetaTags();
?>
<title><?php
echo Html::encode($this->title);
?>
</title>
<?php