Преглед на файлове

Added some helpful instructions to the site admin

Stephen Ficklin преди 7 години
родител
ревизия
71de451950
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 12 0
      tripal_chado/includes/TripalFields/operation__phylotree_vis/operation__phylotree_vis_formatter.inc

+ 12 - 0
tripal_chado/includes/TripalFields/operation__phylotree_vis/operation__phylotree_vis_formatter.inc

@@ -12,7 +12,19 @@ class operation__phylotree_vis_formatter extends ChadoFieldFormatter {
    * @see TripalFieldFormatter::view()
    */
   public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
+    global $user;
     if (count($items) > 0) {
+
+      if (user_access('administrator')) {
+        $message = t('Site administrators:  You can customize the look of phylogenetic trees at the !menu page.',
+          array('!menu' => l('Phylogeny and Taxonomy', 'admin/tripal/storage/chado/phylogeny')));
+        $admin_message = tripal_set_message($message, TRIPAL_INFO, array('return_html' => TRUE));
+        $element[0]['admin_message'] = array(
+          '#type' => 'markup',
+          '#markup' => $admin_message,
+        );
+      }
+
       $phylotree = $entity->chado_record;
 
       $node = new stdClass();