/**
  * Add commands that edit the picture.
  * @param PICTURE $entry
  * @access private
  */
 protected function _add_editors($entry)
 {
     parent::_add_editors($entry);
     $last_page = urlencode($this->env->url(Url_part_all));
     $cmd = $this->make_command();
     $cmd->id = 'make_key_photo';
     $cmd->caption = 'Make Key Photo';
     $cmd->link = "make_key_photo.php?id={$entry->id}&last_page={$last_page}";
     $cmd->icon = '{icons}buttons/password';
     $cmd->executable = $this->login->is_allowed(Privilege_set_folder, Privilege_modify, $entry->parent_folder());
     $cmd->importance = Command_importance_high;
     $this->append($cmd);
 }
 /** @param RECIPE &$entry Configure commands for this object. */
 function RECIPE_COMMANDS(&$entry)
 {
     ENTRY_COMMANDS::ENTRY_COMMANDS($entry);
     $cmd =& $this->command_at('edit');
     $cmd->link = "edit_recipe.php?id={$entry->id}";
     $cmd =& $this->command_at('delete');
     $cmd->link = "delete_recipe.php?id={$entry->id}";
     $cmd =& $this->command_at('purge');
     $cmd->link = "purge_recipe.php?id={$entry->id}";
     $cmd =& $this->command_at('clone');
     $cmd->link = "clone_recipe.php?id={$entry->id}";
     $cmd =& $this->command_at('send');
     $cmd->link = "send_recipe.php?id={$entry->id}";
 }
 /**
  * @param JOURNAL $entry Configure commands for this journal entry.
  */
 public function __construct($entry)
 {
     parent::__construct($entry);
     $cmd = $this->command_at('edit');
     $cmd->link = "edit_journal.php?id={$entry->id}";
     $cmd = $this->command_at('delete');
     $cmd->link = "delete_journal.php?id={$entry->id}";
     $cmd = $this->command_at('purge');
     $cmd->link = "purge_journal.php?id={$entry->id}";
     $cmd = $this->command_at('clone');
     $cmd->link = "clone_journal.php?id={$entry->id}";
     $cmd = $this->command_at('send');
     $cmd->link = "send_journal.php?id={$entry->id}";
 }
 /**
  * Add commands that edit the entry.
  * @param ENTRY $entry
  * @access private
  */
 protected function _add_editors($entry)
 {
     $last_page = urlencode($this->env->url(Url_part_all));
     parent::_add_editors($entry);
     $cmd = $this->make_command();
     $cmd->id = 'publish';
     $cmd->caption = 'Publish';
     $cmd->link = "set_published.php?id={$entry->id}&last_page={$last_page}";
     $cmd->icon = '{icons}buttons/ship';
     $cmd->executable = $this->login->is_allowed(Privilege_set_entry, Privilege_modify, $entry) && $entry->unpublished();
     $cmd->importance = Command_importance_high;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'abandon';
     $cmd->caption = 'Abandon';
     $cmd->link = "set_abandoned.php?id={$entry->id}&last_page={$last_page}";
     $cmd->icon = '{icons}buttons/abandon';
     $cmd->executable = !$entry->abandoned() && $this->login->is_allowed(Privilege_set_entry, Privilege_modify, $entry) && $entry->unpublished();
     $cmd->importance = Command_importance_default;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'queue';
     $cmd->caption = 'Queue';
     $cmd->link = "set_queued.php?id={$entry->id}&last_page={$last_page}";
     $cmd->icon = '{icons}buttons/queue';
     $cmd->executable = !$entry->queued() && $this->login->is_allowed(Privilege_set_entry, Privilege_modify, $entry) && $entry->unpublished();
     $cmd->importance = Command_importance_default;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'unpublish';
     $cmd->caption = 'Unpublish';
     $cmd->link = "set_draft.php?id={$entry->id}&last_page={$last_page}";
     $cmd->icon = '{icons}buttons/unpublish';
     $cmd->executable = $this->login->is_allowed(Privilege_set_entry, Privilege_modify, $entry) && $entry->visible();
     $cmd->importance = Command_importance_default;
     $this->append($cmd);
 }
 /**
  * Add commands that attach objects to the entry.
  * @param JOB $entry
  * @param PROJECT $folder Entry is in this folder (also available as $entry-
  * >parent_folder ()).
  * @param USER $creator Folder belongs to this user (also available as $folder->creator ()).
  * @access private
  */
 protected function _add_creators($entry)
 {
     parent::_add_creators($entry);
     $folder_id = $entry->parent_folder_id();
     $cmd = $this->make_command();
     $cmd->id = 'new_change';
     $cmd->caption = 'Add change';
     $cmd->link = "create_change.php?id={$folder_id}&job_id={$entry->id}";
     $cmd->icon = '{app_icons}buttons/new_change';
     $cmd->executable = $this->login->is_allowed(Privilege_set_entry, Privilege_create, $entry);
     $this->append($cmd);
 }