Skip to content

Commit

Permalink
festival: Show some commands to non-logged-in users too
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijskooijman committed Sep 1, 2020
1 parent a775672 commit aa7af48
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions system/datatypes/festival.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,17 @@ public static function getDatatypeName() {
public function process(HyphaRequest $request) {
$this->html->writeToElement('pagename', showPagename($this->pagename) . ' ' . asterisk($this->privateFlag));

$commands = $this->html->find('#pageCommands');
$commands->append($this->makeActionButton(__('about'), self::PATH_ABOUT));
$commands->append($this->makeActionButton(__('festival-signup'), self::PATH_SIGNUP));
$commands->append($this->makeActionButton(__('festival-lineup'), self::PATH_LINEUP));
$commands->append($this->makeActionButton(__('festival-timetable'), self::PATH_TIMETABLE));

if (isUser() && !in_array($request->getView(), [self::PATH_SETTINGS])) {
$commands = $this->html->find('#pageCommands');
$commands->append($this->makeActionButton(__('about'), self::PATH_ABOUT));
$commands->append($this->makeActionButton(__('settings'), self::PATH_SETTINGS));
$commands->append($this->makeActionButton(__('festival-signup'), self::PATH_SIGNUP));
$commands->append($this->makeActionButton(__('festival-contribute'), self::PATH_CONTRIBUTE));
$commands->append($this->makeActionButton(__('festival-participants'), self::PATH_PARTICIPANTS));
$commands->append($this->makeActionButton(__('festival-contributions'), self::PATH_CONTRIBUTIONS));
$commands->append($this->makeActionButton(__('festival-lineup'), self::PATH_LINEUP));
$commands->append($this->makeActionButton(__('festival-timetable'), self::PATH_TIMETABLE));

if (isAdmin()) {
$action = 'if(confirm(\'' . __('sure-to-delete') . '\'))' . makeAction($this->language . '/' . $this->pagename, 'delete', '');
Expand Down

0 comments on commit aa7af48

Please sign in to comment.