| | 97 | <!-- categories --> |
|---|
| | 98 | <xsl:variable name="category-showReferenced" select="/bedework/urlPrefixes/category/showReferenced/a/@href"/> |
|---|
| | 99 | <xsl:variable name="category-showModForm" select="/bedework/urlPrefixes/category/showModForm/a/@href"/> |
|---|
| | 100 | <xsl:variable name="category-showUpdateList" select="/bedework/urlPrefixes/category/showUpdateList/a/@href"/> |
|---|
| | 101 | <xsl:variable name="category-showDeleteConfirm" select="/bedework/urlPrefixes/category/showDeleteConfirm/a/@href"/> |
|---|
| | 102 | <xsl:variable name="category-initAdd" select="/bedework/urlPrefixes/category/initAdd/a/@href"/> |
|---|
| | 103 | <xsl:variable name="category-initUpdate" select="/bedework/urlPrefixes/category/initUpdate/a/@href"/> |
|---|
| | 104 | <xsl:variable name="category-delete" select="/bedework/urlPrefixes/category/delete/a/@href"/> |
|---|
| | 105 | <xsl:variable name="category-fetchForUpdate" select="/bedework/urlPrefixes/category/fetchForUpdate/a/@href"/> |
|---|
| | 106 | <xsl:variable name="category-update" select="/bedework/urlPrefixes/category/update/a/@href"/> |
|---|
| | 2715 | </xsl:template> |
|---|
| | 2716 | |
|---|
| | 2717 | <!--+++++++++++++++ Categories ++++++++++++++++++++--> |
|---|
| | 2718 | <xsl:template name="categoryList"> |
|---|
| | 2719 | <h2>Edit Categories</h2> |
|---|
| | 2720 | <p> |
|---|
| | 2721 | Select the category you would like to update: |
|---|
| | 2722 | <input type="button" name="return" value="Add new category" onclick="javascript:location.replace('{$category-initAdd}')"/> |
|---|
| | 2723 | </p> |
|---|
| | 2724 | |
|---|
| | 2725 | <table id="commonListTable"> |
|---|
| | 2726 | <tr> |
|---|
| | 2727 | <th>Keyword</th> |
|---|
| | 2728 | <th>Description</th> |
|---|
| | 2729 | </tr> |
|---|
| | 2730 | |
|---|
| | 2731 | <xsl:for-each select="/bedework/categories/category"> |
|---|
| | 2732 | <xsl:variable name="categoryKey" select="normalize-space(keyword)"/> |
|---|
| | 2733 | <tr> |
|---|
| | 2734 | <td> |
|---|
| | 2735 | <a href="{$category-fetchForUpdate}&categoryKey={$categoryKey}"> |
|---|
| | 2736 | <xsl:value-of select="keyword"/> |
|---|
| | 2737 | </a> |
|---|
| | 2738 | </td> |
|---|
| | 2739 | <td> |
|---|
| | 2740 | <xsl:value-of select="desc"/> |
|---|
| | 2741 | </td> |
|---|
| | 2742 | </tr> |
|---|
| | 2743 | </xsl:for-each> |
|---|
| | 2744 | </table> |
|---|
| | 2745 | </xsl:template> |
|---|
| | 2746 | |
|---|
| | 2747 | <xsl:template name="modCategory"> |
|---|
| | 2748 | <xsl:choose> |
|---|
| | 2749 | <xsl:when test="/bedework/creating='true'"> |
|---|
| | 2750 | <h2>Add Category</h2> |
|---|
| | 2751 | <form action="{$category-update}" method="post"> |
|---|
| | 2752 | <table id="eventFormTable"> |
|---|
| | 2753 | <tr> |
|---|
| | 2754 | <td class="fieldName"> |
|---|
| | 2755 | Keyword: |
|---|
| | 2756 | </td> |
|---|
| | 2757 | <td> |
|---|
| | 2758 | <input type="text" name="categoryWord.value" value="" size="40"/> |
|---|
| | 2759 | </td> |
|---|
| | 2760 | </tr> |
|---|
| | 2761 | <tr> |
|---|
| | 2762 | <td class="optional"> |
|---|
| | 2763 | Description: |
|---|
| | 2764 | </td> |
|---|
| | 2765 | <td> |
|---|
| | 2766 | <textarea name="categoryDesc.value" rows="3" cols="60"> |
|---|
| | 2767 | </textarea> |
|---|
| | 2768 | </td> |
|---|
| | 2769 | </tr> |
|---|
| | 2770 | </table> |
|---|
| | 2771 | <table border="0" id="submitTable"> |
|---|
| | 2772 | <tr> |
|---|
| | 2773 | <td> |
|---|
| | 2774 | <input type="submit" name="addCategory" value="Add Category"/> |
|---|
| | 2775 | <input type="submit" name="cancelled" value="Cancel"/> |
|---|
| | 2776 | <input type="reset" value="Clear"/> |
|---|
| | 2777 | </td> |
|---|
| | 2778 | </tr> |
|---|
| | 2779 | </table> |
|---|
| | 2780 | </form> |
|---|
| | 2781 | </xsl:when> |
|---|
| | 2782 | <xsl:otherwise> |
|---|
| | 2783 | <h2>Update Category</h2> |
|---|
| | 2784 | <form action="{$category-update}" method="post"> |
|---|
| | 2785 | <table id="eventFormTable"> |
|---|
| | 2786 | <tr> |
|---|
| | 2787 | <td class="fieldName"> |
|---|
| | 2788 | Keyword: |
|---|
| | 2789 | </td> |
|---|
| | 2790 | <td> |
|---|
| | 2791 | <xsl:variable name="keyword" select="normalize-space(/bedework/currentCategory/category/keyword)"/> |
|---|
| | 2792 | <input type="text" name="categoryWord.value" value="{$keyword}" size="40"/> |
|---|
| | 2793 | </td> |
|---|
| | 2794 | </tr> |
|---|
| | 2795 | <tr> |
|---|
| | 2796 | <td class="optional"> |
|---|
| | 2797 | Description: |
|---|
| | 2798 | </td> |
|---|
| | 2799 | <td> |
|---|
| | 2800 | <textarea name="categoryDesc.value" rows="3" cols="60"> |
|---|
| | 2801 | <xsl:value-of select="normalize-space(/bedework/currentCategory/category/desc)"/> |
|---|
| | 2802 | </textarea> |
|---|
| | 2803 | </td> |
|---|
| | 2804 | </tr> |
|---|
| | 2805 | </table> |
|---|
| | 2806 | |
|---|
| | 2807 | <table border="0" id="submitTable"> |
|---|
| | 2808 | <tr> |
|---|
| | 2809 | <td> |
|---|
| | 2810 | <input type="submit" name="updateCategory" value="Update Category"/> |
|---|
| | 2811 | <input type="submit" name="cancelled" value="Cancel"/> |
|---|
| | 2812 | <input type="reset" value="Reset"/> |
|---|
| | 2813 | </td> |
|---|
| | 2814 | <td align="right"> |
|---|
| | 2815 | <input type="submit" name="delete" value="Delete Category"/> |
|---|
| | 2816 | </td> |
|---|
| | 2817 | </tr> |
|---|
| | 2818 | </table> |
|---|
| | 2819 | </form> |
|---|
| | 2820 | </xsl:otherwise> |
|---|
| | 2821 | </xsl:choose> |
|---|
| | 2822 | |
|---|
| | 2823 | |
|---|
| | 2824 | </xsl:template> |
|---|
| | 2825 | |
|---|
| | 2826 | <xsl:template name="deleteCategoryConfirm"> |
|---|
| | 2827 | <h2>Ok to delete this category?</h2> |
|---|
| | 2828 | <p id="confirmButtons"> |
|---|
| | 2829 | <xsl:copy-of select="/bedework/formElements/*"/> |
|---|
| | 2830 | </p> |
|---|
| | 2831 | |
|---|
| | 2832 | <table class="eventFormTable"> |
|---|
| | 2833 | <tr> |
|---|
| | 2834 | <td class="fieldName"> |
|---|
| | 2835 | Keyword: |
|---|
| | 2836 | </td> |
|---|
| | 2837 | <td> |
|---|
| | 2838 | <xsl:value-of select="/bedework/currentCategory/category/keyword"/> |
|---|
| | 2839 | </td> |
|---|
| | 2840 | </tr> |
|---|
| | 2841 | <tr> |
|---|
| | 2842 | <td class="optional"> |
|---|
| | 2843 | Description: |
|---|
| | 2844 | </td> |
|---|
| | 2845 | <td> |
|---|
| | 2846 | <xsl:value-of select="/bedework/currentCategory/category/desc"/> |
|---|
| | 2847 | </td> |
|---|
| | 2848 | </tr> |
|---|
| | 2849 | </table> |
|---|