@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | ])->textInput(['placeholder' => $model->getAttributeLabel('title')]) ?> |
25 | 25 | |
26 | 26 | <?= $form->field($model, 'slug', [ |
27 | - 'template' => '<span class="input-group-addon">' . $model->getAttributeLabel('slug') . '</span>{input}', |
|
27 | + 'template' => '<span class="input-group-addon">'.$model->getAttributeLabel('slug').'</span>{input}', |
|
28 | 28 | 'options' => ['class' => 'input-group form-group input-group-sm'], |
29 | 29 | ])->textInput(['maxlength' => 255, 'placeholder' => $model->getAttributeLabel('slug')]) ?> |
30 | 30 | |
@@ -35,18 +35,18 @@ discard block |
||
35 | 35 | <?= $model->getThumbnail('full', ['class' => 'thumbnail']) ?> |
36 | 36 | <?php elseif (preg_match('/^video\//', $model->mime_type)): ?> |
37 | 37 | <video controls class="full-width"> |
38 | - <source src="<?= $model->getUploadUrl() . $metadata['versions']['full']['url'] ?>" |
|
38 | + <source src="<?= $model->getUploadUrl().$metadata['versions']['full']['url'] ?>" |
|
39 | 39 | type="<?= $model->mime_type ?>"> |
40 | 40 | <?= Yii::t('writesdown', 'Your browser does not support HTML5 video.') ?> |
41 | 41 | </video> |
42 | 42 | <?php elseif (preg_match('/^audio\//', $model->mime_type)): ?> |
43 | 43 | <audio controls class="full-width"> |
44 | - <source src="<?= $model->getUploadUrl() . $metadata['versions']['full']['url'] ?>" |
|
44 | + <source src="<?= $model->getUploadUrl().$metadata['versions']['full']['url'] ?>" |
|
45 | 45 | type="<?= $model->mime_type ?>"> |
46 | 46 | <?= Yii::t('writesdown', 'Your browser does not support HTML5 audio.') ?> |
47 | 47 | </audio> |
48 | 48 | <?php else: ?> |
49 | - <?= Html::textInput('media-file-name', $model->getUploadUrl() . $metadata['versions']['full']['url'], [ |
|
49 | + <?= Html::textInput('media-file-name', $model->getUploadUrl().$metadata['versions']['full']['url'], [ |
|
50 | 50 | 'class' => 'form-control input-sm', |
51 | 51 | 'readonly' => 'readonly', |
52 | 52 | ]) ?> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'compressorRoute' => 'editor/compressor', |
64 | 64 | 'settings' => [ |
65 | 65 | 'menubar' => false, |
66 | - 'skin_url' => Url::base(true) . '/editor/skins/writesdown', |
|
66 | + 'skin_url' => Url::base(true).'/editor/skins/writesdown', |
|
67 | 67 | 'toolbar_items_size' => 'medium', |
68 | 68 | 'toolbar' => 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter ' |
69 | 69 | . 'alignright alignjustify | bullist numlist outdent indent | link image | code fullscreen', |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'load' => new JsExpression('function (query, callback) { |
101 | 101 | if (!query.length) return callback(); |
102 | 102 | $.ajax({ |
103 | - url: "' . Url::to(['/post/ajax-search']) . '", |
|
103 | + url: "' . Url::to(['/post/ajax-search']).'", |
|
104 | 104 | type: "POST", |
105 | 105 | dataType: "json", |
106 | 106 | data: { |
@@ -84,7 +84,7 @@ |
||
84 | 84 | </div> |
85 | 85 | </div> |
86 | 86 | <?php Modal::begin([ |
87 | - 'header' => '<i class="glyphicon glyphicon-time"></i> ' . Yii::t('writesdown', 'Change Media Date') . '', |
|
87 | + 'header' => '<i class="glyphicon glyphicon-time"></i> '.Yii::t('writesdown', 'Change Media Date').'', |
|
88 | 88 | 'id' => 'modal-for-date', |
89 | 89 | ]) ?> |
90 | 90 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'columns' => [ |
51 | 51 | [ |
52 | 52 | 'class' => 'yii\grid\CheckboxColumn', |
53 | - 'checkboxOptions' => function ($model) { |
|
53 | + 'checkboxOptions' => function($model) { |
|
54 | 54 | if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) { |
55 | 55 | return ['disabled' => 'disabled']; |
56 | 56 | } |
@@ -61,17 +61,17 @@ discard block |
||
61 | 61 | [ |
62 | 62 | 'attribute' => Yii::t('writesdown', 'Preview'), |
63 | 63 | 'format' => 'raw', |
64 | - 'value' => function ($model) { |
|
64 | + 'value' => function($model) { |
|
65 | 65 | /* @var $model common\models\Media */ |
66 | 66 | $metadata = $model->getMeta('metadata'); |
67 | 67 | if (preg_match('/^image\//', $model->mime_type)) { |
68 | - return Html::a(Html::img($model->getUploadUrl() . $metadata['icon_url']), [ |
|
68 | + return Html::a(Html::img($model->getUploadUrl().$metadata['icon_url']), [ |
|
69 | 69 | 'update', |
70 | 70 | 'id' => $model->id, |
71 | 71 | ], ['class' => 'media-mime-icon']); |
72 | 72 | } |
73 | 73 | |
74 | - return Html::a(Html::img(Url::base(true) . '/' . $metadata['icon_url']), [ |
|
74 | + return Html::a(Html::img(Url::base(true).'/'.$metadata['icon_url']), [ |
|
75 | 75 | 'update', |
76 | 76 | 'id' => $model->id, |
77 | 77 | ], ['class' => 'media-mime-icon']); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | [ |
81 | 81 | 'label' => Yii::t('writesdown', 'File Name'), |
82 | 82 | 'format' => 'html', |
83 | - 'value' => function ($model) { |
|
83 | + 'value' => function($model) { |
|
84 | 84 | /* @var $model common\models\Media */ |
85 | 85 | $metadata = $model->getMeta('metadata'); |
86 | 86 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ], |
90 | 90 | [ |
91 | 91 | 'attribute' => 'username', |
92 | - 'value' => function ($model) { |
|
92 | + 'value' => function($model) { |
|
93 | 93 | return $model->mediaAuthor->username; |
94 | 94 | }, |
95 | 95 | ], |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | [ |
99 | 99 | 'class' => 'yii\grid\ActionColumn', |
100 | 100 | 'buttons' => [ |
101 | - 'view' => function ($url, $model) { |
|
101 | + 'view' => function($url, $model) { |
|
102 | 102 | return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $model->url, [ |
103 | 103 | 'title' => Yii::t('yii', 'View'), |
104 | 104 | 'data-pjax' => '0', |
105 | 105 | ]); |
106 | 106 | }, |
107 | - 'update' => function ($url, $model) { |
|
107 | + 'update' => function($url, $model) { |
|
108 | 108 | if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) { |
109 | 109 | return ''; |
110 | 110 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | 'data-pjax' => '0', |
115 | 115 | ]); |
116 | 116 | }, |
117 | - 'delete' => function ($url, $model) { |
|
117 | + 'delete' => function($url, $model) { |
|
118 | 118 | if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) { |
119 | 119 | return ''; |
120 | 120 | } |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | </div> |
137 | 137 | <?php $this->registerJs('jQuery(document).on("click", ".bulk-button", function(e){ |
138 | 138 | e.preventDefault(); |
139 | - if(confirm("' . Yii::t('writesdown', 'Are you sure?') . '")){ |
|
139 | + if(confirm("' . Yii::t('writesdown', 'Are you sure?').'")){ |
|
140 | 140 | var ids = $("#media-grid-view").yiiGridView("getSelectedRows"); |
141 | 141 | var action = $(this).closest(".form-group").find(".bulk-action").val(); |
142 | 142 | $.ajax({ |
143 | - url: "' . Url::to(['bulk-action']) . '", |
|
143 | + url: "' . Url::to(['bulk-action']).'", |
|
144 | 144 | data: { ids: ids, action: action, _csrf: yii.getCsrfToken() }, |
145 | 145 | type: "POST", |
146 | 146 | success: function(data){ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'columns' => [ |
73 | 73 | [ |
74 | 74 | 'class' => 'yii\grid\CheckboxColumn', |
75 | - 'checkboxOptions' => function ($model) { |
|
75 | + 'checkboxOptions' => function($model) { |
|
76 | 76 | /* @var $model \common\models\User */ |
77 | 77 | if ($model->checkPermission()) { |
78 | 78 | return ['value' => $model->id]; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'email:email', |
87 | 87 | [ |
88 | 88 | 'attribute' => 'role', |
89 | - 'value' => function ($model) { |
|
89 | + 'value' => function($model) { |
|
90 | 90 | return implode( |
91 | 91 | ', ', |
92 | 92 | ArrayHelper::getColumn(Yii::$app->authManager->getRolesByUser($model->id), 'name') |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ], |
96 | 96 | [ |
97 | 97 | 'attribute' => 'status', |
98 | - 'value' => function ($model) { |
|
98 | + 'value' => function($model) { |
|
99 | 99 | return $model->statustext; |
100 | 100 | }, |
101 | 101 | 'filter' => $searchModel->getStatuses(), |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | [ |
104 | 104 | 'class' => 'yii\grid\ActionColumn', |
105 | 105 | 'buttons' => [ |
106 | - 'update' => function ($url, $model) { |
|
106 | + 'update' => function($url, $model) { |
|
107 | 107 | /* @var $model \common\models\User */ |
108 | 108 | if ($model->checkPermission()) { |
109 | 109 | return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | return ''; |
116 | 116 | }, |
117 | - 'delete' => function ($url, $model) { |
|
117 | + 'delete' => function($url, $model) { |
|
118 | 118 | /* @var $model \common\models\User */ |
119 | 119 | if ($model->checkPermission()) { |
120 | 120 | return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | </div> |
138 | 138 | <?php $this->registerJs('jQuery(".bulk-button").click(function(e){ |
139 | 139 | e.preventDefault(); |
140 | - if(confirm("' . Yii::t("writesdown", "Are you sure?") . '")){ |
|
140 | + if(confirm("' . Yii::t("writesdown", "Are you sure?").'")){ |
|
141 | 141 | var ids = $("#user-grid-view").yiiGridView("getSelectedRows"); |
142 | 142 | var action = $(this).parents(".form-group").find(".bulk-action").val(); |
143 | 143 | $.ajax({ |
144 | - url: "' . Url::to(['bulk-action']) . '", |
|
144 | + url: "' . Url::to(['bulk-action']).'", |
|
145 | 145 | data: { ids: ids, action: action, _csrf: yii.getCsrfToken() }, |
146 | 146 | type:"POST", |
147 | 147 | success: function(response){ |
@@ -152,11 +152,11 @@ discard block |
||
152 | 152 | }); |
153 | 153 | jQuery(".role-button").click(function(e){ |
154 | 154 | e.preventDefault(); |
155 | - if(confirm("' . Yii::t("writesdown", "Are you sure?") . '")){ |
|
155 | + if(confirm("' . Yii::t("writesdown", "Are you sure?").'")){ |
|
156 | 156 | var ids = $("#user-grid-view").yiiGridView("getSelectedRows"); |
157 | 157 | var role = $(this).parents(".form-group").find(".bulk-role").val(); |
158 | 158 | $.ajax({ |
159 | - url: "' . Url::to(['bulk-action']) . '", |
|
159 | + url: "' . Url::to(['bulk-action']).'", |
|
160 | 160 | data: { ids: ids, action: "changerole", role: role, _csrf: yii.getCsrfToken() }, |
161 | 161 | type:"POST", |
162 | 162 | success: function(response){ |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function init() |
43 | 43 | { |
44 | 44 | if (empty($this->buttonContent)) { |
45 | - $this->buttonContent = '<i class="fa fa-folder-open"></i> ' . Yii::t('writesdown', 'Open Media'); |
|
45 | + $this->buttonContent = '<i class="fa fa-folder-open"></i> '.Yii::t('writesdown', 'Open Media'); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | if ($this->buttonTag == 'button') { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $callbackValue = ArrayHelper::remove($this->callback, 'value'); |
78 | 78 | |
79 | 79 | if ($callbackName) { |
80 | - $view->registerJs('var ' . $callbackName . ' = ' . $callbackValue, $view::POS_END); |
|
80 | + $view->registerJs('var '.$callbackName.' = '.$callbackValue, $view::POS_END); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | $settings['title'] = $this->title; |
@@ -90,6 +90,6 @@ discard block |
||
90 | 90 | 'callback' => $callbackName, |
91 | 91 | ]); |
92 | 92 | $settings = Json::htmlEncode($settings); |
93 | - $view->registerJs('$("#' . $this->id . '").mediamodal(' . $settings . ')'); |
|
93 | + $view->registerJs('$("#'.$this->id.'").mediamodal('.$settings.')'); |
|
94 | 94 | } |
95 | 95 | } |
@@ -2,10 +2,10 @@ discard block |
||
2 | 2 | use yii\web\Request; |
3 | 3 | |
4 | 4 | $params = array_merge( |
5 | - require(__DIR__ . '/../../common/config/params.php'), |
|
6 | - require(__DIR__ . '/../../common/config/params-local.php'), |
|
7 | - require(__DIR__ . '/params.php'), |
|
8 | - require(__DIR__ . '/params-local.php') |
|
5 | + require(__DIR__.'/../../common/config/params.php'), |
|
6 | + require(__DIR__.'/../../common/config/params-local.php'), |
|
7 | + require(__DIR__.'/params.php'), |
|
8 | + require(__DIR__.'/params-local.php') |
|
9 | 9 | ); |
10 | 10 | |
11 | 11 | $baseUrlFront = str_replace('/admin', '', (new Request())->getBaseUrl()); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | ], |
46 | 46 | 'urlManagerFront' => [ |
47 | 47 | 'class' => 'yii\web\urlManager', |
48 | - 'scriptUrl' => $baseUrlFront . '/index.php', |
|
48 | + 'scriptUrl' => $baseUrlFront.'/index.php', |
|
49 | 49 | 'baseUrl' => $baseUrlFront, |
50 | 50 | ], |
51 | 51 | 'urlManagerBack' => [ |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | public function init() |
32 | 32 | { |
33 | 33 | $theme = Option::get('theme'); |
34 | - $searchForm = Yii::getAlias('@themes/' . $theme . '/layouts/search-form.php'); |
|
34 | + $searchForm = Yii::getAlias('@themes/'.$theme.'/layouts/search-form.php'); |
|
35 | 35 | |
36 | 36 | if (is_file($searchForm)) { |
37 | 37 | $this->_searchForm = $searchForm; |
38 | 38 | } else { |
39 | - $this->_searchForm = __DIR__ . '/views/search-form.php'; |
|
39 | + $this->_searchForm = __DIR__.'/views/search-form.php'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | parent::init(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | echo $this->beforeWidget; |
51 | 51 | |
52 | 52 | if ($this->title) { |
53 | - echo $this->beforeTitle . $this->title . $this->afterTitle; |
|
53 | + echo $this->beforeTitle.$this->title.$this->afterTitle; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | echo Yii::$app->view->renderFile($this->_searchForm); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | <?= Html::hiddenInput('Widget[config][class]', $config['class']) ?> |
17 | 17 | |
18 | 18 | <div class="form-group"> |
19 | - <?= Html::label('Title', 'title-' . $widget->id, ['class' => 'form-label']) ?> |
|
19 | + <?= Html::label('Title', 'title-'.$widget->id, ['class' => 'form-label']) ?> |
|
20 | 20 | |
21 | 21 | <?= Html::textInput( |
22 | 22 | 'Widget[config][title]', |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | </div> |
28 | 28 | <div class="form-group"> |
29 | - <?= Html::label('Title', 'text-' . $widget->id, ['class' => 'form-label']) ?> |
|
29 | + <?= Html::label('Title', 'text-'.$widget->id, ['class' => 'form-label']) ?> |
|
30 | 30 | |
31 | 31 | <?= Html::textarea('Widget[config][text]', $config['text'], [ |
32 | - 'id' => 'text-' . $widget->id, |
|
32 | + 'id' => 'text-'.$widget->id, |
|
33 | 33 | 'class' => 'form-control', |
34 | 34 | 'rows' => '5', |
35 | 35 | ]) ?> |
@@ -31,7 +31,7 @@ |
||
31 | 31 | echo $this->beforeWidget; |
32 | 32 | |
33 | 33 | if ($this->title) { |
34 | - echo $this->beforeTitle . $this->title . $this->afterTitle; |
|
34 | + echo $this->beforeTitle.$this->title.$this->afterTitle; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | echo Html::tag('div', $this->text, [ |