diff options
| author | wjames5 <will@tekimaki.com> | 2007-03-20 21:32:09 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2007-03-20 21:32:09 +0000 |
| commit | 10439da1c2bce1f5c503efffdbe7359f0663ca99 (patch) | |
| tree | 8492b0d46cb1a531938b525de00a4307b55b5b71 /templates | |
| parent | 8b1819cc41ae73108fc7e1b640121d0bad6ed8aa (diff) | |
| download | tags-10439da1c2bce1f5c503efffdbe7359f0663ca99.tar.gz tags-10439da1c2bce1f5c503efffdbe7359f0663ca99.tar.bz2 tags-10439da1c2bce1f5c503efffdbe7359f0663ca99.zip | |
add perms and editing interface so you can fix or kill bad tags
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/edit_tag.tpl | 32 | ||||
| -rw-r--r-- | templates/edit_tags_mini_inc.tpl | 2 | ||||
| -rw-r--r-- | templates/list_tags.tpl | 7 | ||||
| -rw-r--r-- | templates/menu_tags.tpl | 8 | ||||
| -rw-r--r-- | templates/tags_cloud.tpl | 3 | ||||
| -rw-r--r-- | templates/tags_list.tpl | 40 |
6 files changed, 83 insertions, 9 deletions
diff --git a/templates/edit_tag.tpl b/templates/edit_tag.tpl new file mode 100644 index 0000000..911cd10 --- /dev/null +++ b/templates/edit_tag.tpl @@ -0,0 +1,32 @@ +{* For editing a single tag *} +{strip} +<div class="floaticon">{bithelp}</div> +<div class="edit tag"> + <div class="header"> + {if $tagData} + <h1>{tr}Edit Tag{/tr}: {$tagData.tag|escape}</h1> + {else} + <h1>{tr}Create Tag{/tr}</h1> + {/if} + </div> + + <div class="body"> + {form enctype="multipart/form-data" id="edittag"} + <input type="hidden" name="tag_id" value="{if $tagData}{$tagData.tag_id}{/if}" /> + + {legend legend="Edit Tag"} + <div class="row"> + {formlabel label="Tag" for="tag"} + {forminput} + <input type="text" name="tag" id="tag" value="{if $tagData}{$tagData.tag}{/if}" /> + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="save" value="{tr}Save{/tr}" /> + </div> + {/legend} + {/form} + </div><!-- end .body --> +</div><!-- end .tag --> +{/strip}
\ No newline at end of file diff --git a/templates/edit_tags_mini_inc.tpl b/templates/edit_tags_mini_inc.tpl index bffdb1d..2072e10 100644 --- a/templates/edit_tags_mini_inc.tpl +++ b/templates/edit_tags_mini_inc.tpl @@ -1,3 +1,3 @@ -{if $gBitSystem->isPackageActive('tags')} +{if $gBitSystem->isPackageActive('tags') && $gBitUser->hasPermission('p_tags_create') } {include file='bitpackage:tags/edit_tags.tpl' tagData=$tagData} {/if} diff --git a/templates/list_tags.tpl b/templates/list_tags.tpl index aaebd2d..4bdc8c2 100644 --- a/templates/list_tags.tpl +++ b/templates/list_tags.tpl @@ -8,6 +8,7 @@ <div class="body"> + {if $cloud} <div class="navbar"> <ul><li>Sort by: </li> @@ -19,9 +20,11 @@ </li> </ul> </div> - <div class="clear"></div> - {include file="bitpackage:tags/tags_cloud.tpl"} + {include file="bitpackage:tags/tags_cloud.tpl"} + {else} + {include file="bitpackage:tags/tags_list.tpl"} + {/if} </div><!-- end .body --> </div><!-- end .tags --> {/strip} diff --git a/templates/menu_tags.tpl b/templates/menu_tags.tpl index 00a9463..269a64e 100644 --- a/templates/menu_tags.tpl +++ b/templates/menu_tags.tpl @@ -1,10 +1,8 @@ {strip} <ul> - {if $gBitUser->hasPermission( 'bit_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( 'bit_tags_edit' )} - <li><a class="item" href="{$smarty.const.TAGS_PKG_URL}edit.php">{biticon ipackage="icons" iname="document-new" iexplain="Edit tags" iforce="icon"} {tr}Edit tags{/tr}</a></li> + <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' )} + <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> {/strip} diff --git a/templates/tags_cloud.tpl b/templates/tags_cloud.tpl index 82fd5f0..225eee6 100644 --- a/templates/tags_cloud.tpl +++ b/templates/tags_cloud.tpl @@ -3,8 +3,9 @@ {if $tagData} <ul id="cloud"> {foreach item=tag from=$tagData} - <li class="tag{$tag.tagscale}"><a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tag.tag}">{$tag.tag}</a> ({$tag.popcant})<li> + <li class="tag{$tag.tagscale}"><a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tag.tag}">{$tag.tag}</a> ({$tag.popcant})</li> {/foreach} + </ul> {else} <div class="norecords"> {tr}No tags found{/tr} diff --git a/templates/tags_list.tpl b/templates/tags_list.tpl new file mode 100644 index 0000000..15eb827 --- /dev/null +++ b/templates/tags_list.tpl @@ -0,0 +1,40 @@ +{strip} +<table class="data"> + <tr> + <th>{tr}Tag{/tr}</th> + <th>{tr}Use Count{/tr}</th> + <th>{tr}Action{/tr}</th> + </tr> + {if $tagData} + {cycle values="even,odd" print=false} + {foreach item=tag from=$tagData} + <tr class="{cycle}"> + <td> + <strong><a href="{$smarty.const.TAGS_PKG_URL}index.php?tags={$tag.tag}">{$tag.tag}</a></strong> + </td> + <td style="text-align:center;"> + {$tag.popcant} + </td> + <td style="text-align:center;"> + {if $gBitUser->hasPermission( 'p_tags_edit' ) } + {smartlink ititle="Edit" ifile="edit.php" ibiticon="icons/accessories-text-editor" tag_id=$tag.tag_id} + {/if} + + {if $gBitUser->hasPermission( 'p_tags_remove' )} + {smartlink ititle="Remove" ibiticon="icons/edit-delete" action=remove remove_tag_id=$tag.tag_id status_id=$smarty.request.status_id} + {/if} + </td> + </tr> + {/foreach} + {else} + <tr class="norecords"> + <td colspan="5"> + {tr}No tags found{/tr} + </td> + </tr> + {/if} +</table><!-- end .data --> +{/strip} + + + |
