-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
6,076 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class AddEntityTranslations extends AbstractMigration | ||
{ | ||
|
||
public function up() | ||
{ | ||
$this->table('translations') | ||
->addColumn('translatable_type', 'string', ['null' => false]) //form, attribute,stage,category | ||
->addColumn('translatable_id', 'integer') | ||
->addColumn('translated_key', 'string', ['null' => false]) //name, title, keys | ||
->addColumn('translation', 'string', ['null' => false]) //name, title, keys | ||
->addColumn('language', 'string', ['null' => false]) //name, title, keys | ||
->addTimestamps() | ||
->create(); | ||
} | ||
public function down() | ||
{ | ||
$this->dropTable('translations'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class AddLanguageToSurvey extends AbstractMigration | ||
{ | ||
|
||
public function up() | ||
{ | ||
$result = $this->fetchRow( | ||
"SELECT config_value FROM config WHERE group_name='site' and config_key='language' " | ||
); | ||
// get two letter lang code | ||
$language = str_before(json_decode($result['config_value']), '-'); | ||
$this->table('forms') | ||
->addColumn('base_language', 'string', ['null' => false, 'default' => $language]) //es/en | ||
->update(); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->table('forms')->removeColumn('base_language'); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
migrations/20200521014822_add_base_language_to_categories.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class AddBaseLanguageToCategories extends AbstractMigration | ||
{ | ||
public function up() | ||
{ | ||
|
||
$result = $this->fetchRow( | ||
"SELECT config_value FROM config WHERE group_name='site' and config_key='language' " | ||
); | ||
// get two letter lang code | ||
$language = str_before(json_decode($result['config_value']), '-'); | ||
$this->table('tags') | ||
->addColumn('base_language', 'string', ['null' => false, 'default' => $language]) //es/en | ||
->update(); | ||
} | ||
|
||
|
||
public function down() | ||
{ | ||
$this->table('tags')->removeColumn('base_language'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return array( | ||
'name' => 'Name', | ||
'disabled' => 'Disabled', | ||
'everyone_can_create' => 'Who can add to this survey?', | ||
'hide_author' => 'Hide author', | ||
'hide_location' => 'Hide location', | ||
'hide_time' => 'Hide time', | ||
'slug' => 'Slug', | ||
'tag' => 'Tag', | ||
'targeted_survey' => 'Targeted survey', | ||
'parent_id' => 'Parent category', | ||
'tasks.label' => 'Task label', | ||
'tasks.type' => 'Task type', | ||
'tasks.priority' => 'Priority', | ||
'tasks.icon' => 'Icon', | ||
'tasks.fields.label' => 'Field label', | ||
'tasks.fields.key' => 'Field key', | ||
'tasks.fields.input' => 'Field input type', | ||
'tasks.fields.type' => 'Field type', | ||
'tasks.fields.priority' => 'Field priority', | ||
'tasks.fields.cardinality' => 'Field cardinality', | ||
'tasks.fields.response_private' => 'Should responses be private?', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
return array( | ||
'name' => 'Nombre', | ||
'disabled' => 'Deshabilitado', | ||
'everyone_can_create' => 'Quién puede agregar a esta encuesta?', | ||
'hide_author' => 'Ocultar autor', | ||
'hide_location' => 'Ocultar ubicación', | ||
'hide_time' => 'Ocultar horario', | ||
'slug' => 'Slug', | ||
'tag' => 'Categoria', | ||
'targeted_survey' => 'Encuesta guiada', | ||
'parent_id' => 'Categoría padre', | ||
'tasks.label' => 'Etiqueta de tarea', | ||
'tasks.type' => 'Tipo de tarea', | ||
'tasks.priority' => 'Prioridad de tarea', | ||
'tasks.icon' => 'Icono de tarea', | ||
'tasks.fields.label' => 'Etiqueta de campo', | ||
'tasks.fields.key' => 'Clave de campo', | ||
'tasks.fields.input' => 'Tipo de campo de entrada', | ||
'tasks.fields.type' => 'Tipo de campo', | ||
'tasks.fields.priority' => 'Prioridad de campo', | ||
'tasks.fields.cardinality' => 'Cardinalidad de campo', | ||
'tasks.fields.response_private' => 'Deberian las respuestas ser privadas?', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
trait AclTrait | ||
{ | ||
protected $acl; | ||
public $acl; | ||
|
||
public function setAcl(Acl $acl) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php /** @noinspection ALL */ | ||
|
||
namespace Tests\Integration\Bootstrap; | ||
|
||
|
Oops, something went wrong.