示例#1
0
 /**
  * Shows the administration interface for IFrameRest
  *
  * @return string HTML code for the administration interface
  */
 public function getAdminUI($subclass_admin_interface = null, $title = null)
 {
     // Init values
     $html = '';
     $html .= "<ul class='admin_element_list'>\n";
     $html .= "<li class='admin_element_item_container'>\n";
     $html .= "<div class='admin_element_label'>" . _("Actual URL after substitution") . " : </div>\n";
     $html .= "<div class='admin_element_data'>\n";
     $html .= "<p>\n";
     $html .= _("The IFrameRest content type is meant to allow the result of REST-style queries to remote systems to be displayed in a IFrame.  To that end, The following strings will be replaced in the URL:");
     $html .= "</p>\n";
     $html .= "<table>\n";
     $html .= "<tr><td>{node_id}</td>\n";
     $html .= "<td>";
     $html .= _("Will be replaced by the urlencoded node_id of the node\n                    where the content is displayed, or an empty string if there is no\n                    current node</td></tr>");
     $html .= "<tr><td>{user_id}</td>\n";
     $html .= "<td>";
     $html .= _("Will be replaced by the user_id");
     $html .= "</td></tr>\n";
     $html .= "<tr><td>{user_last_viewed}</td>\n";
     $html .= "<td>";
     $html .= _("will be replaced by a ISO-8601 timestamp of the date the user was last shown this content, or an empty string if the user was never presented with this IFrame.");
     $html .= "</td></tr>\n";
     $html .= "</table>\n";
     $generated_url = $this->getGeneratedUrl();
     $html .= "<p>Example of your generated URL:</p>\n";
     $html .= "<a href='{$generated_url}'>{$generated_url}</a>";
     $html .= "</div>\n";
     $html .= "</li>\n";
     return parent::getAdminUI($html, $title);
 }