From d1d0bce43320bfcca607683c798bd149be4ad507 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 12 May 2014 13:18:42 -0500
Subject: [PATCH] tips: Add tips for site pages

---
 .../en_US/help/tips/manage.addnew_page.yaml   | 34 -------------------
 .../i18n/en_US/help/tips/manage.pages.yaml    | 22 ++++++------
 include/staff/page.inc.php                    | 11 ++++--
 scp/pages.php                                 |  1 -
 4 files changed, 18 insertions(+), 50 deletions(-)
 delete mode 100644 include/i18n/en_US/help/tips/manage.addnew_page.yaml

diff --git a/include/i18n/en_US/help/tips/manage.addnew_page.yaml b/include/i18n/en_US/help/tips/manage.addnew_page.yaml
deleted file mode 100644
index 245496351..000000000
--- a/include/i18n/en_US/help/tips/manage.addnew_page.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# This is popup help messages for the Admin Panel -> Manage -> Add New Page
-#
-# Fields:
-# title - Shown in bold at the top of the popover window
-# content - The body of the help popover
-# links - List of links shows below the content
-#   title - Link title
-#   href - href of link (links starting with / are translated to the
-#       helpdesk installation path)
-#
-# The key names such as 'helpdesk_name' should not be translated as they
-# must match the HTML #ids put into the page template.
-#
----
-page_information:
-    title: Page Information
-    content: >
-
-name:
-    title: Name
-    content: >
-
-type:
-    title: Type
-    content: >
-
-status:
-    title: Status
-    content: >
-
-page_body:
-    title: Page Body
-    content: >
diff --git a/include/i18n/en_US/help/tips/manage.pages.yaml b/include/i18n/en_US/help/tips/manage.pages.yaml
index 3a21cb377..b55718ad1 100644
--- a/include/i18n/en_US/help/tips/manage.pages.yaml
+++ b/include/i18n/en_US/help/tips/manage.pages.yaml
@@ -13,22 +13,20 @@
 # must match the HTML #ids put into the page template.
 #
 ---
-add_new_page:
-    title: Add New Page
-    content: >
-
 site_pages:
     title: Site Pages
     content: >
-
-name:
-    title: Name
-    content: >
+        Site pages can serve as a mini Content Management System (CMS). You
+        can define multiple landing, offline, and thank-you pages and
+        configure them in the company settings and help topics.
 
 type:
     title: Type
     content: >
-
-status:
-    title: Status
-    content: >
+        <span class="doc-desc-opt">Offline</span> pages are displayed on the
+        client portal if your help desk is disabled. <span
+        class="doc-desc-opt">Landing</span> pages are displayed on the home
+        page of your client portal. <span class="doc-desc-opt">Thank
+        You</span> pages are displayed after a user submits a ticket. <span
+        class="doc-desc-opt">Other</span> pages can be used as a simple
+        content management system (CMS).
diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php
index 4cbe67ce8..e4304c38b 100644
--- a/include/staff/page.inc.php
+++ b/include/staff/page.inc.php
@@ -31,7 +31,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
  <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
- <h2>Site Pages</h2>
+ <h2>Site Pages
+    <i class="help-tip icon-question-sign" href="#site_pages"></i>
+    </h2>
  <table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2">
     <thead>
         <tr><td></td><td></td></tr> <!-- For fixed table layout -->
@@ -57,8 +59,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                 Type:
             </td>
             <td>
+                <span>
                 <select name="type">
-                    <option value="" selected="selected">Select Page Type</option>
+                    <option value="" selected="selected">&mdash; Select Page Type &mdash;</option>
                     <?php
                     foreach($pageTypes as $k => $v)
                         echo sprintf('<option value="%s" %s>%s</option>',
@@ -66,6 +69,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                     ?>
                 </select>
                 &nbsp;<span class="error">*&nbsp;<?php echo $errors['type']; ?></span>
+                &nbsp;<i class="help-tip icon-question-sign" href="#type"></i>
+                </span>
             </td>
         </tr>
         <?php if ($info['name'] && $info['type'] == 'other') { ?>
@@ -103,7 +108,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         </tr>
         <tr>
             <th colspan="2">
-                <em><strong>Admin Notes</strong>: Internal notes.&nbsp;<i class="help-tip icon-question-sign" href="#admin_notes"></i></em>
+                <em><strong>Admin Notes</strong>: Internal notes.&nbsp;</em>
             </th>
         </tr>
         <tr>
diff --git a/scp/pages.php b/scp/pages.php
index 91bd91733..5f3747b5e 100644
--- a/scp/pages.php
+++ b/scp/pages.php
@@ -117,7 +117,6 @@ $inc='pages.inc.php';
 $tip_namespace = 'manage.pages';
 if($page || $_REQUEST['a']=='add') {
     $inc='page.inc.php';
-    $tip_namespace = 'manage.addnew_page';
 }
 
 $nav->setTabActive('manage');
-- 
GitLab