summaryrefslogtreecommitdiff
path: root/modules/tag/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-27 05:37:20 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-27 05:37:20 +0000
commit72d16756b169e1f751470670eececf76e88b2bd7 (patch)
tree7e49f000e23a7ae54c69d081f264bc378903a0d3 /modules/tag/views
parent5447b8321080afd09387d837a4acfa9c90ddfa16 (diff)
Refactor cloud generation into a helper so that we can call it from
Tags_Controller::_index(). This enables our Ajax code to reload the tags block after we submit a new tag, so update the JS to do that properly.
Diffstat (limited to 'modules/tag/views')
-rw-r--r--modules/tag/views/tag_block.html.php19
-rw-r--r--modules/tag/views/tag_block_cloud.html.php9
2 files changed, 13 insertions, 15 deletions
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index 6ce67e9d..cc75e6f0 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -1,18 +1,7 @@
<? defined("SYSPATH") or die("No direct script access."); ?>
-<? if ($tags): ?>
-<ul>
- <? foreach ($tags as $tag): ?>
- <li class="size<?=(int)(($tag->count / $max_count) * 7) ?>">
- <span><?= $tag->count ?> photos are tagged with </span>
- <a href="<?=url::site("tags/$tag->id") ?>"><?= $tag->name ?></a>
- </li>
- <? endforeach ?>
-</ul>
-<? endif ?>
-
-<? if (isset($form)): ?>
-<div id="gTagFormContainer">
- <?= $form ?>
+<div id="gTagCloud" src="<?= url::site("tags") ?>">
+ <?= $cloud ?>
</div>
-<? endif; ?>
+<?= $form ?>
+
diff --git a/modules/tag/views/tag_block_cloud.html.php b/modules/tag/views/tag_block_cloud.html.php
new file mode 100644
index 00000000..6abaf953
--- /dev/null
+++ b/modules/tag/views/tag_block_cloud.html.php
@@ -0,0 +1,9 @@
+<? defined("SYSPATH") or die("No direct script access."); ?>
+<ul>
+ <? foreach ($tags as $tag): ?>
+ <li class="size<?=(int)(($tag->count / $max_count) * 7) ?>">
+ <span><?= $tag->count ?> photos are tagged with </span>
+ <a href="<?=url::site("tags/$tag->id") ?>"><?= $tag->name ?></a>
+ </li>
+ <? endforeach ?>
+</ul>