Committer: ssafronova
LJSUP-7103: New update.bml - LJSUP-7111: create actions widgetA trunk/cgi-bin/LJ/Widget/UpdateJournal/ActionsBlock.pm U trunk/cgi-bin/LJ/Widget/UpdateJournal.pm U trunk/htdocs/update2.bml.text A trunk/templates/UpdateJournal/actions.tmpl U trunk/templates/UpdateJournal/main.tmpl
Added: trunk/cgi-bin/LJ/Widget/UpdateJournal/ActionsBlock.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/UpdateJournal/ActionsBlock.pm (rev 0) +++ trunk/cgi-bin/LJ/Widget/UpdateJournal/ActionsBlock.pm 2010-10-13 11:31:45 UTC (rev 17559) @@ -0,0 +1,18 @@ +package LJ::Widget::UpdateJournal::ActionsBlock; +# it is not a wdget, it is perl module +# right column with actions + +use strict; +use Carp qw(croak); + +sub prepare_template_params { + my $class = shift; + my $template_obj = shift; + my $opts = shift; + + $template_obj->param(step => 1); + + return; +} + +1; Modified: trunk/cgi-bin/LJ/Widget/UpdateJournal.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/UpdateJournal.pm 2010-10-13 11:12:20 UTC (rev 17558) +++ trunk/cgi-bin/LJ/Widget/UpdateJournal.pm 2010-10-13 11:31:45 UTC (rev 17559) @@ -7,6 +7,7 @@ # they are not widgets, they are perl modules use LJ::Widget::UpdateJournal::TextBlock; # subject + body, tags and userpic group of elements use LJ::Widget::UpdateJournal::OptionsBlock; # all entry options (properties) +use LJ::Widget::UpdateJournal::ActionsBlock; # right column with actions #sub need_res { qw( stc/widgets/examplepostwidget.css ) } @@ -22,6 +23,7 @@ # put all needed parameters in common template object LJ::Widget::UpdateJournal::TextBlock->prepare_template_params($template_obj, $opts); LJ::Widget::UpdateJournal::OptionsBlock->prepare_template_params($template_obj, $opts); + LJ::Widget::UpdateJournal::ActionsBlock->prepare_template_params($template_obj, $opts); $template_obj->param(step => 1); Modified: trunk/htdocs/update2.bml.text =================================================================== --- trunk/htdocs/update2.bml.text 2010-10-13 11:12:20 UTC (rev 17558) +++ trunk/htdocs/update2.bml.text 2010-10-13 11:31:45 UTC (rev 17559) @@ -1,5 +1,9 @@ ;; -*- coding: utf-8 -*- +.actions.head.edit=Customize + +.actions.head.title=You can have more + .options.head.edit=Edit (Customize) .options.head.title=Entry options Added: trunk/templates/UpdateJournal/actions.tmpl =================================================================== --- trunk/templates/UpdateJournal/actions.tmpl (rev 0) +++ trunk/templates/UpdateJournal/actions.tmpl 2010-10-13 11:31:45 UTC (rev 17559) @@ -0,0 +1,2 @@ +<TMPL_VAR expr="ml('.actions.head.title')"> +<a href='#'><TMPL_VAR expr="ml('.actions.head.edit')"></a> Modified: trunk/templates/UpdateJournal/main.tmpl =================================================================== --- trunk/templates/UpdateJournal/main.tmpl 2010-10-13 11:12:20 UTC (rev 17558) +++ trunk/templates/UpdateJournal/main.tmpl 2010-10-13 11:31:45 UTC (rev 17559) @@ -2,4 +2,6 @@ <br> <TMPL_INCLUDE templates/UpdateJournal/options.tmpl> <br> +<TMPL_INCLUDE templates/UpdateJournal/actions.tmpl> +<br> Hello, world!