Commit Graph

19 Commits

Author SHA1 Message Date
Tim Almdal
1c279887aa Should be get_var not set_var 2008-12-14 03:48:32 +00:00
Bharat Mediratta
d480778108 Don't have to check if the item is loaded now, access::can will guard against unloaded items 2008-12-13 19:49:58 +00:00
Bharat Mediratta
65e237a59a Fix security pattern. We can't successfully call access::can unless the item is loaded. 2008-12-13 09:53:36 +00:00
Tim Almdal
e7a763a8c2 Add permission check on the tag add controller, in case some bypasses the view and tries to access the controller directly. 2008-12-13 08:27:14 +00:00
Tim Almdal
fc3fd3321d Add a permissions check to determine if the active user has edit permission on the item in order to display the tag add form 2008-12-13 07:49:27 +00:00
Tim Almdal
942dbe175c Remove a couple of todo's by store the "theme name", "admin theme name" and "page size" in the vars table and initializing when the core module is installed 2008-12-12 19:39:38 +00:00
Tim Almdal
bac4ff2046 1) Create a Theme_View class that combines the functionality of the Theme class with the View class.
2) Only define the form.html.php::DrawForm method once if there are multiple forms on the page (i.e. comments and add tags)
2008-11-27 16:19:07 +00:00
Bharat Mediratta
3992dad486 Move form generation off into tag::get_add_form(). We can't use a controller to generate the form (it's incompatible with our REST model where controllers print stuff) 2008-11-27 06:25:21 +00:00
Bharat Mediratta
d16790de0c Get rid of the placeholder "add tags here..." text, and clear the form
on submit.
2008-11-27 05:45:17 +00:00
Bharat Mediratta
72d16756b1 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.
2008-11-27 05:37:20 +00:00
Bharat Mediratta
5447b83210 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.
2008-11-27 05:00:50 +00:00
Tim Almdal
b4b72b284b We are now submitting the ajax tag add form to the server correctly and rehooking the ajaxForm 2008-11-27 01:48:01 +00:00
Tim Almdal
d881c91e0c Trying to add tags, but it doesn't work yet. For some reason that i can't figure out, the form never validates and I never get into the true branch of the if. I'm taking a break for awhile. 2008-11-27 00:26:04 +00:00
Bharat Mediratta
974f9f7788 Add a new "tag" page type.
Create the concept of "page types" which let us specify the kind of
page that we're rendering in high level terms.  Currently there are
three page types: album, photo and tag.

The tag page type uses slightly different variables.  It has a $tag
but no $item.  Adjust all sidebar_block() functions to avoid printing
stuff that's dependent on the item if there is no item.

Simplify the tag code to stop trying to fake an item.

Update the theme slightly to use $item and $tag where appropriate
(notably, for making the <title> element).
2008-11-26 21:50:45 +00:00
Bharat Mediratta
9f37aaa1c2 Move Tag_Controller -> Tags_Controller to fit our REST pattern. 2008-11-26 20:40:04 +00:00
Bharat Mediratta
aa19a79e06 Clean up unnecessary comments, remove stray references to Comment_Controller 2008-11-26 20:33:06 +00:00
Tim Almdal
af9a27216d Modify the tag model to behave like a virtual album. There are two outstanding issues that i still have to resolve. The first being there is no thumbnail for the root directory, so it doesn't look quite right. And secondly, the bread crumb shows the dynamic tag album as hot having a parent. I wanted it to be the root directory, but i will overcome :-) 2008-11-26 16:48:00 +00:00
Tim Almdal
03bf3a6af2 Remove the more or less links 2008-11-26 05:08:43 +00:00
Tim Almdal
1ea0382f53 Moving right along on tags. Now the threshold for which tags can be changed. The default is to show all the tags (i.e. count >= the minimum frequency) by clicking on the "See Less" link, the tag cloud will not show the minimum frequency, so the number of tags shown is smaller.
The "See More" link works the opposite way.
2008-11-25 22:38:11 +00:00