summaryrefslogtreecommitdiff
path: root/modules/tag/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-27 05:00:50 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-27 05:00:50 +0000
commit5447b8321080afd09387d837a4acfa9c90ddfa16 (patch)
tree1fbaf7cc855066aa8d337282a648d809c921f5dc /modules/tag/views
parent8e33f5d7b90335236e14b283ccb6d6ee5db4762d (diff)
Clean up REST pattern in tags:
1) Generate the form in Tags_Controller::_form_add() 2) Process the form submit in Tags_Controller::_create() 3) Create the tag properly This required me to limit our scope to adding one tag at a time, which I think is fine if we're doing Ajax style tag addition.
Diffstat (limited to 'modules/tag/views')
-rw-r--r--modules/tag/views/tag_block.html.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index bd507571..6ce67e9d 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -1,4 +1,5 @@
<? defined("SYSPATH") or die("No direct script access."); ?>
+<? if ($tags): ?>
<ul>
<? foreach ($tags as $tag): ?>
<li class="size<?=(int)(($tag->count / $max_count) * 7) ?>">
@@ -7,10 +8,11 @@
</li>
<? endforeach ?>
</ul>
+<? endif ?>
-<? if ($page_type != "tag"): ?>
- <div id="gTagFormContainer">
- <?= tag::get_add_form($item->id) ?>
- </div>
+<? if (isset($form)): ?>
+<div id="gTagFormContainer">
+ <?= $form ?>
+</div>
<? endif; ?>