[MKDoc-commit] Added template from this patch from sam:

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Wed Oct 20 15:22:42 BST 2004


Log Message:
-----------
Added template from this patch from sam:
http://lists.webarch.co.uk/pipermail/mkdoc-dev/2004-October/000097.html

Tags:
----
mkdoc-1-6

Added Files:
-----------
    mkd/templates/editor/timerange:
        en.html

-------------- next part --------------
--- /dev/null
+++ templates/editor/timerange/en.html
@@ -0,0 +1,489 @@
+<!--?
+
+
+This template is used for the editor interface of a 
+timerange component. 
+  
+?-->
+<fieldset
+  class="timerange-component"
+  xmlns:petal="http://purl.org/petal/1.0/"
+  petal:define="name_move_up       string:${self/block_name}_up;
+                name_move_down     string:${self/block_name}_down;
+                name_delete        string:${self/block_name}_delete;
+                name_title         string:${self/block_name}_title;
+                name_from_month    string:${self/block_name}_from_month;
+                name_from_day      string:${self/block_name}_from_day;
+                name_from_year     string:${self/block_name}_from_year;
+                name_from_hour     string:${self/block_name}_from_hour;
+                name_from_minute   string:${self/block_name}_from_minute;
+                name_from_tz       string:${self/block_name}_from_tz;
+                name_to_month      string:${self/block_name}_to_month;
+                name_to_day        string:${self/block_name}_to_day;
+                name_to_year       string:${self/block_name}_to_year;
+                name_to_hour       string:${self/block_name}_to_hour;
+                name_to_minute     string:${self/block_name}_to_minute;
+                name_to_tz         string:${self/block_name}_to_tz;
+                name_Document_TimeRange_ID string:${self/block_name}_Document_TimeRange_ID;
+                align              self/align;
+                align_opposite     self/align_opposite;
+                dir                self/direction"
+>
+
+  <input
+    type="hidden"
+    name="block_name"
+    id="block_name"
+    value="block_name"
+    petal:attributes="name block_name; id block_name; value block_name"
+  />
+
+  <legend
+    xml:lang="en"
+    lang="en"
+    dir="ltr"
+  >Time-Range component</legend>
+
+  <div
+    petal:condition="self/has_errors"
+    petal:repeat="error self/errors"
+  >
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/title_empty"
+    >The 'Title' field is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_month_empty"
+    >The 'Month' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_day_empty"
+    >The 'Day' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_year_empty"
+    >The 'Year' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_hour_empty"
+    >The 'Hour' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_minute_empty"
+    >The 'Minute' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_tz_empty"
+    >The 'Timezone' field of the Start Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_month_empty"
+    >The 'Month' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_day_empty"
+    >The 'Day' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_year_empty"
+    >The 'Year' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_hour_empty"
+    >The 'Hour' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_minute_empty"
+    >The 'Minute' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_tz_empty"
+    >The 'Timezone' field of the End Date is empty.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/to_invalid"
+    >The End Date is not a valid date.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/from_invalid"
+    >The Start Date is not a valid date.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/dates_equal"
+    >The Start Date and End Date are the same.</p>
+    <p
+      xml:lang="en" lang="en" dir="ltr" class="error"
+      petal:condition="error/is --component/timerange/dates_reversed"
+    >The Start Date occurs after the End Date.</p>
+  </div>
+
+    <p
+      class="up"
+    >
+      <label
+        for="timerange_up"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="for name_move_up"
+      >
+        Move component
+      </label>
+      <input
+        type="submit"
+        name="timerange_up"
+        id="timerange_up"
+        value="Up"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        title="Move this component up."
+        petal:attributes="name name_move_up; id name_move_up"
+      />
+    </p>
+
+    <p>
+
+      <em
+        class="help"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+      >
+        The title of this time range.  For example "Opening Performance".
+      </em>
+      <label
+        for="timerange_title"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="for name_title"
+      >Title</label>
+      <br />
+      <input
+        type="text"
+        name="timerange_title"
+        id="timerange_title"
+        class="input-text"
+        value="TimeRange Title"
+        size="35"
+        title="Enter the Title of the time-range here."
+        petal:attributes="name name_title; id name_title; value self/title"
+      />
+    </p>
+
+    <p>
+      <em
+        class="help"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+      >
+        The start of this time range.
+      </em>
+      <label
+        for="timerange_from_date"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="for name_from_date"
+      >Start Date</label>
+      <br />
+      
+      <select 
+        id="timerange_from_month"
+        name="timerange_from_month"
+        title="Select the start month."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_month; id name_from_month"
+      >
+        <option value="">Month</option>
+        <option 
+          petal:repeat="month self/month_select string:from"
+          petal:attributes="selected month/is_selected;
+                            value    month/value;
+                            title    month/label"
+          petal:content="month/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_from_day"
+        name="timerange_from_day"
+        title="Select the start day."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_day; id name_from_day"
+      >
+        <option value="">Day</option>
+        <option 
+          petal:repeat="day self/day_select string:from"
+          petal:attributes="selected day/is_selected;
+                            value    day/value;
+                            title    day/label"
+          petal:content="day/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_from_year"
+        name="timerange_from_year"
+        title="Select the start year."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_year; id name_from_year"
+      >
+        <option value="">Year</option>
+        <option 
+          petal:repeat="year self/year_select string:from"
+          petal:attributes="selected year/is_selected;
+                            value    year/value;
+                            title    year/label"
+          petal:content="year/label"
+        ></option>
+      </select>
+
+      at 
+
+      <select 
+        id="timerange_from_hour"
+        name="timerange_from_hour"
+        title="Select the start hour."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_hour; id name_from_hour"
+      >
+        <option value="">Hour</option>
+        <option 
+          petal:repeat="hour self/hour_select string:from"
+          petal:attributes="selected hour/is_selected;
+                            value    hour/value;
+                            title    hour/label"
+          petal:content="hour/label"
+        ></option>
+      </select>
+
+      :
+      
+      <select 
+        id="timerange_from_minute"
+        name="timerange_from_minute"
+        title="Select the start minute."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_minute; id name_from_minute"
+      >
+        <option value="">Minute</option>
+        <option 
+          petal:repeat="minute self/minute_select string:from"
+          petal:attributes="selected minute/is_selected;
+                            value    minute/value;
+                            title    minute/label"
+          petal:content="minute/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_from_tz"
+        name="timerange_from_tz"
+        title="Select the start tz."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_from_tz; id name_from_tz"
+      >
+        <option 
+          petal:repeat="tz self/tz_select string:from"
+          petal:attributes="selected tz/is_selected;
+                            value    tz/value;
+                            title    tz/label"
+          petal:content="tz/label"
+        ></option>
+      </select>
+
+    </p>
+
+
+    <p>
+      <em
+        class="help"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+      >
+        The end of this time range.
+      </em>
+      <label
+        for="timerange_to_date"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="for name_to_date"
+      >End Date</label>
+      <br />
+      
+      <select 
+        id="timerange_to_month"
+        name="timerange_to_month"
+        title="Select the start month."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_month; id name_to_month"
+      >
+        <option value="">Month</option>
+        <option 
+          petal:repeat="month self/month_select string:to"
+          petal:attributes="selected month/is_selected;
+                            value    month/value;
+                            title    month/label"
+          petal:content="month/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_to_day"
+        name="timerange_to_day"
+        title="Select the start day."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_day; id name_to_day"
+      >
+        <option value="">Day</option>
+        <option 
+          petal:repeat="day self/day_select string:to"
+          petal:attributes="selected day/is_selected;
+                            value    day/value;
+                            title    day/label"
+          petal:content="day/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_to_year"
+        name="timerange_to_year"
+        title="Select the start year."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_year; id name_to_year"
+      >
+        <option value="">Year</option>
+        <option 
+          petal:repeat="year self/year_select string:to"
+          petal:attributes="selected year/is_selected;
+                            value    year/value;
+                            title    year/label"
+          petal:content="year/label"
+        ></option>
+      </select>
+
+      at 
+
+      <select 
+        id="timerange_to_hour"
+        name="timerange_to_hour"
+        title="Select the start hour."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_hour; id name_to_hour"
+      >
+        <option value="">Hour</option>
+        <option 
+          petal:repeat="hour self/hour_select string:to"
+          petal:attributes="selected hour/is_selected;
+                            value    hour/value;
+                            title    hour/label"
+          petal:content="hour/label"
+        ></option>
+      </select>
+
+      :
+      
+      <select 
+        id="timerange_to_minute"
+        name="timerange_to_minute"
+        title="Select the start minute."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_minute; id name_to_minute"
+      >
+        <option value="">Minute</option>
+        <option 
+          petal:repeat="minute self/minute_select string:to"
+          petal:attributes="selected minute/is_selected;
+                            value    minute/value;
+                            title    minute/label"
+          petal:content="minute/label"
+        ></option>
+      </select>
+
+      <select 
+        id="timerange_to_tz"
+        name="timerange_to_tz"
+        title="Select the start tz."
+        petal:attributes="name name_to_date; id name_to_date; value self/to_date"
+        petal:attributes="name name_to_tz; id name_to_tz"
+      >
+        <option 
+          petal:repeat="tz self/tz_select string:to"
+          petal:attributes="selected tz/is_selected;
+                            value    tz/value;
+                            title    tz/label"
+          petal:content="tz/label"
+        ></option>
+      </select>
+
+      <!-- hidden field to store database ID for Document_TimeRange.ID -->
+      <input
+        type="hidden"
+        petal:attributes="name name_Document_TimeRange_ID; id name_Document_TimeRange_ID; value self/Document_TimeRange_ID"
+      />
+
+    </p>
+
+    <p> 
+      <input
+        type="submit"
+        name="timerange_delete"
+        id="timerange_delete"
+        value="Delete Component"
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        title="Delete this component."
+        petal:attributes="name name_delete; id name_delete"
+      />
+      |
+      <a 
+        href="#" 
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="href string:${self/mkdoc_uri},copy"
+      >Copy to another document</a> 
+      |
+      <a 
+        href="#" 
+        xml:lang="en"
+        lang="en"
+        dir="ltr"
+        petal:attributes="href string:${self/mkdoc_uri},move"
+      >Move to another document</a>
+    </p>
+
+    <p
+      class="down"
+    >
+        <label
+          for="timerange_down"
+          xml:lang="en"
+          lang="en"
+          dir="ltr"
+          petal:attributes="for name_move_down"
+        >
+          Move component
+        </label>
+        <input
+          type="submit"
+          name="timerange_down"
+          id="timerange_down"
+          value="Down"
+          xml:lang="en"
+          lang="en"
+          dir="ltr"
+          title="Move this component down."
+          petal:attributes="name name_move_down; id name_move_down"
+        />
+      </p>
+
+</fieldset>
+


More information about the MKDoc-commit mailing list