diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-03-22 18:14:36 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-03-22 18:14:36 +0000 |
| commit | deae8e60adb79e821e25972ef2d62002c7cfe84f (patch) | |
| tree | f1d1da7329d6d9f6a86ae61bf49167c091f4f91f /templates | |
| parent | 4474052d1013f860879387c48d33219dc33d831f (diff) | |
| download | tags-deae8e60adb79e821e25972ef2d62002c7cfe84f.tar.gz tags-deae8e60adb79e821e25972ef2d62002c7cfe84f.tar.bz2 tags-deae8e60adb79e821e25972ef2d62002c7cfe84f.zip | |
Added sanitation of tags with various options. Fixed bugs. Added ability to view tags in any of the service templates. Gussied up permissions some. Edit now means you can edit your own tags and admin is required for edit page.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_tags.tpl | 50 | ||||
| -rw-r--r-- | templates/edit_tags.tpl | 4 | ||||
| -rw-r--r-- | templates/menu_tags.tpl | 6 | ||||
| -rw-r--r-- | templates/view_tags_body.tpl | 3 | ||||
| -rw-r--r-- | templates/view_tags_mini_inc.tpl | 15 | ||||
| -rw-r--r-- | templates/view_tags_nav.tpl | 3 | ||||
| -rw-r--r-- | templates/view_tags_view.tpl | 3 |
7 files changed, 70 insertions, 14 deletions
diff --git a/templates/admin_tags.tpl b/templates/admin_tags.tpl index 5545731..f5bd728 100644 --- a/templates/admin_tags.tpl +++ b/templates/admin_tags.tpl @@ -1,11 +1,53 @@ {strip} +{formfeedback hash=$feedback} {form} {jstabs} - {jstab title="Tags Options"} - {legend legend="Tags Options"} - Currently there are no admin options - {/legend} + + {jstab title="Display Settings"} + {legend legend="Display Settings"} + <input type="hidden" name="page" value="{$page}" /> + {foreach from=$formTagsDisplayOptions key=item item=output} + <div class="row"> + {formlabel label=`$output.label` for=$item} + {forminput} + {if $output.type == 'numeric'} + {html_options name="$item" values=$numbers output=$numbers selected=$gBitSystem->getConfig($item) labels=false id=$item} + {elseif $output.type == 'input'} + <input type='text' name="{$item}" id="{$item}" value="{$gBitSystem->getConfig($item)}" /> + {else} + {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} + {/if} + {formhelp note=`$output.note` page=`$output.page`} + {/forminput} + </div> + {/foreach} + {/legend} {/jstab} + + {jstab title="Sanitation Settings"} + {legend legend="Santitation Settings"} + <input type="hidden" name="page" value="{$page}" /> + {foreach from=$formTagsStripOptions key=item item=output} + <div class="row"> + {formlabel label=`$output.label` for=$item} + {forminput} + {if $output.type == 'numeric'} + {html_options name="$item" values=$numbers output=$numbers selected=$gBitSystem->getConfig($item) labels=false id=$item} + {elseif $output.type == 'input'} + <input type='text' name="{$item}" id="{$item}" value="{$gBitSystem->getConfig($item)}" /> + {else} + {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} + {/if} + {formhelp note=`$output.note` page=`$output.page`} + {/forminput} + </div> + {/foreach} + {/legend} + {/jstab} + {/jstabs} + <div class="row submit"> + <input type="submit" name="tags_preferences" value="{tr}Change preferences{/tr}" /> + </div> {/form} {/strip} diff --git a/templates/edit_tags.tpl b/templates/edit_tags.tpl index 6721a71..b67291e 100644 --- a/templates/edit_tags.tpl +++ b/templates/edit_tags.tpl @@ -2,11 +2,11 @@ <div class="row"> {formlabel label="Add Tags" for="tags"} {forminput} - <input type="text" name="tags" id="tags" value="{if $tagData}{$tagData}{/if}" /> + <input type="text" name="tags" id="tags" value="{if $tagList}{$tagList}{/if}" /> {formhelp note="Enter key words to describe your content. Separate each tag with a comma: , . Tag wisely, tag efficiently."} {/forminput} </div> {forminput} - {include file='bitpackage:tags/view_tags_mini_inc.tpl' tagData=$tagData} + {include file='bitpackage:tags/view_tags_mini_inc.tpl' tagData=$tagData} {/forminput} {/strip} diff --git a/templates/menu_tags.tpl b/templates/menu_tags.tpl index 269a64e..d454112 100644 --- a/templates/menu_tags.tpl +++ b/templates/menu_tags.tpl @@ -1,7 +1,9 @@ {strip} <ul> - <li><a class="item" href="{$smarty.const.TAGS_PKG_URL}index.php">{biticon ipackage="icons" iname="applications-internet" iexplain="Shows a tag cloud" iforce="icon"} {tr}Tags{/tr}</a></li> - {if $gBitUser->hasPermission( 'p_tags_edit' )} + {if $gBitUser->hasPermission('p_tags_view')} + <li><a class="item" href="{$smarty.const.TAGS_PKG_URL}index.php">{biticon ipackage="icons" iname="applications-internet" iexplain="Shows a tag cloud" iforce="icon"} {tr}Tags{/tr}</a></li> + {/if} + {if $gBitUser->hasPermission( 'p_tags_admin' )} <li><a class="item" href="{$smarty.const.TAGS_PKG_URL}list.php">{biticon ipackage="icons" iname="document-new" iexplain="Edit tags" iforce="icon"} {tr}Edit tags{/tr}</a></li> {/if} </ul> diff --git a/templates/view_tags_body.tpl b/templates/view_tags_body.tpl new file mode 100644 index 0000000..1591bfb --- /dev/null +++ b/templates/view_tags_body.tpl @@ -0,0 +1,3 @@ +{if $gBitSystem->isFeatureActive('tags_in_body')} +{include file="bitpackage:tags/view_tags_mini_inc.tpl"} +{/if} diff --git a/templates/view_tags_mini_inc.tpl b/templates/view_tags_mini_inc.tpl index 6e3ef58..524a067 100644 --- a/templates/view_tags_mini_inc.tpl +++ b/templates/view_tags_mini_inc.tpl @@ -1,8 +1,11 @@ -{if count($tagData) > 0} -<div> - <b>Tags:</b> - {section name=tag loop=$tagData} - <a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tagData[tag].tag}">{$tagData[tag].tag}</a>, - {/section} +{strip} +{if count($tagData) > 0 && $gBitUser->hasPermission('p_tags_view')} +<div class="tags"> + <b>{tr}Tags:{/tr}</b> + {section name=tag loop=$tagData} + {if $smarty.section.tag.index > 0}, {/if} + <a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tagData[tag].tag}">{$tagData[tag].tag}</a> + {/section} </div> {/if} +{/strip} diff --git a/templates/view_tags_nav.tpl b/templates/view_tags_nav.tpl new file mode 100644 index 0000000..3e422f9 --- /dev/null +++ b/templates/view_tags_nav.tpl @@ -0,0 +1,3 @@ +{if $gBitSystem->isFeatureActive('tags_in_nav')} +{include file="bitpackage:tags/view_tags_mini_inc.tpl"} +{/if} diff --git a/templates/view_tags_view.tpl b/templates/view_tags_view.tpl new file mode 100644 index 0000000..1df7ef2 --- /dev/null +++ b/templates/view_tags_view.tpl @@ -0,0 +1,3 @@ +{if $gBitSystem->isFeatureActive('tags_in_view')} +{include file="bitpackage:tags/view_tags_mini_inc.tpl"} +{/if} |
