Commit 6f63eee1e4a8d4694f779dc0529553fba512f0aa

Authored by Yarik
1 parent 43abf64e

test

frontend/views/layouts/admin.php
1 1 <?php
2 2  
3   -use yii\widgets\Breadcrumbs;
  3 + use yii\base\View;
  4 + use yii\widgets\Breadcrumbs;
4 5 use yii\widgets\Menu;
5 6  
6 7 \frontend\assets\AdminAsset::register($this);
7   -/* @var $content string */
  8 + /**
  9 + * @var string $content
  10 + * @var View $this
  11 + */
8 12 $this->beginContent('@app/views/layouts/main.php');
9 13 ?>
10   -
11 14 <div class="section-box admin-page">
12 15 <div class="box-wr">
13 16 <div class="box-all">
... ... @@ -48,28 +51,34 @@ $this-&gt;beginContent(&#39;@app/views/layouts/main.php&#39;);
48 51 [
49 52 'label' => 'Команда',
50 53 'url' => ['accounts/team'],
  54 + 'active' => preg_match('/^team.*$/', $this->context->action->id)?true:false,
51 55 ],
52 56  
53 57 [
54 58 'label' => 'Вакансии',
55 59 'url' => ['accounts/vacancy'],
  60 + 'active' => preg_match('/^vacancy.*$/', $this->context->action->id)?true:false,
56 61 ],
57 62 [
58 63 'label' => 'Ваши проекты',
59 64 'url' => ['accounts/projects'],
  65 + 'active' => preg_match('/^projects.*$/', $this->context->action->id)?true:false,
60 66 ],
61 67 [
62 68 'label' => 'Портфолио',
63 69 'url' => ['accounts/portfolio'],
  70 + 'active' => preg_match('/^portfolio.*$/', $this->context->action->id)?true:false,
64 71 ],
65 72  
66 73 [
67 74 'label' => 'Блог',
68 75 'url' => ['accounts/blog'],
  76 + 'active' => preg_match('/^blog.*$/', $this->context->action->id)?true:false,
69 77 ],
70 78 [
71 79 'label' => 'Галерея Изображения',
72 80 'url' => ['accounts/gallery'],
  81 + 'active' => preg_match('/^gallery(?!-video).*$/', $this->context->action->id)?true:false,
73 82 ],
74 83 [
75 84 'label' => 'Галерея Видео',
... ...
frontend/web/js/fieldWidget.js
1 1 $(function(){
2   -
  2 + $.each($('.delete-field-item'), function(index, value) {
  3 + var container = $(value).parents('.field_list').first();
  4 + var count = $(container).find('.form-group').length;
  5 + if(count <= 1) {
  6 + $(container).find('.delete-field-item').addClass('hidden');
  7 + }
  8 + });
3 9 $(document).on('click', '.delete-field-item', function(){
4 10 var container = $(this).parents('.field_list').first();
5 11 $(this).parent('.form-group').remove();
... ...