Skip to content

Commit

Permalink
support for nolabel entities. webgallery
Browse files Browse the repository at this point in the history
  • Loading branch information
Praesidiarius committed Mar 8, 2020
1 parent 038b4b3 commit 64eabf9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion module/Application/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
],
'uppy-togglepub' => [
'type' => Literal::class,
'type' => Segment::class,
'options' => [
'route' => '/uppy/togglemediapub[/:id]',
'constraints' => [
Expand Down
2 changes: 1 addition & 1 deletion module/Application/data/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INSERT INTO `permission` (`permission_key`, `module`, `label`, `nav_label`, `nav
('themes', 'Application\\Controller\\IndexController', 'Theme Selection', '', '/application/themes', 0, 0),
('filepond', 'Application\\Controller\\UploadController', 'Upload Featured Image', '', '', 0, 0),
('uppy', 'Application\\Controller\\UploadController', 'Gallery Upload', '', '', 0, 0),
('togglemediapub', 'Application\\Controller\\UploadController', 'Gallery Upload', '', '', 0, 0),
('togglemediapub', 'Application\\Controller\\UploadController', 'Gallery Sorting', '', '', 0, 0),
('updateuppysort', 'Application\\Controller\\UploadController', 'Gallery Upload', '', '', 0, 0),
('quicksearch', 'Application\\Controller\\IndexController', 'Quick Search', '', '', 0, 0),
('updatefieldsort', 'Application\\Controller\\IndexController', 'Update Form Field Sorting', '', '', 0, 0),
Expand Down
2 changes: 1 addition & 1 deletion module/Application/src/Controller/UploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function togglemediapubAction() {
$bPublic = ($oMedia->is_public == 1) ? 0 : 1;
$oGalleryTbl->update(['is_public'=>$bPublic],'Media_ID = '.$iMediaID);

return $this->redirect()->toRoute($oMedia->entity_type,['action'=>'view','id'=>$oMedia->entity_idfs]);
return $this->redirect()->toRoute($oMedia->entity_type,['action'=>'edit','id'=>$oMedia->entity_idfs]);

}
}
Expand Down
2 changes: 1 addition & 1 deletion module/Application/view/partial/webgallery-edit.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $aImages = CoreController::$aCoreTables['core-gallery-media']->selectWith($oImgS
</div>
<div class="col-md-2">
<?=($oImg->is_public == 1) ? '<i class="fas fa-eye"></i> '.$this->translate('Is showed') : '<i class="fas fa-eye-slash"></i> '.$this->translate('Not showed')?>
<br/><?=($oImg->is_public == 1) ? '<a class="btn btn-dark" href="/uppy/togglemediapub/'.$oImg->Media_ID.'">'.$this->translate('Hide').'</a>' : '<a class="btn btn-dark" href="/application/togglemediapub/'.$oImg->Media_ID.'">'.$this->translate('Show').'</a>'?>
<br/><?=($oImg->is_public == 1) ? '<a class="btn btn-dark" href="/uppy/togglemediapub/'.$oImg->Media_ID.'">'.$this->translate('Hide').'</a>' : '<a class="btn btn-dark" href="/uppy/togglemediapub/'.$oImg->Media_ID.'">'.$this->translate('Show').'</a>'?>
</div>
</div>
</li>
Expand Down

0 comments on commit 64eabf9

Please sign in to comment.