Merge branch 'dev' into binarity.cz

This commit is contained in:
Michal Kváček
2016-10-02 14:49:13 +02:00
2 changed files with 7 additions and 11 deletions
+5 -10
View File
@@ -45,9 +45,9 @@ class SetTemplate extends Command
$info = json_decode($current->module_settings);
$this->line('Template is already installed. Currently using template ' . trans($current->name) . ' located in /templates/' . $info->staticName . '.');
$confirm = $this->ask('Uninstall it and install *' . trans($config['name']) . '*? All data associated with installed template will be lost! [y/n]');
$confirm = $this->confirm('Uninstall it and install *' . trans($config['name']) . '*? All data associated with installed template will be lost!');
if ($confirm === 'y') {
if ($confirm) {
$this->line('Uninstalling ' . $current->name . '.');
$current->uninstall();
} else {
@@ -66,13 +66,8 @@ class SetTemplate extends Command
// theme written
$this->line('Template successfully set up.');
if ($publish) {
$this->line('');
$this->line(' ** PUBLISHING ASSETS AND VIEWS **');
// publish assets and views for module and theme
$this->call('vendor:publish');
$this->call('vendor:publish', ['--tag' => ['public-assets'], '--force' => true]);
$this->call('vendor:publish', ['--tag' => ['module-views'], '--force' => true]);
}
// run again artisan for publishing resources
// it cannot be done using $this->call, because we need to load different template into service providers
exec('php artisan vendor:publish');
}
}
+1
View File
@@ -93,6 +93,7 @@ class Module extends Model
// delete everything in /resources/views/visitor
if ($this->is_template) {
$this->deleteDirectory(resource_path('views/visitor'));
$this->deleteDirectory(resource_path('views/modules'));
$this->deleteDirectory(public_path('assets'));
// delete all template paths