Committer: ssafronova
LJSUP-7103: New update.bml - LJSUP-7110: create options widgetA trunk/cgi-bin/LJ/Widget/UpdateJournal/OptionsBlock.pm U trunk/cgi-bin/LJ/Widget/UpdateJournal.pm U trunk/htdocs/update2.bml.text U trunk/templates/UpdateJournal/main.tmpl A trunk/templates/UpdateJournal/options.tmpl
Added: trunk/cgi-bin/LJ/Widget/UpdateJournal/OptionsBlock.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/UpdateJournal/OptionsBlock.pm (rev 0) +++ trunk/cgi-bin/LJ/Widget/UpdateJournal/OptionsBlock.pm 2010-10-13 11:12:20 UTC (rev 17558) @@ -0,0 +1,18 @@ +package LJ::Widget::UpdateJournal::OptionsBlock; +# it is not a wdget, it is perl module +# all entry options (properties) + +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:02:45 UTC (rev 17557) +++ trunk/cgi-bin/LJ/Widget/UpdateJournal.pm 2010-10-13 11:12:20 UTC (rev 17558) @@ -6,6 +6,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) #sub need_res { qw( stc/widgets/examplepostwidget.css ) } @@ -20,6 +21,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); $template_obj->param(step => 1); Modified: trunk/htdocs/update2.bml.text =================================================================== --- trunk/htdocs/update2.bml.text 2010-10-13 11:02:45 UTC (rev 17557) +++ trunk/htdocs/update2.bml.text 2010-10-13 11:12:20 UTC (rev 17558) @@ -1,4 +1,8 @@ ;; -*- coding: utf-8 -*- +.options.head.edit=Edit (Customize) + +.options.head.title=Entry options + .title=Post to Journal Modified: trunk/templates/UpdateJournal/main.tmpl =================================================================== --- trunk/templates/UpdateJournal/main.tmpl 2010-10-13 11:02:45 UTC (rev 17557) +++ trunk/templates/UpdateJournal/main.tmpl 2010-10-13 11:12:20 UTC (rev 17558) @@ -1,2 +1,5 @@ <TMPL_INCLUDE templates/UpdateJournal/text.tmpl> -Hello, world! \ No newline at end of file +<br> +<TMPL_INCLUDE templates/UpdateJournal/options.tmpl> +<br> +Hello, world! Added: trunk/templates/UpdateJournal/options.tmpl =================================================================== --- trunk/templates/UpdateJournal/options.tmpl (rev 0) +++ trunk/templates/UpdateJournal/options.tmpl 2010-10-13 11:12:20 UTC (rev 17558) @@ -0,0 +1,2 @@ +<TMPL_VAR expr="ml('.options.head.title')"> +<a href='#'><TMPL_VAR expr="ml('.options.head.edit')"></a>