/** * Add buttons that create items in the folder. * @param ALBUM $folder * @access private */ protected function _add_creators($folder) { $cmd = $this->make_command(); $cmd->id = 'new_picture'; $cmd->caption = 'New picture'; if ($folder->is_organizational()) { $cmd->link = "select_folder.php?page_name=create_picture.php"; } else { $cmd->link = "create_picture.php?id={$folder->id}"; } $cmd->icon = '{app_icons}buttons/new_picture'; $cmd->executable = $folder->app->login->is_allowed(Privilege_set_entry, Privilege_create, $folder); $cmd->importance = Command_importance_high + Command_importance_increment; $this->append($cmd); $cmd = $this->make_command(); $cmd->id = 'new_journal'; $cmd->caption = 'New journal'; if ($folder->is_organizational()) { $cmd->link = "select_folder.php?page_name=create_journal.php"; } else { $cmd->link = "create_journal.php?id={$folder->id}"; } $cmd->link = "create_journal.php?id={$folder->id}"; $cmd->icon = '{app_icons}buttons/new_journal'; $cmd->executable = $folder->app->login->is_allowed(Privilege_set_entry, Privilege_create, $folder); $cmd->importance = Command_importance_high - Command_importance_increment; $this->append($cmd); $cmd = $this->make_command(); $cmd->id = 'upload_pictures'; $cmd->caption = 'Upload pictures'; if ($folder->is_organizational()) { $cmd->link = "select_folder.php?page_name=upload_pictures.php"; } else { $cmd->link = "upload_pictures.php?id={$folder->id}"; } $cmd->icon = '{icons}buttons/upload'; $cmd->executable = $folder->app->login->is_allowed(Privilege_set_entry, Privilege_create, $folder) && $folder->app->login->is_allowed(Privilege_set_entry, Privilege_upload, $folder) && $folder->uploads_allowed(); $cmd->importance = Command_importance_high + Command_importance_increment; $this->append($cmd); }
/** * Outputs the object as plain text. * @param ALBUM $obj * @access private */ protected function _display_as_plain_text($obj) { if (!$obj->is_organizational()) { $f = $obj->first_day->formatter(); $f->clear_flags(); echo $this->line($obj->format_date($obj->first_day, $f) . ' - ' . $obj->format_date($obj->last_day, $f)); } parent::_display_as_plain_text($obj); }