diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-06-10 16:43:17 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-06-10 16:43:17 +0000 |
| commit | 926c131dfb87d56cd7b4c9f8115f600d3bbe8dc5 (patch) | |
| tree | d8183de1b79a73ab090d59e8fba1f8ff2af7bc09 | |
| parent | c77bdcd8f8f75a85928beb8fea1368acbe73449e (diff) | |
| download | pigeonholes-926c131dfb87d56cd7b4c9f8115f600d3bbe8dc5.tar.gz pigeonholes-926c131dfb87d56cd7b4c9f8115f600d3bbe8dc5.tar.bz2 pigeonholes-926c131dfb87d56cd7b4c9f8115f600d3bbe8dc5.zip | |
Add attachment browser.
| -rw-r--r-- | Pigeonholes.php | 6 | ||||
| -rw-r--r-- | edit_pigeonholes.php | 6 | ||||
| -rw-r--r-- | templates/edit_pigeonholes.tpl | 181 |
3 files changed, 107 insertions, 86 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php index 6eb2b2f..a055893 100644 --- a/Pigeonholes.php +++ b/Pigeonholes.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.87 2007/06/10 14:30:35 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.88 2007/06/10 16:43:17 nickpalmer Exp $ * * +----------------------------------------------------------------------+ * | Copyright ( c ) 2004, bitweaver.org @@ -17,7 +17,7 @@ * Pigeonholes class * * @author xing <xing@synapse.plus.com> - * @version $Revision: 1.87 $ + * @version $Revision: 1.88 $ * @package pigeonholes */ @@ -91,6 +91,8 @@ class Pigeonholes extends LibertyAttachable { $this->mInfo['parsed_data'] = $this->parseData( $row ); } + LibertyAttachable::load(); + // if the content for the pigeonhole is requested, get it if( $pExtras ) { $this->mInfo['path'] = $this->getPigeonholePath(); diff --git a/edit_pigeonholes.php b/edit_pigeonholes.php index 6e253ae..52d29f1 100644 --- a/edit_pigeonholes.php +++ b/edit_pigeonholes.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_pigeonholes.php,v 1.23 2006/09/03 13:27:44 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_pigeonholes.php,v 1.24 2007/06/10 16:43:17 nickpalmer Exp $ * * Copyright ( c ) 2004 bitweaver.org * Copyright ( c ) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: edit_pigeonholes.php,v 1.23 2006/09/03 13:27:44 squareing Exp $ + * $Id: edit_pigeonholes.php,v 1.24 2007/06/10 16:43:17 nickpalmer Exp $ * @package pigeonholes * @subpackage functions */ @@ -173,6 +173,8 @@ if ( $gBitSystem->isFeatureActive( 'pigeonholes_themes' ) ) { $gBitSmarty->assign( 'styles', $styles ); } +$gBitSmarty->assign('loadAjax', TRUE); + // Display the template if ( !empty( $gStructure ) ) { $gBitSystem->display( 'bitpackage:pigeonholes/edit_pigeonholes.tpl', !empty( $gStructure->mInfo['title'] ) ? tra( 'Edit Pigeonhole' ).': '.$gStructure->mInfo["title"] : tra( 'Create Pigeonhole' ) ); diff --git a/templates/edit_pigeonholes.tpl b/templates/edit_pigeonholes.tpl index 18f4229..1161aac 100644 --- a/templates/edit_pigeonholes.tpl +++ b/templates/edit_pigeonholes.tpl @@ -7,100 +7,117 @@ <div class="body"> {formfeedback hash=$feedback} - {form legend="Create / Edit Category"} - {if $gContent->mStructureId} - <input type="hidden" name="structure_id" value="{$gContent->mStructureId}" /> - <input type="hidden" name="content_id" value="{$pigeonInfo.content_id}" /> - <input type="hidden" name="action" value="{$smarty.request.action}" /> + {form method="post" enctype="multipart/form-data"} + {jstabs} + {jstab title="Create / Edit Category"} + {legend legend="Create / Edit Category"} + {if $gContent->mStructureId} + <input type="hidden" name="structure_id" value="{$gContent->mStructureId}" /> + <input type="hidden" name="content_id" value="{$pigeonInfo.content_id}" /> + <input type="hidden" name="action" value="{$smarty.request.action}" /> - <div class="row"> - {formlabel label="Parent" for="pigeonhole-parent"} - {forminput} - {* we need to disable dropdown when editing since it might confus users when nothing happens *} - {if $pigeonInfo.content_id} - {html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id disabled=disabled} - {else} - {html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id} + <div class="row"> + {formlabel label="Parent" for="pigeonhole-parent"} + {forminput} + {* we need to disable dropdown when editing since it might confus users when nothing happens *} + {if $pigeonInfo.content_id} + {html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id disabled=disabled} + {else} + {html_options id="pigeonhole-parent" name="pigeonhole[parent_id]" values=$pigeonStructure options=$pigeonStructure selected=$pigeonInfo.parent_id} + {/if} + {formhelp note="Pick where you would like to create a new sub-category. To change the hierarchy of the categories, please visit the change structure page."} + {/forminput} + </div> {/if} - {formhelp note="Pick where you would like to create a new sub-category. To change the hierarchy of the categories, please visit the change structure page."} - {/forminput} - </div> - {/if} - <div class="row"> - {formlabel label="Title" for="pigeonhole-title"} - {forminput} - <input type="text" size="50" id="pigeonhole-title" name="pigeonhole[title]" value="{$pigeonInfo.title|escape}" /> - {/forminput} - </div> + <div class="row"> + {formlabel label="Title" for="pigeonhole-title"} + {forminput} + <input type="text" size="50" id="pigeonhole-title" name="pigeonhole[title]" value="{$pigeonInfo.title|escape}" /> + {/forminput} + </div> - {if $gBitSystem->isFeatureActive('pigeonholes_display_description')} - <div class="row"> - {textarea id="pigeonhole-desc" name="pigeonhole[edit]" note="A description of the category. This will be visible when users view this particular category." label="Description"}{$pigeonInfo.data}{/textarea} - </div> - {/if} + {if $gBitSystem->isFeatureActive('pigeonholes_display_description')} + <div class="row"> + {textarea id="pigeonhole-desc" name="pigeonhole[edit]" note="A description of the category. This will be visible when users view this particular category." label="Description"}{$pigeonInfo.data}{/textarea} + </div> + {/if} - {if $gBitSystem->isFeatureActive( 'pigeonholes_allow_forbid_insertion') } - <div class="row"> - {formlabel label="Forbid Insertion" for="pigeonhole-no-insert"} - {forminput} - <input type="checkbox" name="pigeonhole[prefs][no_insert]" id="pigeonhole-no-insert" {if $gContent->mPrefs.no_insert}checked{/if} /> - {formhelp note="Forbids inserting new content into this category. Useful for categories which are meant to hold other categories in a heirarchy where only leaf categories should hold content."} - {/forminput} - </div> - {/if} + {if $gBitSystem->isFeatureActive( 'pigeonholes_allow_forbid_insertion') } + <div class="row"> + {formlabel label="Forbid Insertion" for="pigeonhole-no-insert"} + {forminput} + <input type="checkbox" name="pigeonhole[prefs][no_insert]" id="pigeonhole-no-insert" {if $gContent->mPrefs.no_insert}checked{/if} /> + {formhelp note="Forbids inserting new content into this category. Useful for categories which are meant to hold other categories in a heirarchy where only leaf categories should hold content."} + {/forminput} + </div> + {/if} - {if $gBitSystem->isFeatureActive( 'pigeonholes_themes' )} - <div class="row"> - {formlabel label="Theme" for="pigeonhole-style"} - {forminput} - {html_options id="pigeonhole-style" name="pigeonhole[prefs][style]" output=$styles values=$styles selected=$gContent->mPrefs.style} - {formhelp note="This theme will be applied when viewing any page belonging to this category." warning="Setting is inherited from parent category."} - {/forminput} - </div> - {/if} + {if $gBitSystem->isFeatureActive( 'pigeonholes_themes' )} + <div class="row"> + {formlabel label="Theme" for="pigeonhole-style"} + {forminput} + {html_options id="pigeonhole-style" name="pigeonhole[prefs][style]" output=$styles values=$styles selected=$gContent->mPrefs.style} + {formhelp note="This theme will be applied when viewing any page belonging to this category." warning="Setting is inherited from parent category."} + {/forminput} + </div> + {/if} - {if $gBitSystem->isFeatureActive( 'pigeonholes_permissions' )} - <div class="row"> - {formlabel label="Permission" for="perm"} - {forminput} - {html_options name="pigeonhole[prefs][permission]" id="perm" options=$perms selected=`$gContent->mPrefs.permission`} - {formhelp note="Permission required to view any page in this category." warning="Setting is inherited from parent category."} - {/forminput} - </div> - {/if} + {if $gBitSystem->isFeatureActive( 'pigeonholes_permissions' )} + <div class="row"> + {formlabel label="Permission" for="perm"} + {forminput} + {html_options name="pigeonhole[prefs][permission]" id="perm" options=$perms selected=`$gContent->mPrefs.permission`} + {formhelp note="Permission required to view any page in this category." warning="Setting is inherited from parent category."} + {/forminput} + </div> + {/if} - {if $gBitSystem->isFeatureActive( 'pigeonholes_groups' )} - <div class="row"> - {formlabel label="Group" for="group"} - {forminput} - {html_options name="pigeonhole[prefs][group]" id="group" options=$groups selected=`$gContent->mPrefs.group_id`} - {formhelp note="Users of only this group can view the content of this category." warning="Setting is inherited from parent category."} - {/forminput} - </div> - {/if} + {if $gBitSystem->isFeatureActive( 'pigeonholes_groups' )} + <div class="row"> + {formlabel label="Group" for="group"} + {forminput} + {html_options name="pigeonhole[prefs][group]" id="group" options=$groups selected=`$gContent->mPrefs.group_id`} + {formhelp note="Users of only this group can view the content of this category." warning="Setting is inherited from parent category."} + {/forminput} + </div> + {/if} + + {if !$gContent->mStructureId} + <div class="row"> + {formlabel label="Content" for="pigeonhole-content"} + {forminput} + {html_options options=$contentTypes name=content_type_guid selected=$contentSelect} + {/forminput} + + {forminput} + {html_options multiple="multiple" size="12" name="pigeonhole[members][]" id="pigeonhole-content" values=$contentList options=$contentList selected=$pigeonInfo.selected_members} + {/forminput} + + {forminput} + <input type="text" size="30" name="find_objects" value="{$smarty.request.find_objects}" /> + <input type="submit" value="{tr}Apply filter{/tr}" name="search_objects" /> + {/forminput} + </div> + {/if} - {if !$gContent->mStructureId} - <div class="row"> - {formlabel label="Content" for="pigeonhole-content"} - {forminput} - {html_options options=$contentTypes name=content_type_guid selected=$contentSelect} - {/forminput} + {include file="bitpackage:liberty/edit_storage_list.tpl"} - {forminput} - {html_options multiple="multiple" size="12" name="pigeonhole[members][]" id="pigeonhole-content" values=$contentList options=$contentList selected=$pigeonInfo.selected_members} - {/forminput} + <div class="row submit"> + <input type="submit" name="pigeonhole_store" value="{tr}Save Category{/tr}" /> + </div> + {/legend} + {/jstab} - {forminput} - <input type="text" size="30" name="find_objects" value="{$smarty.request.find_objects}" /> - <input type="submit" value="{tr}Apply filter{/tr}" name="search_objects" /> - {/forminput} - </div> - {/if} + {jstab title="Attachments"} + <div class=row> + {legend legend="Attachments"} + {include file="bitpackage:liberty/edit_storage.tpl"} - <div class="row submit"> - <input type="submit" name="pigeonhole_store" value="{tr}Save Category{/tr}" /> - </div> + {/legend} + </div> + {/jstab} + {/jstabs} {/form} {include file="bitpackage:pigeonholes/view_structure_inc.tpl"} |
