From 5385a565f3a11169fd501e051eca16d7eb50749a Mon Sep 17 00:00:00 2001 From: Anastasia Date: Thu, 30 Aug 2018 12:25:34 +0300 Subject: [PATCH] lang link widget --- console/migrations/m180830_091730_alter_table_language.php | 40 ++++++++++++++++++++++++++++++++++++++++ frontend/views/layouts/main.php | 18 ++---------------- frontend/widgets/LangLinks.php | 15 ++++++++++----- frontend/widgets/views/links.php | 15 +++++++++++++++ frontend/widgets/views/links_mobile.php | 12 ++++++++++++ 5 files changed, 79 insertions(+), 21 deletions(-) create mode 100644 console/migrations/m180830_091730_alter_table_language.php create mode 100644 frontend/widgets/views/links.php create mode 100644 frontend/widgets/views/links_mobile.php diff --git a/console/migrations/m180830_091730_alter_table_language.php b/console/migrations/m180830_091730_alter_table_language.php new file mode 100644 index 0000000..56a6d86 --- /dev/null +++ b/console/migrations/m180830_091730_alter_table_language.php @@ -0,0 +1,40 @@ +addColumn('language', 'short', $this->string()); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropColumn('language', 'short'); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m180830_091730_alter_table_language cannot be reverted.\n"; + + return false; + } + */ +} diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 3791b66..303e71c 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -101,16 +101,7 @@
@@ -165,12 +156,7 @@