summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-03-22 20:45:50 +0000
committerNick Palmer <nick@sluggardy.net>2007-03-22 20:45:50 +0000
commitd0bc06e72fe637eb03e840c9dfaa4a1115217cd0 (patch)
treed38cb5d881ef989e53184ba6af664e58ba9d4cb5 /templates
parentdeae8e60adb79e821e25972ef2d62002c7cfe84f (diff)
downloadtags-d0bc06e72fe637eb03e840c9dfaa4a1115217cd0.tar.gz
tags-d0bc06e72fe637eb03e840c9dfaa4a1115217cd0.tar.bz2
tags-d0bc06e72fe637eb03e840c9dfaa4a1115217cd0.zip
Added ability to drop tags from content for owners and admin. Added some code to support preventing tags on comments because I did it before I realized we can't tag comments yet. Added a package icon. Added transactions around expunges.
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_tags.tpl23
-rw-r--r--templates/edit_tags.tpl2
-rw-r--r--templates/view_tags_mini_inc.tpl8
3 files changed, 32 insertions, 1 deletions
diff --git a/templates/admin_tags.tpl b/templates/admin_tags.tpl
index f5bd728..e8029cd 100644
--- a/templates/admin_tags.tpl
+++ b/templates/admin_tags.tpl
@@ -44,7 +44,28 @@
{/foreach}
{/legend}
{/jstab}
-
+{*
+ {jstab title="Other Settings"}
+ {legend legend="Other Settings"}
+ <input type="hidden" name="page" value="{$page}" />
+ {foreach from=$formTagsOtherOptions 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}" />
diff --git a/templates/edit_tags.tpl b/templates/edit_tags.tpl
index b67291e..8d7dadc 100644
--- a/templates/edit_tags.tpl
+++ b/templates/edit_tags.tpl
@@ -1,4 +1,5 @@
{strip}
+{if $gContent->mContentTypeGuid != 'bitcomment' || $gBitSystem->isFeatureActive('tags_on_comments')}
<div class="row">
{formlabel label="Add Tags" for="tags"}
{forminput}
@@ -9,4 +10,5 @@
{forminput}
{include file='bitpackage:tags/view_tags_mini_inc.tpl' tagData=$tagData}
{/forminput}
+{/if}
{/strip}
diff --git a/templates/view_tags_mini_inc.tpl b/templates/view_tags_mini_inc.tpl
index 524a067..39d8292 100644
--- a/templates/view_tags_mini_inc.tpl
+++ b/templates/view_tags_mini_inc.tpl
@@ -1,11 +1,19 @@
{strip}
{if count($tagData) > 0 && $gBitUser->hasPermission('p_tags_view')}
<div class="tags">
+ <form action="{$smarty.const.TAGS_PKG_URL}drop_tags.php">
+ <input type="hidden" name="content_id" value="{$gContent->mContentId}" />
<b>{tr}Tags:{/tr}</b>&nbsp;
{section name=tag loop=$tagData}
{if $smarty.section.tag.index > 0},&nbsp;{/if}
<a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tagData[tag].tag}">{$tagData[tag].tag}</a>
+ {if $gContent->isOwner() || $gBitUser->hasPermission('p_tags_admin')}
+ <input type="checkbox" name="tag_id[]" value="{$tagData[tag].tag_id}" />
+ <input type="hidden" name="tag_{$tagData[tag].tag_id}" value="{$tagData[tag].tag}" />
+ {/if}
{/section}
+ <input type="submit" name="drop_tags" value="{tr}Drop Tags{/tr}" />
+ </form>
</div>
{/if}
{/strip}