You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(381) |
Nov
(176) |
Dec
(310) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(334) |
Feb
(96) |
Mar
(149) |
Apr
(214) |
May
(120) |
Jun
(56) |
Jul
(10) |
Aug
(273) |
Sep
(182) |
Oct
(56) |
Nov
(125) |
Dec
(22) |
2003 |
Jan
(63) |
Feb
(181) |
Mar
(498) |
Apr
(433) |
May
(39) |
Jun
(512) |
Jul
(276) |
Aug
(156) |
Sep
(101) |
Oct
(66) |
Nov
(24) |
Dec
(161) |
2004 |
Jan
(1) |
Feb
(377) |
Mar
(68) |
Apr
(26) |
May
(107) |
Jun
(333) |
Jul
(13) |
Aug
|
Sep
(76) |
Oct
(88) |
Nov
(170) |
Dec
(91) |
2005 |
Jan
(52) |
Feb
(239) |
Mar
(402) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
(13) |
Aug
|
Sep
(71) |
Oct
(34) |
Nov
|
Dec
|
2006 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris W. <la...@us...> - 2005-09-24 14:01:00
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box/OpenInteract2/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17249/OpenInteract2/App Modified Files: BaseBox.pm Log Message: add more docs for building boxes, including a more complex example where we grab data from the database Index: BaseBox.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/OpenInteract2/App/BaseBox.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BaseBox.pm 29 Mar 2005 02:36:22 -0000 1.3 --- BaseBox.pm 24 Sep 2005 14:00:51 -0000 1.4 *************** *** 84,87 **** --- 84,88 ---- title = Frequent Links security = no + url_none = yes # Reference our template-only box, overriding weight and title: *************** *** 112,124 **** =head1 DESCRIPTION ! Boxes are standalone parcels of content that conform to a particular ! format. The content of a box is simply the result of executing an ! OpenInteract2 action: that action may be a piece of code (method in a ! class) or it may just be a template. In either case the box handler (L<OpenInteract2::Action::Box>) sorts ! the boxes and places the content for each in a 'shell' so all the ! boxes look the same -- if you want them to. The standard box looks ! something like this: ---------------------- <-- 'shell' --- 113,125 ---- =head1 DESCRIPTION ! A box contains content generated by an L<OpenInteract2::Action>. That ! content, plus some extra parameters, fits into a particular form so ! that all boxes look the same (if you want them to). The action doing ! the generating can be a typical class or just a template. In either case the box handler (L<OpenInteract2::Action::Box>) sorts ! the boxes and places the content for each in a 'shell'. The standard ! box looks something like this, as defined by 'class' attributes and ! CSS definitions: ---------------------- <-- 'shell' *************** *** 130,209 **** ---------------------- ! But you can create your own shell for all boxes by setting the 'boxes' ! parameter 'default_box_template' or on a per-box basis with the ! parameter 'box_template'. Whichever you choose, the value should be a ! particular template (in the 'package::template_name' format). ! ! =head1 BOX COLLECTION ! ! =head2 Configuration ! ! The L<OpenInteract2::Action::Box> action has a number of configuration ! parameters that define how the collection of boxes are organized and ! how they look. As with all L<OpenInteract2::Action> objects you can ! define these parameters in a configuration file (C<conf/action.ini> in ! the C<base_box> package) or in the object itself. ! ! =over 4 ! ! =item * ! ! B<default_box_template> ($) (optional) ! ! This is the template into which every box content gets put unless it ! specifies otherwise. The default template is ! C<base_box::main_box_shell>, which as the name would indicate is also ! installed with this package. ! B<default_box_separator> ($) (optional) ! This is the string used to separate boxes. For instance, if you want ! to put a short horizontal rule between each line, you could set this ! to: ! default_box_separator = <hr width="50%" noshade/> ! Or if you had a custom image you wanted to separate your boxes with: ! default_box_separator = <div align="center"><img src="/images/box_sep.gif" height="2" width="25"/></div> ! This module defines the default separator as '<br />'. ! =item * ! B<default_box_weight> ($; optional) ! Use as the box weight if unspecified. ! =item * ! B<system_box_class> ($) (optional) ! Defines what we should run on every request to display system ! boxes. Typically this is C<OpenInteract2::Action::SystemBoxes>; see ! L<OpenInteract2::Action::SystemBoxes> for what this includes. ! It is okay if you blank this out, you just will not get the 'login', ! 'templates used', 'admin tools' and other boxes on every page. ! We call the C<handler()> method on whatever class is defined here. ! =item * ! B<custom_box_class> ($) (optional) ! If you want to call a custom handler to run every time B<in addition ! to> the system handler named above, list the class here. We call the ! C<handler()> method on whatever class is defined here. ! =back ! =head1 BOX SAMPLES ! An individual box also has a say as to how it will be rendered as well ! as the content it will have. We'll go through a few different use ! cases. ! =head2 Sample: Standard action Like we said above, every box is just an action in a different --- 131,206 ---- ---------------------- ! But you can create your own shell for all boxes so they can look like ! this: ! BOX TITLE | Box content ! | generated by an ! | action goes here ! or whatever HTML/CSS magic you can conjure. You can also change the ! shell for a box at a time, provide localization keys instead of ! harcoded titles, provide parameters so that the content is specific to ! the current user, and much more. ! =head1 BOX SAMPLES ! An individual box also has a say as to how it will be rendered as well ! as the content it will have. We'll go through a few different use ! cases. ! =head2 Sample: Template-only, no parameteters ! You can also just pass a template name for a box: ! CTX->controller->add_box( 'mypkg::my_box_template' ); ! Which simply uses the scalar passed in as the template name and the ! box name, and uses all the defaults. However, you will likely get a ! box with a title 'Generic Box', which is probably not what you want. ! =head3 Sidebar: It's still an action... ! Just in case you thought that template-only boxes were an exception to ! the 'every box is an action' rule: underneath the hood we create an ! action of type 'template_only' and just assign the parameter ! 'template' as the template name you pass in. You can do the exact same ! thing by defining your action like this: ! [my_box] ! action_type = template_only ! template = mypkg::my_box_template ! And then adding the box like this: ! CTX->controller->add_box( 'my_box' ); ! The advantage is that the second uses a layer of abstraction for ! flexibility. So if you later want to perform some non-templating ! actions you can change the definition of the 'my_box' action to ! something like: ! [my_box] ! class = OpenInteract2::Action::MyBox ! task = generate_box ! paramA = foo ! ... ! and not have to change anything else. ! =head2 Sample: Template-only, parameters ! Another example -- this time you have to set your template as the ! parameter 'template' since you've got other box-specific properties to ! assign: ! CTX->controller->add_box({ ! name => 'mypkg::my_box_template', ! weight => 1, ! title => 'My First Box' ! }); ! Again, see L<BOX PROPERTIES> for everything you can assign. ! =head2 Sample: Box from simple action Like we said above, every box is just an action in a different *************** *** 226,232 **** 1; ! And our configuration for the box action points to the class and ! method; here's the most basic configuration to which we'll add values ! to see how they're reflected (from the C<conf/action.ini>): [insult_box] --- 223,258 ---- 1; ! Very simple, and like the rest of OpenInteract2 you don't have to ! worry about details like the source agsinst which the user was ! authenticated. Here we only change the content based on the user ID, ! but it would be easy to change it to lookup a fortune: ! ! sub insult { ! my ( $self ) = @_; ! my $first_name = CTX->request->auth_user->first_name; ! my $fortune = `/usr/bin/fortune insult`; ! return "$first_name: $fortune"; ! } ! ! Or say we wanted to lookup an insult based on the geographic IP ! address of the user: ! ! my %INSULTS = ( ! US => "I hear the people in America are so stupid...", ! Canada => "Canadians are so rude...", ! ); ! ! sub insult { ! my ( $self ) = @_; ! my $gi = Geo::IP->new( GEOIP_STANDARD ); ! my $host = CTX->request->remote_host; ! my $country = $gi->country_code_by_addr( $host ); ! return "$first_name: $INSULTS{ $country }"; ! } ! ! All this is hidden -- it's just an action that generates content. Our ! configuration for the box action points to the class and method; ! here's the most basic configuration to which we'll add values to see ! how they're reflected (from the C<conf/action.ini>): [insult_box] *************** *** 235,243 **** We'd add the box from a template like this -- 'insult_box' is from the ! name of our action: [% OI.box_add( 'insult_box' ) %] ! When invoked by the 'boxes' action this will generate something like: ---------------------- --- 261,269 ---- We'd add the box from a template like this -- 'insult_box' is from the ! name of our action found in the INI section heading ('[insult_box]'): [% OI.box_add( 'insult_box' ) %] ! When invoked by the 'boxes' action this might generate something like: ---------------------- *************** *** 274,286 **** class = OpenInteract2::Action::InsultUser task = insult ! title_key = Your Insult And in our localization files we'd have something like: ! myapp-en.msg: ! Your Insult = Your Insult ! ! myapp-es.msg: ! Your Insult = Su Insulto So if I login with my browser's preferred language set to Spanish --- 300,314 ---- class = OpenInteract2::Action::InsultUser task = insult ! title_key = insult.title And in our localization files we'd have something like: ! myapp-en.msg ! ---------- ! insult.title = Your Insult ! ! myapp-es.msg ! ---------- ! insult.title = Su Insulto So if I login with my browser's preferred language set to Spanish *************** *** 294,329 **** ---------------------- ! See below for all the other properties you can assign. ! =head2 Sample: Template-only, no parameteters ! The simplest case is a call: ! CTX->controller->add_box( 'mypkg::my_box_template' ); ! Which simply uses the scalar passed in as the template name and the ! box name, and uses all the defaults. However, you will likely get a ! box with a title 'Generic Box', which is probably not what you want. ! Just in case you thought that template-only boxes were an exception to ! the 'every box is an action' rule: underneath the hood we create an ! action of type 'template_only' and just assign the parameter ! 'template' as the template name you pass in. ! =head2 Sample: Template-only, parameters ! Another example -- this time you have to set your template as the ! parameter 'template' since you've got other parameters: CTX->controller->add_box({ ! name => 'mypkg::mybox', ! weight => 1, ! title => 'My First Box' }); =head1 BOX PROPERTIES Every box can define the following properties: B<name> ($) --- 322,474 ---- ---------------------- ! See below under L<BOX PROPERTIES> for all the other properties you can ! assign. ! =head2 Sample: Box from more complex action with template ! Now we'll show a more complicated box where we retrieve data from a ! database and send them onto a template. This example is from the ! 'comments' package, so you can see it in action whenever you like. ! First, we'll declare the box in the comment package's ! C<conf/action.ini>: ! [comment_recent] ! class = OpenInteract2::Action::Comments ! task = comment_recent ! is_secure = no ! url_none = yes ! cache_expire = 30m ! template_source = comments::box_comment_recent ! title_key = comments.recent ! default_comment_count = 5 ! Note that we're mixing in box properties with the action parameters ! here. For instance, 'title_key' is an action parameter but the box ! processor will find it and translate it to the 'label' field passed to ! the box shell (see L<BOX PROPERTIES> below). But the 'is_secure' tells ! OI2 whether to check security on the action, and 'url_none' tells it ! to ensure the action cannot be called by a URL. ! And since the box is just an action we can take advantage of caching ! as well: the 'cache_expire' action property tells OI2 how long it can ! cache the generated content. This means the database call you'll see ! below will only happen once every 30 minutes. ! Finally, we associate in configuration the action data with a template ! using the 'template_source' action property, which means we won't have ! reference the template in code. ! ! So now let's look at the method we referenced in the 'class' and ! 'task' action properties: ! ! package OpenInteract2::Action::Comments ! ... ! sub comment_recent { ! my ( $self ) = @_; ! my $recent_num = $self->param( 'comment_count' ) || ! $self->param( 'default_comment_count' ) || ! 5; # last-ditch effort... ! my %params = (); ! my $comments = eval { ! OpenInteract2::Comment->fetch_group({ ! limit => $recent_num, ! order => 'posted_on DESC', ! column_group => 'summary', ! }) ! }; ! if ( $@ ) { ! $params{error} = $self->_msg( ! 'comments.error.cannot_fetch_recent', "$@" ); ! } ! else { ! $params{comments} = $comments; ! } ! return $self->generate_content( \%params ); ! } + First we determine how many comments to display. Note that the first + try is to an action parameter 'comment_count'. You can set this when + you add the box: + + From a template: + [% OI.box_add( 'comment_recent', comment_count = 3 ) %] + + From code: CTX->controller->add_box({ ! name => 'comment_recent', ! comment_count => 3, }); + Next we'll retrieve the most recent comments. Comments are represented + by a SPOPS object (L<OpenInteract2::Comment>) which inherits the SPOPS + method <fetch_group()>. That method retieves objects using arbitrary + criteria. + + If we get an error we assign it to the parameter 'error', otherwise we + stuff the retrieved comments in the parameter 'comments'. We then pass + these parameters to the action C<generate_content()> method, which is + smart enough to associate them with the 'template_source' we defined + in the action configuration. + + Here's the template that gets the comments: + + [% IF error %] + + <p>[% error %]</p> + + [% ELSIF comments.size == 0 -%] + + <p>[% MSG( 'comments.no_comments' ) %]</p> + + [% ELSE -%] + + <ul class="listInBox"> + [% FOREACH comment = comments; + object_url = comment.get_summary.object_url; + post_date = OI.date_format( comment.posted_on, '%d-%b %H:%M' ); -%] + <li><a href="[% object_url %]">[% comment.subject %]</a> + on [% post_date %]</li> + [% END %] + </ul> + + [% END -%] + + In the template we'll display the error if it exists, or display a + message that no comments were found if the 'comments' list is empty, + or display a bulleted list of the posted comments. So it might look + like: + + * <mod_perl rocks> on 13-Jan 12:45 + * <I hate faxes> on 13-Jan 9:09 + * <my monitor's great> on 12-Jan 18:19 + + Once that's generated the box processor will place that content into + the box shell. So assuming we can resolve the 'title_key' parameter + (which was 'comments.recent') using the following message key + definition: + + In comments-messages-en.msg: + + comments.recent = Recent Comments + + The final box could look like: + + ----------------------------------------- + | Recent Comments | + ----------------------------------------- + | * <mod_perl rocks> on 13-Jan 12:45 | + | * <I hate faxes> on 13-Jan 9:09 | + | * <my monitor's great> on 12-Jan 18:19| + ----------------------------------------- + =head1 BOX PROPERTIES Every box can define the following properties: + =over 4 + + =item * + B<name> ($) *************** *** 331,339 **** may also be the name of the template for this box. B<box_name> ($) Solely used to identify the box; if not provided we use the 'name' parameter. This is useful if you've got two boxes referencing the same ! template but with different content. For instance, say you had a box 'weather' that displayed weather --- 476,486 ---- may also be the name of the template for this box. + =item * + B<box_name> ($) Solely used to identify the box; if not provided we use the 'name' parameter. This is useful if you've got two boxes referencing the same ! action (or template) but with different content. For instance, say you had a box 'weather' that displayed weather *************** *** 351,354 **** --- 498,528 ---- [% OI.remove_box( 'pgh weather' ) %] + =item * + + B<weight> ($) + + Number between 1 (top) and 10 (bottom) indicating where you want the + box to be. If you do not specify the weight the C<default_box_weight> + action parameter will be used; if that's not defined the world is an + uncertain place, so who knows what'll happen? + + =item * + + B<box_template> ($) (optional) + + If you specify the keyword '_blank_' then your box content will be + 'naked' and not wrapped by anything else. If you leave this empty you + will use the template specified in the 'default_box_template' action + parameter. + + =back + + The 'title' properties will get resolved to a variable 'label' which + is passed to the shell: + + =over 4 + + =item * + B<title> ($) (optional) *************** *** 361,368 **** --- 535,553 ---- 'title' and if both are present this will be used. + =back + + The 'title_image' properties will get resolved to a variable + 'label_image_src' which is passed to the shell: + + =over 4 + + =item * + B<title_image_src> ($) (optional) Display an image for the title to be used in the 'shell' wrapper. + =item * + B<title_image_src_key> ($) (optional) *************** *** 370,377 **** --- 555,573 ---- 'title_image_src' and if both are present this will be used. + =back + + The 'title_image_alt' properties will get resolved to a variable + 'label_image_alt' which is passed to the shell: + + =over 4 + + =item * + B<title_image_alt> ($) (optional) Text to put in the 'alt' tag if using an image in the title. + =item * + B<title_image_alt_key> ($) (optional) *************** *** 380,400 **** this will be used. ! B<weight> ($) ! ! Number between 1 (top) and 10 (bottom) indicating where you want the ! box to be. If you do not specify the weight the C<default_box_weight> ! action parameter will be used; if that's not defined the world is an ! uncertain place. ! B<box_template> ($) (optional) ! If you specify the keyword '_blank_' then your box content will be ! 'naked' and not wrapped by anything else. If you leave this empty you ! will use the template specified in the 'default_box_template' action ! parameter. =item * ! B<*> or B<\%params> (optional) Any additional parameters, or parameters specified in C<\%params>, --- 576,588 ---- this will be used. ! =back ! Finally, everything else: ! =over 4 =item * ! B<*> or B<params> (\%) (optional) Any additional parameters, or parameters specified in C<\%params>, *************** *** 403,406 **** --- 591,664 ---- =back + =head1 BOX COLLECTION + + =head2 Configuration + + The L<OpenInteract2::Action::Box> action has a number of configuration + parameters that define how the collection of boxes are organized and + how they look. As with all L<OpenInteract2::Action> objects you can + define these parameters in a configuration file (C<conf/action.ini> in + the C<base_box> package) or, more rarely, in the object itself. + + =over 4 + + =item * + + B<default_box_template> ($) (optional) + + This is the template into which the content generated by box gets put + unless it specifies otherwise (see 'box_template' in L<BOX + PROPERTIES>, below). The default template is + C<base_box::main_box_shell>, which as the name would indicate is also + installed with this package. + + B<default_box_separator> ($) (optional) + + This is the string used to separate boxes. For instance, if you want + to put a short horizontal rule between each line, you could set this + to: + + default_box_separator = <hr width="50%" noshade /> + + Or if you had a custom image you wanted to separate your boxes with: + + default_box_separator = <div align="center"><img src="/images/box_sep.gif" height="2" width="25"/></div> + + This module defines the default separator as '<br />'. + + =item * + + B<default_box_weight> ($; optional) + + Use as the box weight if unspecified. + + =item * + + B<system_box_class> ($) (optional) + + Defines what we should run on every request to display system + boxes. Typically this is C<OpenInteract2::Action::SystemBoxes>; see + L<OpenInteract2::Action::SystemBoxes> for what this includes. + + It is okay if you blank this out, you just will not get the 'login' + and admin-only 'templates used' 'admin tools' boxes on every page. + + We call the C<handler()> method on whatever class is defined + here. This class does not (and should not) subclass + L<OpenInteract2::Action>, typically it just adds some boxes for later + processing. + + =item * + + B<custom_box_class> ($) (optional) + + If you want to call a custom handler to run every time B<in addition + to> the system handler named above, list the class here. We call the + C<handler()> method on whatever class is defined here. This class does + not (and should not) subclass L<OpenInteract2::Action>, typically it + just adds some boxes for later processing. + + =back + =head1 ACTIONS |
From: Chris W. <la...@us...> - 2005-09-24 14:00:29
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_box/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17094/template Modified Files: admin_tools_box.tmpl Log Message: fix systemdoc url Index: admin_tools_box.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_box/template/admin_tools_box.tmpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_tools_box.tmpl 29 Mar 2005 02:35:47 -0000 1.8 --- admin_tools_box.tmpl 24 Sep 2005 14:00:22 -0000 1.9 *************** *** 9,13 **** tmpl_list_url = OI.make_url( ACTION = 'template' ); tmpl_new_url = OI.make_url( ACTION = 'template', TASK = 'display_add'); ! docs_url = OI.make_url( ACTION = 'systemdoc', TASK = 'list' ); theme_list_url = OI.make_url( ACTION = 'theme', TASK = 'list' ); theme_new_url = OI.make_url( ACTION = 'theme', TASK = 'display_add' ); --- 9,13 ---- tmpl_list_url = OI.make_url( ACTION = 'template' ); tmpl_new_url = OI.make_url( ACTION = 'template', TASK = 'display_add'); ! docs_url = OI.make_url( ACTION = 'systemdoc' ); theme_list_url = OI.make_url( ACTION = 'theme', TASK = 'list' ); theme_new_url = OI.make_url( ACTION = 'theme', TASK = 'display_add' ); |
From: Chris W. <la...@us...> - 2005-09-23 05:01:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/system_doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1030 Modified Files: package.ini Changes Log Message: OIN-156: add OI2::Manual, OI2::App, SPOPS::Manual and Template::Manual trees to the viewable modules; removed some old package documentation stuff; streamlined the pod finding (lots of caching); added page demarcation class divs to the templates Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/package.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.ini 1 Mar 2005 03:27:16 -0000 1.2 --- package.ini 23 Sep 2005 05:00:55 -0000 1.3 *************** *** 1,5 **** [package] name = system_doc ! version = 2.10 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ --- 1,5 ---- [package] name = system_doc ! version = 2.11 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/Changes,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Changes 1 Mar 2005 03:27:16 -0000 1.11 --- Changes 23 Sep 2005 05:00:55 -0000 1.12 *************** *** 1,4 **** --- 1,10 ---- Revision history for OpenInteract package system_doc. + 2.11 Fri Sep 23 00:09:40 EDT 2005 + + OIN-156: Be able to display OI2::Manual::*, OI2::App::*, + SPOPS::Manual::*, Template::Manual::* along with the other + modules in the list + 2.10 Mon Feb 28 20:33:57 EST 2005 |
From: Chris W. <la...@us...> - 2005-09-23 05:01:08
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/system_doc/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1030/template Modified Files: system_doc_menu.tmpl module_listing.tmpl doc_display.tmpl Log Message: OIN-156: add OI2::Manual, OI2::App, SPOPS::Manual and Template::Manual trees to the viewable modules; removed some old package documentation stuff; streamlined the pod finding (lots of caching); added page demarcation class divs to the templates Index: system_doc_menu.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/template/system_doc_menu.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** system_doc_menu.tmpl 1 Mar 2005 03:27:17 -0000 1.5 --- system_doc_menu.tmpl 23 Sep 2005 05:00:55 -0000 1.6 *************** *** 10,15 **** module = 'Template::Manual' ); module_url = OI.make_url( ACTION = 'systemdoc', ! TASK = 'module_list', ! view = 'general' ); -%] <h2>[% MSG( 'sys_doc.menu.title' ) %]</h2> --- 10,16 ---- module = 'Template::Manual' ); module_url = OI.make_url( ACTION = 'systemdoc', ! TASK = 'module_list' ); -%] ! ! <div class="demarcatePage"> <h2>[% MSG( 'sys_doc.menu.title' ) %]</h2> *************** *** 18,19 **** --- 19,22 ---- <p>[% MSG( 'sys_doc.menu.module', module_url ) %]</p> + + </div> \ No newline at end of file Index: module_listing.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/template/module_listing.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** module_listing.tmpl 9 Jun 2004 03:46:49 -0000 1.5 --- module_listing.tmpl 23 Sep 2005 05:00:55 -0000 1.6 *************** *** 4,7 **** --- 4,9 ---- cell_width = '50%'; -%] + <div class="demarcatePage"> + <h2>[% MSG( 'sys_doc.module.title' ) %]</h2> *************** *** 42,43 **** --- 44,47 ---- [% END %] + + </div> <!-- demarcatePage --> \ No newline at end of file Index: doc_display.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/template/doc_display.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** doc_display.tmpl 1 Mar 2005 03:27:17 -0000 1.4 --- doc_display.tmpl 23 Sep 2005 05:00:55 -0000 1.5 *************** *** 1,7 **** ! [%- index_url = OI.make_url( ACTION = 'systemdoc', TASK = 'list' ); ! module_url = OI.make_url( ACTION = 'systemdoc', TASK = 'module_list' ) -%] [%- PROCESS error_message %] <p align="center" bgcolor="#eeeeee"> <a href="[% index_url %]">[% MSG( 'sys_doc.info.system_doc' ) %]</a> | --- 1,10 ---- ! [%- index_url = OI.make_url( ACTION = 'systemdoc', TASK = 'home' ); ! module_url = OI.make_url( ACTION = 'systemdoc', TASK = 'module_list' ); ! OI.page_title( title ); -%] [%- PROCESS error_message %] + <div class="demarcatePage"> + <p align="center" bgcolor="#eeeeee"> <a href="[% index_url %]">[% MSG( 'sys_doc.info.system_doc' ) %]</a> | *************** *** 9,11 **** </p> ! [% content %] \ No newline at end of file --- 12,16 ---- </p> ! [% content %] ! ! </div> <!-- demarcatePage --> \ No newline at end of file |
From: Chris W. <la...@us...> - 2005-09-23 05:01:05
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/system_doc/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1030/OpenInteract2/Action Modified Files: SystemDoc.pm Log Message: OIN-156: add OI2::Manual, OI2::App, SPOPS::Manual and Template::Manual trees to the viewable modules; removed some old package documentation stuff; streamlined the pod finding (lots of caching); added page demarcation class divs to the templates Index: SystemDoc.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/OpenInteract2/Action/SystemDoc.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SystemDoc.pm 18 Mar 2005 04:09:47 -0000 1.15 --- SystemDoc.pm 23 Sep 2005 05:00:55 -0000 1.16 *************** *** 5,8 **** --- 5,9 ---- use strict; use base qw( OpenInteract2::Action ); + use File::Spec::Functions qw( catdir catfile ); use Log::Log4perl qw( get_logger ); use OpenInteract2::Constants qw( :log ); *************** *** 15,28 **** my ( $log ); ! my ( %POD_CACHE ); - sub list { - my ( $self ) = @_; - return $self->generate_content( - {}, { name => 'system_doc::system_doc_menu' } ); - } ! # TODO: Get SPOPS|OI2::Manual stuff in here sub module_list { --- 16,37 ---- my ( $log ); ! # class variable, holds something like: ! # OpenInteract2::Action => /usr/lib/perl5/site_perl/.../OpenInteract2/Action.pm ! my %POD_CACHE = (); + # Classpaths we want to manually find and add for viewing + my @check_subclass = ( + [ qw/ OpenInteract2 App / ], + [ qw/ OpenInteract2 Manual / ], + [ qw/ SPOPS Manual / ], + [ qw/ Template Manual / ], + ); ! ! sub home { ! my ( $self ) = @_; ! return $self->generate_content(); ! } sub module_list { *************** *** 30,77 **** $log ||= get_logger( LOG_APP ); ! # Now sort INC and chop up the files into packages ! my %this_inc = %INC; ! my @top = (); ! my $count = -1; ! my $curr_parent = undef; ! foreach my $full_pkg ( sort keys %this_inc ) { ! next unless ( $full_pkg =~ /\.pm$/ ); ! my ( $first ) = split /\//, $full_pkg; ! if ( $first ne $curr_parent ) { ! $count++; $log->is_debug && ! $log->debug( "First item != parent: ", ! "($first) / ($curr_parent)" ); ! $curr_parent = $first; ! $curr_parent =~ s/\.pm$//; ! $top[ $count ] = [ $curr_parent, [] ]; } ! $log->is_debug && ! $log->debug( "Found package $full_pkg" ); ! push @{ $top[ $count ]->[1] }, _colonify( $full_pkg ); } $log->is_debug && ! $log->debug( "# module parents found: ", scalar @top ); ! return $self->generate_content( ! { module_list => \@top }, ! { name => 'system_doc::module_listing' } ); ! } ! ! ! sub _colonify { ! my ( $text ) = @_; ! $text =~ s|\.pm$||; ! $text =~ s|/|::|g; ! return $text; ! } ! ! ! sub _uncolonify { ! my ( $text, $is_pod ) = @_; ! $text =~ s|::|/|g; ! my $ext = ( $is_pod ) ? '.pod' : '.pm'; ! return "$text$ext"; } --- 39,72 ---- $log ||= get_logger( LOG_APP ); ! # Copy %INC plus manual items to local cache ! unless ( keys %POD_CACHE ) { ! $self->_read_classpath(); ! } ! my @top_level = (); ! # and group the modules into sections, with the top-level ! # namespace as the first item and an arrayref of all children as ! # the second ! ! my @curr_group = (); ! foreach my $module ( sort keys %POD_CACHE ) { ! my ( $namespace ) = split /::/, $module; ! if ( $namespace ne $curr_group[0] ) { $log->is_debug && ! $log->debug( "Module ($namespace) != parent ($curr_group[0])" ); ! if ( ref $curr_group[1] ) { ! push @top_level, [ @curr_group ]; ! } ! @curr_group = ( $namespace, [] ); } ! push @{ $curr_group[1] }, $module; ! } ! if ( ref $curr_group[1] ) { ! push @top_level, \@curr_group; } $log->is_debug && ! $log->debug( "# module parents found: ", scalar @top_level ); ! return $self->generate_content({ module_list => \@top_level }); } *************** *** 80,232 **** my ( $self ) = @_; $log ||= get_logger( LOG_APP ); ! my $request = CTX->request; ! my %params = map { $_ => '' } ! qw( pod_file html_file text_file title error ); ! # If this is a package, display the doc ! my $package_spec = $request->param( 'package' ); ! if ( $package_spec ) { ! $self->_display_package_params( $package_spec, \%params ); } else { ! my $module = $self->param( 'module' ) ! || $request->param( 'module' ); ! $self->_display_module_params( $module, \%params ); } - my ( $content ); - - if ( -f $params{pod_file} ) { - $content = $self->_show_pod( \%params ); - } ! elsif ( -f $params{html_file} ) { ! $content = $self->_show_html( \%params ); ! } ! elsif ( -f $params{text_file} ) { ! $content = $self->_show_text( \%params ); ! } ! else { ! return "<p>$params{error}.</p>"; ! } ! unless ( $content ) { ! return '<p>Filename found but no content in file.</p>'; ! } ! return $self->generate_content( ! { content => $content }, ! { name => 'system_doc::doc_display' } ); ! } ! sub _display_package_params { ! my ( $self, $package_spec, $params ) = @_; ! my ( $package_name, $ver ) = ! OpenInteract2::Package->parse_full_name( $package_spec ); ! my $request = CTX->request; ! my $doc = $request->param( 'doc' ); ! my $repos = CTX->repository; ! if ( $doc =~ /\.(html|txt|pod)$/ ) { ! my $full_filename = $repos->find_file( $package_name, $doc ); ! $log->is_debug && ! $log->debug( "Found [$full_filename] in [$package_name]" ); ! $params->{pod_file} = $full_filename if ( $doc =~ /\.pod$/ ); ! $params->{html_file} = $full_filename if ( $doc =~ /\.html$/ ); ! $params->{text_file} = $full_filename if ( $doc =~ /\.txt$/ ); ! $params->{title} = $self->_msg( 'sys_doc.package.doc_title', $package_name ); ! $params->{error} = $self->_msg( 'sys_doc.error.cannot_find_package_doc', $doc ); } } - sub _display_module_params { - my ( $self, $module, $params ) = @_; - - # ewww! ick! - # TODO: Can we programmatically use Pod::Perldoc to do this? - $params->{pod_file} = $POD_CACHE{ $module } || `perldoc -l $module`; - - chomp $params->{pod_file}; - if ( $params->{pod_file} ) { - $log->is_info && - $log->info( "Found [$params->{pod_file}] from [$module]" ); - } - else { - $params->{pod_file} = $INC{ _uncolonify( $module ) }; - $log->is_info && - $log->info( "Found [$params->{pod_file}] from %INC" ); - } - if ( -f $params->{pod_file} ) { - $POD_CACHE{ $module } = $params->{pod_file}; - } - $params->{title} = $self->_msg( 'sys_doc.module.doc_title', $module ); - $params->{error} = $self->_msg( 'sys_doc.error.cannot_find_module_doc', $module ); - } sub _show_pod { ! my ( $self, $params ) = @_; $log->is_debug && ! $log->debug( "Trying to view pod in [$params->{pod_file}]" ); my $parser = Pod::POM->new(); ! my $pom = $parser->parse( $params->{pod_file} ); unless ( $pom ) { $log->error( "Pod::POM did not return an object: ", $parser->error() ); ! my $msg = $self->_msg( 'sys_doc.error.pod_parse', $parser->error() ); ! return qq(<p>$msg</p>); } eval { require OpenInteract2::PodView }; if ( $@ ) { ! $log->error( "No POD viewer: $@" ); ! $self->add_error_key( 'sys_doc.error.pod_viewer', $@ ); ! return $self->_msg( 'sys_doc.pod.no_content' ); } my $content = eval { OpenInteract2::PodView->print( $pom ) }; if ( $@ ) { ! $log->error( "Failed to output html from pod: $@" ); ! return $self->_msg( 'sys_doc.pod.cannot_display_module', $@ ); } ! $content =~ s/^.*<BODY>//sm; ! $content =~ s|</BODY>.*$||sm; ! return $content; ! } ! ! sub _show_html { ! my ( $self, $params ) = @_; ! eval { open( HTML, $params->{html_file} ) || die $! }; ! if ( $@ ) { ! my $msg = $self->_msg( 'sys_doc.error.cannot_open_file', ! $params->{html_file}, $@ ); ! $log->error( $msg ); ! return "<p>$msg</p>"; } - my $content = join( '', <HTML> ); - close( HTML ); - $content =~ s/^.*<BODY>//sm; - $content =~ s|</BODY>.*$||sm; return $content; } - sub _show_text { - my ( $self, $params ) = @_; - eval { open( TEXT, $params->{text_file} ) || die $! }; - if ( $@ ) { - my $msg = $self->_msg( 'sys_doc.error.cannot_open_file', - $params->{text_file}, $@ ); - $log->error( $msg ); - return "<p>$msg</p>"; - } - my $content = join( '', <TEXT> ); - close( TEXT ); - return qq(<pre class="systemDocText">$content</pre>); - } - 1; __END__ =head1 NAME --- 75,204 ---- my ( $self ) = @_; $log ||= get_logger( LOG_APP ); + unless ( keys %POD_CACHE ) { + $self->_read_classpath(); + } + my $module = $self->param( 'module' ) + || CTX->request->param( 'module' ); ! my $pod_file = $POD_CACHE{ $module }; ! # Yuck -- running perldoc like this stinks: don't use it unless we ! # have to... ! # unless ( $pod_file ) { ! # $pod_file = `perldoc -l $module`; ! # chomp $pod_file; ! # } ! my ( $content ); ! if ( -f $pod_file ) { ! $content = $self->_show_pod( $pod_file ); } else { ! $self->add_error_key( ! 'sys_doc.error.cannot_find_module_doc', $module ! ); ! $content = ''; } + my $title = $self->_msg( 'sys_doc.module.doc_title', $module ); + return $self->generate_content({ + content => $content, title => $title + }); + } ! sub _read_classpath { ! my ( $self ) = @_; ! eval { ! # First, copy everything from %INC... ! while ( my ( $inc_module, $inc_path ) = each %INC ) { ! my $module = $inc_module; ! $module =~ s|\.(\w+)$||; ! $module =~ s|/|::|g; ! next if ( $module =~ m|^::| ); ! $POD_CACHE{ $module } = $inc_path; ! $log->info( "POD cache from INC: $module => $inc_path" ); ! } ! my @file_extensions = qw( .pm .pod ); ! # Then seek out our modules/POD that won't be in %INC... ! foreach my $top_dir ( @INC ) { ! foreach my $subclass_info ( @check_subclass ) { ! # Finds stuff like OpenInteract2/Manual.pod ! foreach my $ext ( @file_extensions ) { ! my $top_file = ! catfile( $top_dir, @{ $subclass_info } ) . $ext; ! if ( -f $top_file ) { ! my $module = join( '::', @{ $subclass_info } ); ! $POD_CACHE{ $module } = $top_file; ! } ! } ! my $full_subclass_dir = ! catdir( $top_dir, @{ $subclass_info } ); ! next unless ( -d $full_subclass_dir ); ! opendir( INCDIR, $full_subclass_dir ) ! || die "Cannot read from '$full_subclass_dir': $!\n"; ! my @pod_from = grep /\.(pm|pod)$/, readdir( INCDIR ); ! closedir( INCDIR ); ! foreach my $pod_src ( @pod_from ) { ! my $full_path = catfile( $full_subclass_dir, $pod_src ); ! $pod_src =~ s/\.\w+$//; ! my $pod_key = join( '::', @{ $subclass_info }, $pod_src ); ! $POD_CACHE{ $pod_key } ||= $full_path; ! $log->info( "POD cache from manual: $pod_key => $full_path" ); ! } ! } ! } ! }; ! if ( $@ ) { ! %POD_CACHE = (); ! die "Error reading modules from %INC: $@\n"; } } sub _show_pod { ! my ( $self, $pod_file ) = @_; $log->is_debug && ! $log->debug( "Trying to view pod in '$pod_file'" ); my $parser = Pod::POM->new(); ! my $pom = $parser->parse( $pod_file ); unless ( $pom ) { $log->error( "Pod::POM did not return an object: ", $parser->error() ); ! $self->add_error_key( 'sys_doc.error.pod_parse', $parser->error() ); ! return ''; } eval { require OpenInteract2::PodView }; if ( $@ ) { ! my $error = $@; ! $log->error( "No POD viewer: $error" ); ! $self->add_error_key( 'sys_doc.error.pod_viewer', $error ); ! return ''; } + my $content = eval { OpenInteract2::PodView->print( $pom ) }; if ( $@ ) { ! my $error = $@; ! $log->error( "Failed to output html from pod: $error" ); ! $self->add_error_key( ! 'sys_doc.pod.cannot_display_module', $error ); } ! else { ! $content =~ s/^.*<BODY>//sm; ! $content =~ s|</BODY>.*$||sm; } return $content; } 1; __END__ + =pod + =head1 NAME *************** *** 242,246 **** =head1 METHODS ! C<list()> List the OpenInteract system documentation and all the modules used by --- 214,222 ---- =head1 METHODS ! C<home()> ! ! Display main menu. ! ! C<module_list()> List the OpenInteract system documentation and all the modules used by *************** *** 248,253 **** C<SPOPS> modules first. - B<package_list()> - B<module_list()> --- 224,227 ---- *************** *** 290,291 **** --- 264,267 ---- Chris Winters E<lt>ch...@cw...E<gt> + + =cut |
From: Chris W. <la...@us...> - 2005-09-23 05:01:05
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/system_doc/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1030/conf Modified Files: action.ini Log Message: OIN-156: add OI2::Manual, OI2::App, SPOPS::Manual and Template::Manual trees to the viewable modules; removed some old package documentation stuff; streamlined the pod finding (lots of caching); added page demarcation class divs to the templates Index: action.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/system_doc/conf/action.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** action.ini 8 Jun 2003 16:15:29 -0000 1.3 --- action.ini 23 Sep 2005 05:00:55 -0000 1.4 *************** *** 2,7 **** class = OpenInteract2::Action::SystemDoc is_secure = yes ! task_default = list [systemdoc security] DEFAULT = READ --- 2,12 ---- class = OpenInteract2::Action::SystemDoc is_secure = yes ! task_default = home [systemdoc security] DEFAULT = READ + + [systemdoc template_source] + home = system_doc::system_doc_menu + display = system_doc::doc_display + module_list = system_doc::module_listing \ No newline at end of file |
From: Chris W. <la...@us...> - 2005-09-23 03:16:34
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17793 Modified Files: Package.pm Log Message: OIN-172: add README about where configuration is actually stored, and REALLY eliminate confusing by deleting the config files from the package directory Index: Package.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Package.pm 2 Apr 2005 23:42:21 -0000 1.59 --- Package.pm 23 Sep 2005 03:16:24 -0000 1.60 *************** *** 367,371 **** $installed_package->installed_date( scalar( localtime ) ); $installed_package->_install_html_and_widget_files_to_website; ! $installed_package->copy_configuration_to_website(); $log->is_info && $log->info( "Copied package files to website ok" ); --- 367,372 ---- $installed_package->installed_date( scalar( localtime ) ); $installed_package->_install_html_and_widget_files_to_website; ! my @conf_paths = $installed_package->copy_configuration_to_website(); ! $log->is_info && $log->info( "Copied package files to website ok" ); *************** *** 377,383 **** --- 378,393 ---- undef $tmp_package; chdir( $pwd ); + + # OIN-172: remove all files from pkg/foo-x.xx/conf and put + # README there (but only after everything else works ok) + $installed_package->_remove_package_conf_files( @conf_paths ); + return $installed_package; } + # copies $WEBSITE_DIR/pkg/foo-x.xx/conf/* -> $WEBSITE_DIR/conf/foo/* + # --> if dest file already exists and MD5 is different, we copy it + # to $WEBSITE_DIR/conf/foo/updates/* + sub copy_configuration_to_website { my ( $self ) = @_; *************** *** 393,396 **** --- 403,407 ---- my @to_checksum = (); my %checksums = $self->_read_conf_checksums( $dest_conf_dir ); + my @full_src_paths = (); FILE: foreach my $src_base ( @conf_files ) { *************** *** 412,417 **** --- 423,472 ---- push @to_checksum, $filename; } + push @full_src_paths, $src_path; } $self->_write_conf_checksums( $dest_conf_dir, @to_checksum ); + return @full_src_paths; + } + + sub _remove_package_conf_files { + my ( $self, @conf_paths ) = @_; + my $pkg_name = $self->name; + my $website_dir = $self->repository->website_dir; + my $package_dir = rel2abs( $self->directory ); + my $real_conf_dir = catdir( $website_dir, 'conf', $pkg_name ); + my $src_conf_readme = catfile( $package_dir, 'conf', 'README' ); + + # First, remove all conf files + foreach my $conf_file ( @conf_paths ) { + unlink( $conf_file ); + $log->is_debug && + $log->debug( "Cleaned package conf: $conf_file" ); + } + + # Now add a README + my $date = scalar( localtime ); + eval { + open( README, '>', $src_conf_readme ) + || die "write failed - $!\n"; + print README <<WRITEME; + README - Config for $pkg_name Package + (generated when package installed: $date) + + Configuration files for this package (such as SPOPS, + action, etc.) are in the directory: + + $real_conf_dir + + DO NOT put any files in this directory for configuration, + they will be silently ignored. + WRITEME + close( README ); + }; + if ( $@ ) { + $log->error( "Failed to write config README: $@" ); + } + $log->is_debug && + $log->debug( "Wrote README to $src_conf_readme ok" ); + return $src_conf_readme; } |
From: Chris W. <la...@us...> - 2005-09-22 04:11:06
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_template/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6593 Modified Files: template_list.tmpl template_form.tmpl Log Message: add page div demarcations Index: template_list.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_template/template/template_list.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** template_list.tmpl 18 Feb 2004 05:23:09 -0000 1.6 --- template_list.tmpl 22 Sep 2005 04:10:57 -0000 1.7 *************** *** 4,10 **** <div align="center"> - [% PROCESS error_message; PROCESS status_message; -%] <h2>[% MSG( 'base_template.list.title' ) %]</h2> --- 4,12 ---- <div align="center"> [% PROCESS error_message; PROCESS status_message; -%] + </div> + + <div align="center" class="demarcatePage"> <h2>[% MSG( 'base_template.list.title' ) %]</h2> Index: template_form.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_template/template/template_form.tmpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** template_form.tmpl 18 Feb 2004 05:23:09 -0000 1.7 --- template_form.tmpl 22 Sep 2005 04:10:57 -0000 1.8 *************** *** 11,17 **** <div align="center"> - [* PROCESS error_message; PROCESS status_message; -*] <h2>[* title *]</h2> --- 11,19 ---- <div align="center"> [* PROCESS error_message; PROCESS status_message; -*] + </div> + + <div align="center" class="demarcatePage"> <h2>[* title *]</h2> |
From: Chris W. <la...@us...> - 2005-09-22 04:08:21
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6150 Modified Files: package.ini Changes Log Message: hopefully take care of those intermittent errors in OI2::Action::SiteTemplate where it complained that OI2::SiteTemplate wasn't loaded (couldn't find method 'create_name'...) Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_template/package.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.ini 1 Mar 2005 03:28:38 -0000 1.2 --- package.ini 22 Sep 2005 04:08:07 -0000 1.3 *************** *** 1,5 **** [package] name = base_template ! version = 3.17 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ --- 1,5 ---- [package] name = base_template ! version = 3.18 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_template/Changes,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Changes 1 Mar 2005 03:28:38 -0000 1.18 --- Changes 22 Sep 2005 04:08:07 -0000 1.19 *************** *** 1,4 **** --- 1,9 ---- Revision history for OpenInteract package base_template. + 3.18 Thu Sep 22 00:05:27 EDT 2005 + + Hardwire 'OI2::SiteTemplate' class name into + OI2::Action::SiteTemplate to get rid of intermittent errors... + 3.17 Mon Feb 28 20:33:57 EST 2005 |
From: Chris W. <la...@us...> - 2005-09-22 04:08:19
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/base_template/OpenInteract2/Action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6150/OpenInteract2/Action Modified Files: SiteTemplate.pm Log Message: hopefully take care of those intermittent errors in OI2::Action::SiteTemplate where it complained that OI2::SiteTemplate wasn't loaded (couldn't find method 'create_name'...) Index: SiteTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/base_template/OpenInteract2/Action/SiteTemplate.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SiteTemplate.pm 5 Dec 2004 08:51:20 -0000 1.14 --- SiteTemplate.pm 22 Sep 2005 04:08:07 -0000 1.15 *************** *** 8,11 **** --- 8,12 ---- use OpenInteract2::Constants qw( :log ); use OpenInteract2::Context qw( CTX ); + use OpenInteract2::SiteTemplate; use SPOPS::Secure qw( SEC_LEVEL_WRITE ); *************** *** 21,30 **** my $website_dir = CTX->lookup_directory( 'website' ); my $packages = CTX->repository->fetch_all_packages(); - my $tmpl_class = CTX->lookup_class( 'template' ); my %templates = (); foreach my $pkg ( @{ $packages } ) { eval { $templates{ $pkg->name } = ! $tmpl_class->fetch_by_package( $pkg->name ); }; if ( $@ ) { --- 22,30 ---- my $website_dir = CTX->lookup_directory( 'website' ); my $packages = CTX->repository->fetch_all_packages(); my %templates = (); foreach my $pkg ( @{ $packages } ) { eval { $templates{ $pkg->name } = ! OpenInteract2::SiteTemplate->fetch_by_package( $pkg->name ); }; if ( $@ ) { *************** *** 36,40 **** # This looks weird but we're just finding the global templates eval { ! $templates{ '' } = $tmpl_class->fetch_by_package( '' ) }; if ( $@ ) { --- 36,41 ---- # This looks weird but we're just finding the global templates eval { ! $templates{ '' } = ! OpenInteract2::SiteTemplate->fetch_by_package( '' ) }; if ( $@ ) { *************** *** 64,68 **** $self->_set_package_info( \%params ); - my $tmpl_class = CTX->lookup_class( 'template' ); my $request = CTX->request; my $template = $self->param( 'template' ); --- 65,68 ---- *************** *** 71,76 **** my $name = $request->param( 'name' ); if ( $name ) { ! my $fq_name = $tmpl_class->create_name( $package, $name ); ! $template = eval { $tmpl_class->fetch( $fq_name ) }; if ( $@ || ! $template ) { if ( $@ ) { --- 71,79 ---- my $name = $request->param( 'name' ); if ( $name ) { ! my $fq_name = ! OpenInteract2::SiteTemplate->create_name( $package, $name ); ! $template = eval { ! OpenInteract2::SiteTemplate->fetch( $fq_name ) ! }; if ( $@ || ! $template ) { if ( $@ ) { *************** *** 94,101 **** sub display_add { my ( $self ) = @_; - my $tmpl_class = CTX->lookup_class( 'template' ); # We might have one leftover from a failed 'add'... ! my $template = $self->param( 'template' ) || $tmpl_class->new; my %params = ( tmpl => $template, --- 97,104 ---- sub display_add { my ( $self ) = @_; # We might have one leftover from a failed 'add'... ! my $template = $self->param( 'template' ) ! || OpenInteract2::SiteTemplate->new; my %params = ( tmpl => $template, *************** *** 121,127 **** my $name = $request->param( 'name_original' ); ! my $tmpl_class = CTX->lookup_class( 'template' ); ! my $fq_name = $tmpl_class->create_name( $package, $name ); ! my $template = eval { $tmpl_class->fetch( $fq_name ) }; if ( $@ or ! $template ) { if ( $@ ) { --- 124,132 ---- my $name = $request->param( 'name_original' ); ! my $fq_name = OpenInteract2::SiteTemplate ! ->create_name( $package, $name ); ! my $template = eval { ! OpenInteract2::SiteTemplate->fetch( $fq_name ) ! }; if ( $@ or ! $template ) { if ( $@ ) { *************** *** 162,167 **** my $request = CTX->request; ! my $tmpl_class = CTX->lookup_class( 'template' ); ! my $template = $tmpl_class->new; my $package = $request->param( 'package' ); --- 167,171 ---- my $request = CTX->request; ! my $template = OpenInteract2::SiteTemplate->new; my $package = $request->param( 'package' ); *************** *** 173,178 **** $self->param( template => $template ); ! my $fq_name = $tmpl_class->create_name( $package, $name ); ! my $existing_template = eval { $tmpl_class->fetch( $fq_name ) }; if ( $existing_template ) { $self->add_error_key( 'base_template.error.create_exists', $fq_name ); --- 177,185 ---- $self->param( template => $template ); ! my $fq_name = OpenInteract2::SiteTemplate ! ->create_name( $package, $name ); ! my $existing_template = eval { ! OpenInteract2::SiteTemplate->fetch( $fq_name ) ! }; if ( $existing_template ) { $self->add_error_key( 'base_template.error.create_exists', $fq_name ); *************** *** 208,214 **** my $package = $request->param( 'package' ); my $name = $request->param( 'name' ); ! my $tmpl_class = CTX->lookup_class( 'template' ); ! $fq_name = $tmpl_class->create_name( $package, $name ); ! $template = eval { $tmpl_class->fetch( $fq_name ) }; if ( $@ ) { $self->add_error_key( 'base_template.error.fetch', $fq_name, $@ ); --- 215,222 ---- my $package = $request->param( 'package' ); my $name = $request->param( 'name' ); ! $fq_name = OpenInteract2::SiteTemplate->create_name( $package, $name ); ! $template = eval { ! OpenInteract2::SiteTemplate->fetch( $fq_name ) ! }; if ( $@ ) { $self->add_error_key( 'base_template.error.fetch', $fq_name, $@ ); |
From: Chris W. <la...@us...> - 2005-09-22 03:59:40
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4695 Modified Files: MainTemplate.pm Log Message: don't die if we can't merge the content... Index: MainTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller/MainTemplate.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MainTemplate.pm 22 Sep 2005 03:43:39 -0000 1.11 --- MainTemplate.pm 22 Sep 2005 03:59:31 -0000 1.12 *************** *** 100,109 **** }; if ( $@ ) { ! my $msg = "Content generator failed to execute: $@"; $log->error( $msg ); ! oi_error $msg; } ! $log->is_debug && ! $log->debug( "Generated content ok, setting to response" ); CTX->response->content( \$full_content ); return; --- 100,112 ---- }; if ( $@ ) { ! my $msg = "Content generator failed to execute ($@); will " . ! "return previously-generated content..."; $log->error( $msg ); ! $full_content = $content; } ! else { ! $log->is_debug && $log->debug( "Generated content ok..." ); ! } ! $log->is_debug && $log->debug( "Setting content to response" ); CTX->response->content( \$full_content ); return; |
From: Chris W. <la...@us...> - 2005-09-22 03:52:01
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3515/template Modified Files: search_results.tmpl Log Message: ensure page hasa title Index: search_results.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/template/search_results.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** search_results.tmpl 16 Feb 2004 18:04:14 -0000 1.2 --- search_results.tmpl 22 Sep 2005 03:51:52 -0000 1.3 *************** *** 1,8 **** ! [%- DEFAULT theme = OI.theme_properties -%] [%- PROCESS error_message -%] [%- PROCESS status_message -%] ! <div align="center"> <h2>[% MSG( 'whats_new.results.title' ) %]</h2> --- 1,8 ---- ! [%- OI.page_title( MSG( 'whats_new.results.title' ) ) -%] [%- PROCESS error_message -%] [%- PROCESS status_message -%] ! <div align="center" class="demarcatePage"> <h2>[% MSG( 'whats_new.results.title' ) %]</h2> |
From: Chris W. <la...@us...> - 2005-09-22 03:51:49
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3474/conf Modified Files: action.ini Log Message: fix c_remove param Index: action.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/conf/action.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** action.ini 22 Sep 2005 03:37:54 -0000 1.5 --- action.ini 22 Sep 2005 03:51:41 -0000 1.6 *************** *** 24,27 **** --- 24,29 ---- c_add_return_url = /new/ + c_remove_task = search + [new security] DEFAULT = WRITE |
From: Chris W. <la...@us...> - 2005-09-22 03:43:47
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2309 Modified Files: MainTemplate.pm Log Message: don't lose $@ Index: MainTemplate.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Controller/MainTemplate.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MainTemplate.pm 21 Sep 2005 04:11:19 -0000 1.10 --- MainTemplate.pm 22 Sep 2005 03:43:39 -0000 1.11 *************** *** 47,55 **** my $content = eval { $action->execute }; if ( $@ ) { ! $log->error( "Caught exception from action: $@" ); # TODO: Set this error message from config file $self->add_content_param( title => 'Action execution error' ); - $content = $@; } --- 47,56 ---- my $content = eval { $action->execute }; if ( $@ ) { ! my $error = $@; ! $log->error( "Caught exception from action: $error" ); ! $content = $error; # TODO: Set this error message from config file $self->add_content_param( title => 'Action execution error' ); } |
From: Chris W. <la...@us...> - 2005-09-22 03:38:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1265/conf Modified Files: spops_whats_new.ini action.ini Log Message: remove object-level security, ensure app security is of the 'only allowed' variety; use URL-params where possible; try to eliminate double adding... Index: spops_whats_new.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/conf/spops_whats_new.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** spops_whats_new.ini 12 Jun 2004 23:39:34 -0000 1.3 --- spops_whats_new.ini 22 Sep 2005 03:37:54 -0000 1.4 *************** *** 5,9 **** field_discover = yes id_field = new_id ! is_secure = yes increment_field = yes sequence_name = oi_whats_new_seq --- 5,9 ---- field_discover = yes id_field = new_id ! is_secure = no increment_field = yes sequence_name = oi_whats_new_seq *************** *** 33,37 **** [whats_new display] ! ACTION = new ! TASK = display ! --- 33,39 ---- [whats_new display] ! ACTION = new ! TASK = display ! TASK_EDIT = display_form ! URL_PARAMS = new_id ! date = posted_on Index: action.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/conf/action.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** action.ini 25 Sep 2004 18:20:32 -0000 1.4 --- action.ini 22 Sep 2005 03:37:54 -0000 1.5 *************** *** 25,30 **** [new security] ! DEFAULT = NONE ! display = WRITE ! edit = WRITE ! remove = WRITE --- 25,31 ---- [new security] ! DEFAULT = WRITE ! search = NONE ! ! [new url_additional] ! DEFAULT = new_id |
From: Chris W. <la...@us...> - 2005-09-22 03:38:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1265 Modified Files: package.ini Changes Log Message: remove object-level security, ensure app security is of the 'only allowed' variety; use URL-params where possible; try to eliminate double adding... Index: package.ini =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/package.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package.ini 1 Mar 2005 03:28:44 -0000 1.2 --- package.ini 22 Sep 2005 03:37:54 -0000 1.3 *************** *** 1,5 **** [package] name = whats_new ! version = 2.12 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ --- 1,5 ---- [package] name = whats_new ! version = 2.13 author = Chris Winters (ch...@cw...) url = http://www.openinteract.org/ Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/Changes,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Changes 1 Mar 2005 03:28:43 -0000 1.14 --- Changes 22 Sep 2005 03:37:54 -0000 1.15 *************** *** 1,4 **** --- 1,10 ---- Revision history for OpenInteract package whats_new. + 2.13 Wed Sep 21 23:35:19 EDT 2005 + + Use URL params where possible; remove object security from 'new' + objects, relying on application security instead; ensure we + don't double-add the same object to the lis + 2.12 Mon Feb 28 20:33:57 EST 2005 |
From: Chris W. <la...@us...> - 2005-09-22 03:38:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1265/OpenInteract2 Modified Files: WhatsNewTrack.pm Log Message: remove object-level security, ensure app security is of the 'only allowed' variety; use URL-params where possible; try to eliminate double adding... Index: WhatsNewTrack.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/OpenInteract2/WhatsNewTrack.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WhatsNewTrack.pm 18 Mar 2005 04:09:47 -0000 1.5 --- WhatsNewTrack.pm 22 Sep 2005 03:37:54 -0000 1.6 *************** *** 20,24 **** $log ||= get_logger( LOG_APP ); my $obj_class = ref $class || $class; ! push @{ $rs_table->{post_save_action} }, \&add_object_to_new; push @{ $rs_table->{post_remove_action} }, \&remove_object_from_new; $log->info( "What's new functionality installed for $obj_class" ); --- 20,24 ---- $log ||= get_logger( LOG_APP ); my $obj_class = ref $class || $class; ! push @{ $rs_table->{post_save_action} }, \&add_object_to_new; push @{ $rs_table->{post_remove_action} }, \&remove_object_from_new; $log->info( "What's new functionality installed for $obj_class" ); *************** *** 38,41 **** --- 38,45 ---- return 1; } + if ( $self->{tmp_new_track} eq 'yes' ) { + $log->info( "Not creating What's New item, this one already added" ); + return 1; + } my $object_id = $self->id; my $info = $self->object_description; *************** *** 64,68 **** } else { ! return $new; } } --- 68,73 ---- } else { ! $self->{tmp_new_track} = 'yes'; ! return 1; } } |
From: Chris W. <la...@us...> - 2005-09-22 03:38:11
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/whats_new/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1265/template Modified Files: list.tmpl form.tmpl Log Message: remove object-level security, ensure app security is of the 'only allowed' variety; use URL-params where possible; try to eliminate double adding... Index: list.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/template/list.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** list.tmpl 25 Sep 2004 18:20:32 -0000 1.3 --- list.tmpl 22 Sep 2005 03:37:53 -0000 1.4 *************** *** 11,14 **** --- 11,17 ---- ] ) -%] + [%# NOTE: items where active == 'no' are filtered out for + non-admins, so they never even get this far... %] + [%- count = 1 -%] [% WHILE ( new_item = iterator.get_next ) %] *************** *** 23,29 **** <td>[% new_item.listing_type %] </td> <td><a href="[% new_item.url %]">[% new_item.title %]</a></td> ! [%- IF new_item.tmp_security_level >= OI.security_level.write -%] ! [% edit_url = OI.make_url( ACTION = 'new' TASK = 'display_form', ! new_id = new_item.id ) %] <td><a href="[% edit_url %]">[% MSG( 'global.label.edit' ) %]</a></td> [% ELSE -%] --- 26,32 ---- <td>[% new_item.listing_type %] </td> <td><a href="[% new_item.url %]">[% new_item.title %]</a></td> ! [%- IF ACTION.task_security_allowed( 'display_form' ) -%] ! [% edit_url = OI.make_url( ACTION = 'new', TASK = 'display_form', ! URL_PARAMS = new_item.id ) %] <td><a href="[% edit_url %]">[% MSG( 'global.label.edit' ) %]</a></td> [% ELSE -%] Index: form.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/whats_new/template/form.tmpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** form.tmpl 25 Sep 2004 18:20:32 -0000 1.3 --- form.tmpl 22 Sep 2005 03:37:53 -0000 1.4 *************** *** 6,13 **** ? MSG( 'whats_new.form.title_update' ) : MSG( 'whats_new.form.title_new' ); ! OI.page_title( title ); -%] ! ! [%- remove_url = OI.make_url( ACTION = 'new', TASK = 'remove', ! new_id = whats_new.id ) -%] <p align="right"> [% MSG( 'whats_new.form.remove_link', remove_url ) %] --- 6,12 ---- ? MSG( 'whats_new.form.title_update' ) : MSG( 'whats_new.form.title_new' ); ! OI.page_title( title ); ! remove_url = OI.make_url( ACTION = 'new', TASK = 'remove', ! URL_PARAMS = whats_new.id ) -%] <p align="right"> [% MSG( 'whats_new.form.remove_link', remove_url ) %] *************** *** 60,64 **** [%- count = count + 1 -%] [% INCLUDE label_form_text_row( label_key = 'whats_new.info.object_id', ! name = 'object_id', value = whats_new.object_id, size = 40, maxlength = 150 ) -%] --- 59,64 ---- [%- count = count + 1 -%] [% INCLUDE label_form_text_row( label_key = 'whats_new.info.object_id', ! name = 'object_id', ! value = whats_new.object_id, size = 40, maxlength = 150 ) -%] |
From: Chris W. <la...@us...> - 2005-09-22 03:22:13
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/news/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31637 Modified Files: news_form.tmpl Log Message: see tags when editing/creating news Index: news_form.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/news/template/news_form.tmpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** news_form.tmpl 21 Sep 2005 03:39:24 -0000 1.10 --- news_form.tmpl 22 Sep 2005 03:21:52 -0000 1.11 *************** *** 5,8 **** --- 5,9 ---- OI.page_title( title ); OI.box_add( 'news_tools_box', news = news ); + OI.box_add( 'all_tags_box' ); DEFAULT theme = OI.theme_properties; PROCESS error_message -%] |
From: Chris W. <la...@us...> - 2005-09-22 03:19:18
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31190 Modified Files: tagged_objects_page.tmpl Log Message: view more tags... Index: tagged_objects_page.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template/tagged_objects_page.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tagged_objects_page.tmpl 22 Sep 2005 03:13:46 -0000 1.2 --- tagged_objects_page.tmpl 22 Sep 2005 03:19:09 -0000 1.3 *************** *** 1,3 **** ! [% PROCESS error_message %] <div class="demarcatePage"> --- 1,4 ---- ! [%- OI.box_add( 'all_tags_box' ); ! PROCESS error_message %] <div class="demarcatePage"> |
From: Chris W. <la...@us...> - 2005-09-22 03:14:07
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30473/template Modified Files: tags_for_object.tmpl Log Message: make it work Index: tags_for_object.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template/tags_for_object.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tags_for_object.tmpl 21 Sep 2005 04:05:58 -0000 1.1 --- tags_for_object.tmpl 22 Sep 2005 03:13:57 -0000 1.2 *************** *** 1,7 **** ! [% MSG( 'object_tags.label.tags' ) -%] ! [%- FOREACH tag_info = tag_and_count; tagged_objects_url = OI.make_url( ACTION = 'tags', TASK = 'show_tagged_objects', ! tag = tag_count.0 ); -%] ! <a href="[% tagged_objects_url %]">[% tag_count.0 %]</a> [% END -%] \ No newline at end of file --- 1,7 ---- ! [% MSG( 'object_tags.label.tags' ) %] ! [% FOREACH tag_info = tag_and_count; tagged_objects_url = OI.make_url( ACTION = 'tags', TASK = 'show_tagged_objects', ! tag = tag_info.0 ); %] ! <a href="[% tagged_objects_url %]">[% tag_info.0 %]</a> [% END -%] \ No newline at end of file |
From: Chris W. <la...@us...> - 2005-09-22 03:13:54
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30428/template Modified Files: tagged_objects_page.tmpl Log Message: make it look nicer... Index: tagged_objects_page.tmpl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/template/tagged_objects_page.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tagged_objects_page.tmpl 29 Mar 2005 05:10:38 -0000 1.1 --- tagged_objects_page.tmpl 22 Sep 2005 03:13:46 -0000 1.2 *************** *** 1,4 **** --- 1,6 ---- [% PROCESS error_message %] + <div class="demarcatePage"> + <h2>Objects by Tag</h2> *************** *** 7,9 **** <p> [% INCLUDE object_tags::tagged_objects %] ! </p> \ No newline at end of file --- 9,13 ---- <p> [% INCLUDE object_tags::tagged_objects %] ! </p> ! ! </div> \ No newline at end of file |
From: Chris W. <la...@us...> - 2005-09-22 03:13:43
|
Update of /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/TT2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30399/OpenInteract2/TT2 Modified Files: ObjectTagPlugin.pm Log Message: don't use class method... Index: ObjectTagPlugin.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/pkg/object_tags/OpenInteract2/TT2/ObjectTagPlugin.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectTagPlugin.pm 21 Sep 2005 04:03:58 -0000 1.1 --- ObjectTagPlugin.pm 22 Sep 2005 03:13:34 -0000 1.2 *************** *** 28,32 **** sub lookup_tags { my ( $self, $object ) = @_; ! return OpenInteract2::TaggableObject->fetch_my_tags( $object ); } --- 28,32 ---- sub lookup_tags { my ( $self, $object ) = @_; ! return OpenInteract2::TaggableObject::fetch_my_tags( $object ); } |
Update of /cvsroot/openinteract/OpenInteract2/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7816 Modified Files: utils.pl repository.t manage_list_packages.t manage_list_objects.t manage_list_actions.t context.t 00_manage_create_website.t Log Message: fix tests for new package Index: utils.pl =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/utils.pl,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** utils.pl 4 Mar 2005 03:11:21 -0000 1.100 --- utils.pl 21 Sep 2005 12:33:54 -0000 1.101 *************** *** 44,51 **** sub main::get_packages { ! return qw( base base_box base_error base_group base_page ! base_security base_template base_theme base_user ! comments full_text lookup news object_activity ! system_doc whats_new ); } --- 44,52 ---- sub main::get_packages { ! return @{ OpenInteract2::Manage->SYSTEM_PACKAGES() }; ! } ! ! sub main::get_num_packages { ! return scalar @{ OpenInteract2::Manage->SYSTEM_PACKAGES() }; } Index: repository.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/repository.t,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** repository.t 28 Feb 2005 01:02:38 -0000 1.11 --- repository.t 21 Sep 2005 12:33:54 -0000 1.12 *************** *** 92,96 **** 'Correctly threw exception with no name to fetch package' ); ! is( scalar( @{ $repos->fetch_all_packages } ), 16, 'Fetched the correct number of packages' ); --- 92,96 ---- 'Correctly threw exception with no name to fetch package' ); ! is( scalar( @{ $repos->fetch_all_packages } ), get_num_packages(), 'Fetched the correct number of packages' ); *************** *** 115,119 **** is( $pkg_check_add->version, $package_add->version, '...refetched version matches' ); ! is( scalar @{ $repos->fetch_all_packages }, 17, '...number of packages matches' ); --- 115,119 ---- is( $pkg_check_add->version, $package_add->version, '...refetched version matches' ); ! is( scalar @{ $repos->fetch_all_packages }, get_num_packages() + 1, '...number of packages matches' ); *************** *** 130,134 **** is( $pkg_check_post->version, $package_add->version, '...new refetched name matches' ); ! is( scalar @{ $repos_check->fetch_all_packages }, 17, '...new refetched number of packages matches' ); } --- 130,134 ---- is( $pkg_check_post->version, $package_add->version, '...new refetched name matches' ); ! is( scalar @{ $repos_check->fetch_all_packages }, get_num_packages() + 1, '...new refetched number of packages matches' ); } *************** *** 140,144 **** is( $repos->fetch_package( $package_add_name ), undef, 'Removed package no longer exists in repository' ); ! is( scalar @{ $repos->fetch_all_packages }, 16, 'Number of packages matches' ); --- 140,144 ---- is( $repos->fetch_package( $package_add_name ), undef, 'Removed package no longer exists in repository' ); ! is( scalar @{ $repos->fetch_all_packages }, get_num_packages(), 'Number of packages matches' ); *************** *** 147,151 **** my $repos_check = OpenInteract2::Repository->new({ website_dir => $website_dir }); ! is( scalar @{ $repos_check->fetch_all_packages }, 16, '...refetched Number of packages matches' ); } --- 147,151 ---- my $repos_check = OpenInteract2::Repository->new({ website_dir => $website_dir }); ! is( scalar @{ $repos_check->fetch_all_packages }, get_num_packages(), '...refetched Number of packages matches' ); } Index: manage_list_packages.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/manage_list_packages.t,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** manage_list_packages.t 4 Mar 2005 03:46:21 -0000 1.15 --- manage_list_packages.t 21 Sep 2005 12:33:54 -0000 1.16 *************** *** 6,10 **** use lib 't/'; require 'utils.pl'; ! use Test::More tests => 21; require_ok( 'OpenInteract2::Manage' ); --- 6,10 ---- use lib 't/'; require 'utils.pl'; ! use Test::More tests => 22; require_ok( 'OpenInteract2::Manage' ); *************** *** 23,27 **** my @status = eval { $task->execute }; ok( ! $@, 'Task executed ok' ) || diag "Error: $@"; ! is( scalar @status, 16, 'Correct number of packages listed' ); --- 23,27 ---- my @status = eval { $task->execute }; ok( ! $@, 'Task executed ok' ) || diag "Error: $@"; ! is( scalar @status, get_num_packages(), 'Correct number of packages listed' ); Index: manage_list_objects.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/manage_list_objects.t,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** manage_list_objects.t 4 Mar 2005 20:48:41 -0000 1.9 --- manage_list_objects.t 21 Sep 2005 12:33:54 -0000 1.10 *************** *** 6,10 **** use lib 't/'; require 'utils.pl'; ! use Test::More tests => 43; --- 6,10 ---- use lib 't/'; require 'utils.pl'; ! use Test::More tests => 45; *************** *** 20,23 **** --- 20,24 ---- news_section => 'NewsSection', object_action => 'ObjectAction', + object_tag => 'ObjectTag', page => 'Page', page_content => 'PageContent', Index: manage_list_actions.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/manage_list_actions.t,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** manage_list_actions.t 4 Mar 2005 20:34:06 -0000 1.10 --- manage_list_actions.t 21 Sep 2005 12:33:54 -0000 1.11 *************** *** 6,10 **** use lib 't/'; require 'utils.pl'; ! use Test::More tests => 50; require_ok( 'OpenInteract2::Manage' ); --- 6,10 ---- use lib 't/'; require 'utils.pl'; ! use Test::More tests => 55; require_ok( 'OpenInteract2::Manage' ); *************** *** 25,37 **** my @names = qw( ! admin_tools_box boxes comment comment_admin comment_recent content_type ! edit_document_box error_browser file_index forgotpassword ! group latest_news login_box logout lookups new new_comment_form news news_archive_monthly news_section news_tools_box newuser object_modify_box objectactivity package page pagedirectory ! pagescan powered_by_box search search_box security show_comment_by_object ! show_comment_summary simple_index sitesearch systemdoc template ! template_only template_tools_box templates_used_box theme ! user user_info_box user_language ); --- 25,37 ---- my @names = qw( ! admin_tools_box all_tags_box boxes comment comment_admin comment_recent ! content_type edit_document_box error_browser file_index forgotpassword ! group latest_news login_box logout lookups my_tags new new_comment_form news news_archive_monthly news_section news_tools_box newuser object_modify_box objectactivity package page pagedirectory ! pagescan powered_by_box related_tags_box search search_box security ! show_comment_by_object show_comment_summary simple_index sitesearch ! systemdoc tagged_objects tags template template_only template_tools_box ! templates_used_box theme user user_info_box user_language ); Index: context.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/context.t,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** context.t 4 Mar 2005 20:34:06 -0000 1.46 --- context.t 21 Sep 2005 12:33:54 -0000 1.47 *************** *** 17,21 **** } ! plan tests => 152; require_ok( 'OpenInteract2::Context' ); --- 17,21 ---- } ! plan tests => 153; require_ok( 'OpenInteract2::Context' ); *************** *** 66,70 **** 'Website directory set in repository' ); my $packages = $repository->fetch_all_packages; ! is( scalar @{ $packages }, 16, 'Number of packages fetched by repository' ); --- 66,70 ---- 'Website directory set in repository' ); my $packages = $repository->fetch_all_packages; ! is( scalar @{ $packages }, get_num_packages(), 'Number of packages fetched by repository' ); *************** *** 80,84 **** is( ref $action_table, 'HASH', 'Action table is correct data structure' ); ! is( scalar keys %{ $action_table }, 45, 'Correct number of actions in table' ); --- 80,84 ---- is( ref $action_table, 'HASH', 'Action table is correct data structure' ); ! is( scalar keys %{ $action_table }, 50, 'Correct number of actions in table' ); *************** *** 156,160 **** is( ref $spops_config, 'HASH', 'SPOPS config is correct data structure' ); ! is( scalar keys %{ $spops_config }, 19, 'Correct number of SPOPS configs in structure' ); --- 156,160 ---- is( ref $spops_config, 'HASH', 'SPOPS config is correct data structure' ); ! is( scalar keys %{ $spops_config }, 20, 'Correct number of SPOPS configs in structure' ); Index: 00_manage_create_website.t =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/t/00_manage_create_website.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 00_manage_create_website.t 28 Feb 2005 01:03:59 -0000 1.5 --- 00_manage_create_website.t 21 Sep 2005 12:33:54 -0000 1.6 *************** *** 41,45 **** my @status = eval { $task->execute }; ok( ! $@, 'Task executed' ) || diag "Execution error: $@"; ! is( scalar @status, 110, 'Number of status messages' ); --- 41,45 ---- my @status = eval { $task->execute }; ok( ! $@, 'Task executed' ) || diag "Execution error: $@"; ! is( scalar @status, 111, 'Number of status messages' ); *************** *** 102,106 **** my $site_pkg_dir = catdir( $website_dir, 'pkg' ); ! is( count_dirs( $site_pkg_dir ), 16, 'Number of directories in pkg/' ); --- 102,106 ---- my $site_pkg_dir = catdir( $website_dir, 'pkg' ); ! is( count_dirs( $site_pkg_dir ), get_num_packages(), 'Number of directories in pkg/' ); *************** *** 123,127 **** 'Repository reports proper config dir' ); my $packages = $repository->fetch_all_packages; ! is( scalar @{ $packages }, 16, 'Repository contains correct number of packages' ); --- 123,127 ---- 'Repository reports proper config dir' ); my $packages = $repository->fetch_all_packages; ! is( scalar @{ $packages }, get_num_packages(), 'Repository contains correct number of packages' ); |
From: Chris W. <la...@us...> - 2005-09-21 12:33:41
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7715 Modified Files: Manage.pm Log Message: fix alpha ordering Index: Manage.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage.pm,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Manage.pm 21 Sep 2005 12:02:04 -0000 1.50 --- Manage.pm 21 Sep 2005 12:33:31 -0000 1.51 *************** *** 18,23 **** base base_box base_error base_group base_page base_security base_template base_theme ! base_user comments full_text news ! lookup object_activity object_tags system_doc whats_new /]; --- 18,23 ---- base base_box base_error base_group base_page base_security base_template base_theme ! base_user comments full_text lookup ! news object_activity object_tags system_doc whats_new /]; |