Exemplo n.º 1
0
 /**
  * Add commands that provide views on the entry.
  * @param ENTRY $entry
  * @access private
  */
 protected function _add_viewers($entry)
 {
     $folder_id = $entry->parent_folder_id();
     $cmd = $this->make_command();
     $cmd->id = 'print';
     $cmd->caption = 'Print';
     $cmd->link = "multiple_print.php?id={$folder_id}&entry_ids={$entry->id}";
     $cmd->icon = '{icons}buttons/print';
     $cmd->executable = true;
     $cmd->importance = Command_importance_high - Command_importance_increment;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'send';
     $cmd->caption = 'Send';
     $cmd->link = "send_entry.php?id={$entry->id}";
     $cmd->icon = '{icons}buttons/send';
     $cmd->executable = true;
     $cmd->importance = Command_importance_high - Command_importance_increment;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'plain_text';
     $cmd->caption = 'Plain text';
     $cmd->link = "view_entry_plain_text.php?id={$entry->id}";
     $cmd->icon = '{icons}indicators/text';
     $cmd->executable = true;
     $cmd->importance = Command_importance_high - Command_importance_increment * 2;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'source';
     $cmd->caption = 'Source';
     $cmd->link = "view_entry_source.php?id={$entry->id}";
     $cmd->icon = '{icons}buttons/source';
     $cmd->executable = true;
     $cmd->importance = Command_importance_high - Command_importance_increment * 2;
     $this->append($cmd);
     $cmd = $this->make_command();
     $cmd->id = 'history';
     $cmd->caption = 'History';
     $cmd->link = "view_entry_history.php?id={$entry->id}";
     $cmd->icon = '{icons}buttons/history';
     $cmd->executable = $this->login->is_allowed(Privilege_set_entry, Privilege_view_history, $entry);
     $cmd->importance = Command_importance_low;
     $this->append($cmd);
 }