diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-01-14 19:55:19 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-01-14 19:55:19 +0000 |
| commit | 154080e959440ca9168a56196cf786d1a7405cc5 (patch) | |
| tree | 1db481cca7fd65ed74d277e25583ba52e4402cf5 /templates/section_inc.tpl | |
| parent | 9a238f69969e9c3c33f72dd35335dffc8f52f774 (diff) | |
| download | pigeonholes-154080e959440ca9168a56196cf786d1a7405cc5.tar.gz pigeonholes-154080e959440ca9168a56196cf786d1a7405cc5.tar.bz2 pigeonholes-154080e959440ca9168a56196cf786d1a7405cc5.zip | |
merge recent changes into HEAD
Diffstat (limited to 'templates/section_inc.tpl')
| -rw-r--r-- | templates/section_inc.tpl | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/templates/section_inc.tpl b/templates/section_inc.tpl new file mode 100644 index 0000000..ba61ae1 --- /dev/null +++ b/templates/section_inc.tpl @@ -0,0 +1,149 @@ +{strip} +{if $list_style == "table"} + + {* ======= this display method requires "alphabetisation" ======= *} + <h3><a href="{$smarty.const.PIGEONHOLES_PKG_URL}view.php?structure_id={$subtree[ix].structure_id}">{$subtree[ix].title}</a></h3> + + {foreach from=$pigeonList item=pigeonItem} + {if $pigeonItem.structure_id eq $subtree[ix].structure_id && $pigeonItem.members} + {$pigeonItem.data|escape} + <table class="data"><tr> + {*use a fixed number here for now, we can change this eventually with a preference*} + {math equation="100 / x" x=3 assign=width format="%u"} + {foreach from=$pigeonItem.members item=pigeonColumn} + <td style="vertical-align:top; width:{$width}%;"> + {foreach from=$pigeonColumn item=members key=index} + <h2>{$index}</h2> + <ul> + {foreach from=$members item=member} + <li> + <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$member.content_id}">{$member.title}</a> + <br /> + <small>{$member.content_type_description}</small> + </li> + {/foreach} + </ul> + {/foreach} + </td> + {/foreach} + </tr></table> + {/if} + {/foreach} + +{elseif $list_style == "dynamic"} + + {* ======= crazy display for only few category memebers - only display method that allows custom sorting ======= *} + {if $gPigeonholes->mStructureId eq $subtree[ix].structure_id or $smarty.request.expand_all} + {assign var=iname value=Expanded} + {else} + {assign var=iname value=Collapsed} + {/if} + + <div class="highlight"> + {if $edit} + <div class="floaticon"> + {smartlink ititle="Edit Category" ibiticon="liberty/edit" ifile="edit_pigeonholes.php" structure_id=$subtree[ix].structure_id action=edit} + {smartlink ititle="Remove Category" ibiticon="liberty/delete" ifile="edit_pigeonholes.php" structure_id=$subtree[ix].structure_id action=remove} + </div> + {/if} + + <a href="javascript:icntoggle('sid{$subtree[ix].structure_id}');"> + {biticon ipackage=liberty iname=$iname id=sid`$subtree[ix].structure_id`img"} {$subtree[ix].title} + </a> + + <script type="text/javascript"> + setfoldericonstate('sid{$subtree[ix].structure_id}'); + </script> + + {foreach from=$pigeonList item=pigeonItem} + {if $pigeonItem.structure_id eq $subtree[ix].structure_id} + <small> {tr}{$pigeonItem.members_count} Item(s){/tr} </small> + {/if} + {/foreach} + + <noscript> + <div style="padding-left:18px;" class="small"><a href="{$smarty.const.PIGEONHOLES_PKG_URL}{if $edit}edit_pigeonholes{else}index{/if}.php?structure_id={$subtree[ix].structure_id}">{tr}Expand{/tr}</a></div> + </noscript> + </div> + + {foreach from=$pigeonList item=pigeonItem} + {if $pigeonItem.structure_id eq $subtree[ix].structure_id} + <small>{$pigeonItem.data|escape}</small> + + {if $pigeonItem.members} + <ul id="sid{$subtree[ix].structure_id}" style="display:{if $gPigeonholes->mStructureId eq $subtree[ix].structure_id or $smarty.request.expand_all}block{else}none{/if};" class="data"> + {foreach from=$pigeonItem.members item=pigeonMember} + {if $gBitSystem->isFeatureActive( 'custom_member_sorting' )} + <li> + {if $edit && $gBitSystem->isFeatureActive( 'custom_member_sorting' )} + {if $pigeonMember.pos ne 1} + {smartlink ititle="Move item up" ibiticon="liberty/nav_up" expand_all=$smarty.request.expand_all ifile="edit_pigeonholes.php" action=move orientation=north structure_id=$pigeonItem.structure_id parent_id=$pigeonItem.content_id member_id=$pigeonMember.content_id} + {else} + {biticon ipackage="liberty" iname="spacer"} + {/if} + + {if $pigeonMember.pos ne $pigeonItem.members_count} + {smartlink ititle="Move item down" ibiticon="liberty/nav_down" expand_all=$smarty.request.expand_all ifile="edit_pigeonholes.php" action=move orientation=south structure_id=$pigeonItem.structure_id parent_id=$pigeonItem.content_id member_id=$pigeonMember.content_id} + {else} + {biticon ipackage="liberty" iname="spacer"} + {/if} + {/if} + <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$pigeonMember.content_id}">{$pigeonMember.title}</a> + {if $edit} + {smartlink ititle="Remove Item" ibiticon="liberty/delete_small" expand_all=$smarty.request.expand_all ifile="edit_pigeonholes.php" action=demember structure_id=$pigeonItem.structure_id parent_id=$pigeonMember.content_id content_id=$pigeonItem.content_id} + {/if} + </li> + {else} + {assign var=ctg1 value=$pigeonMember.content_type_guid} + + {* close off the content type <ul> *} + {if $ctg1 ne $ctg2 and $ctg2} + </ul> + </li> + {/if} + + {* open the content type <ul> *} + {if $ctg1 ne $ctg2} + <li>{$gLibertySystem->mContentTypes.$ctg1.content_description} + <ul> + {/if} + + <li> + <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$pigeonMember.content_id}">{$pigeonMember.title}</a> + {if $edit} + {smartlink ititle="Remove Item" ibiticon="liberty/delete_small" expand_all=$smarty.request.expand_all ifile="edit_pigeonholes.php" action=demember structure_id=$pigeonItem.structure_id parent_id=$pigeonMember.content_id content_id=$pigeonItem.content_id} + {/if} + </li> + + {assign var=ctg2 value=$pigeonMember.content_type_guid} + {/if} + {/foreach} + + {if !$gBitSystem->isFeatureActive( 'custom_member_sorting' )} + </ul> + </li> + {/if} + </ul> + {/if} + {/if} + {/foreach} + +{else} + + {* ======= very basic display of the pigoenhole structure ======= *} + {if !$no_edit} + <div class="floaticon"> + {smartlink ititle="Edit Category" ibiticon="liberty/edit" ifile="edit_pigeonholes.php" structure_id=$subtree[ix].structure_id action=edit} + {smartlink ititle="Remove Category" ibiticon="liberty/delete" ifile="edit_pigeonholes.php" structure_id=$subtree[ix].structure_id action=remove} + </div> + {/if} + + <h3><a href="{$smarty.const.PIGEONHOLES_PKG_URL}view.php?structure_id={$subtree[ix].structure_id}">{$subtree[ix].title}</a></h3> + + {foreach from=$pigeonList item=pigeonItem} + {if $pigeonItem.structure_id eq $subtree[ix].structure_id and $pigeonItem.members_count} + {tr}{$pigeonItem.members_count} Item(s){/tr} + {/if} + {/foreach} +{/if} +{/strip} |
