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...> - 2001-10-15 04:53:24
|
Update of /cvsroot/openinteract/SPOPS In directory usw-pr-cvs1:/tmp/cvs-serv3695 Modified Files: MANIFEST Log Message: added doc license file Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/SPOPS/MANIFEST,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MANIFEST 2001/10/15 04:28:24 1.20 --- MANIFEST 2001/10/15 04:53:21 1.21 *************** *** 2,5 **** --- 2,6 ---- Makefile.PL COPYING + COPYING-DOCS MANIFEST README |
|
From: Chris W. <la...@us...> - 2001-10-15 04:52:54
|
Update of /cvsroot/openinteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv3474
Added Files:
COPYING-DOCS
Log Message:
added license file for SPOPS manual
--- NEW FILE: COPYING-DOCS ---
GNU Free Documentation License
Version 1.1, March 2000
Copyright (C) 2000 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
written document "free" in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals; it
can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The "Document", below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as "you".
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (For example, if the Document is
in part a textbook of mathematics, a Secondary Section may not explain
any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no
other conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must
enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover. Both covers must also clearly and
legibly identify you as the publisher of these copies. The front cover
must present the full title with all words of the title equally
prominent and visible. You may add other material on the covers in
addition. Copying with changes limited to the covers, as long as they
preserve the title of the Document and satisfy these conditions, can
be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to
give them a chance to provide you with an updated version of the
Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
* A. Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of previous
versions (which should, if there were any, be listed in the
History section of the Document). You may use the same title as a
previous version if the original publisher of that version gives
permission.
* B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in the
Modified Version, together with at least five of the principal
authors of the Document (all of its principal authors, if it has
less than five).
* C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
* D. Preserve all the copyright notices of the Document.
* E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
* F. Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified Version
under the terms of this License, in the form shown in the Addendum
below.
* G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's license
notice.
* H. Include an unaltered copy of this License.
* I. Preserve the section entitled "History", and its title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
* J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the "History"
section. You may omit a network location for a work that was
published at least four years before the Document itself, or if
the original publisher of the version it refers to gives
permission.
* K. In any section entitled "Acknowledgements" or "Dedications",
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
* L. Preserve all the Invariant Sections of the Document, unaltered
in their text and in their titles. Section numbers or the
equivalent are not considered part of the section titles.
* M. Delete any section entitled "Endorsements". Such a section may
not be included in the Modified Version.
* N. Do not retitle any existing section as "Endorsements" or to
conflict in title with any Invariant Section.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license
notice. These titles must be distinct from any other section titles.
You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique
number. Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled "History"
in the various original documents, forming one section entitled
"History"; likewise combine any sections entitled "Acknowledgements",
and any sections entitled "Dedications". You must delete all sections
entitled "Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the rules
of this License for verbatim copying of each of the documents in all
other respects.
You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an "aggregate", and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate. Otherwise
they must appear on covers around the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section
4. Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
original English version of this License. In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided for under this License. Any other attempt
to copy, modify, sublicense or distribute the Document is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the
GNU Free Documentation License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered version
of this License "or any later version" applies to it, you have the
option of following the terms and conditions either of that specified
version or of any later version that has been published (not as a
draft) by the Free Software Foundation. If the Document does not
specify a version number of this License, you may choose any version
ever published (not as a draft) by the Free Software Foundation.
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:46:16
|
Update of /cvsroot/openinteract/SPOPS/eg
In directory usw-pr-cvs1:/tmp/cvs-serv1724
Modified Files:
README
Log Message:
added some pointers as to how to use the examples
Index: README
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/README,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** README 2001/10/15 04:24:38 1.6
--- README 2001/10/15 04:46:13 1.7
***************
*** 3,11 ****
This directory contains sample SPOPS code and classes you can use for
! users and groups.
- fatbomb*
! - sample standalone scripts
My/DiscoverField.pm
--- 3,11 ----
This directory contains sample SPOPS code and classes you can use for
! users, groups and security, along with a simple class to test them
! out. Plus one class that's useful anywhere.
! For the class that's useful anywhere:
My/DiscoverField.pm
***************
*** 21,28 ****
Note that if you create a database, run the data stocking script and
then clear the data out, the security data won't match up properly. In
! particular, the ID of the group 'site admin' (2) is hardcoded into
! both My/Group.pm and My/User.pm. You might need to change it. (This
! will be fixed with the next version of SPOPS.)
users_groups_(mysql|pgsql|tsql).sql
--- 21,66 ----
Note that if you create a database, run the data stocking script and
then clear the data out, the security data won't match up properly. In
! particular, the ID of the group 'managers' (3) is hardcoded into both
! My/Group.pm and My/User.pm. You might need to change it.
!
! How to use these:
!
! (1) Either pick a database to use or create a new one
!
! (2) Create the schema -- this is dependent on your database. An
! example is:
!
! $ mysql --user=test --password=dingdong test < users_groups_mysql.sql
!
! (3) Set the parameters in My/Common.pm for your database and driver.
!
! (4) Run the user and group stocking script:
!
! $ perl stock_user_group.pl
!
! (5) Check out the raw data to see what it looks like:
+ $ mysql --user=test --password=dingdong test
+ mysql> select * from spops_user;
+ ...
+ mysql> select * from spops_security;
+
+ (6) Run the doodad stocking script:
+
+ $ perl stock_doodads.pl
+
+ (7) Run the simple fetching script:
+
+ $ perl fetch_doodads.pl
+
+ (8) Clear out the tables and do it all again, playing around with the
+ different scripts and classes.
+
+ $ mysql--user=test --password=dingdong test < users_groups_clear.sql
+
+
+
+ Schema files:
+
users_groups_(mysql|pgsql|tsql).sql
***************
*** 41,44 ****
--- 79,85 ----
addition to 'users_groups_clear.sql'.
+
+ Scripts to manipulate the objects:
+
stock_user_group.pl
***************
*** 53,56 ****
--- 94,100 ----
- fetch sample objects as two different users, displaying
different security settings for each
+
+
+ Object classes:
My/Common.pm
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:28:26
|
Update of /cvsroot/openinteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv29272
Modified Files:
MANIFEST README RELEASE
Log Message:
update meta stuff before release
Index: MANIFEST
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/MANIFEST,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** MANIFEST 2001/10/08 13:49:36 1.19
--- MANIFEST 2001/10/15 04:28:24 1.20
***************
*** 62,72 ****
t/hash_file_test.perl
eg/README
! eg/fatbomb_dbi.pl
! eg/fatbomb_gdbm.pl
eg/stock_user_group.pl
eg/users_groups_mysql.sql
eg/users_groups_pgsql.sql
eg/users_groups_tsql.sql
eg/My/DiscoverField.pm
eg/My/Common.pm
eg/My/Group.pm
--- 62,74 ----
t/hash_file_test.perl
eg/README
! eg/fetch_doodads.pl
! eg/stock_doodads.pl
eg/stock_user_group.pl
+ eg/users_groups_clear.sql
eg/users_groups_mysql.sql
eg/users_groups_pgsql.sql
eg/users_groups_tsql.sql
eg/My/DiscoverField.pm
+ eg/My/Doodad.pm
eg/My/Common.pm
eg/My/Group.pm
Index: README
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/README,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** README 2001/09/27 14:52:25 1.8
--- README 2001/10/15 04:28:24 1.9
***************
*** 114,118 ****
* ODBC datasources; so far we've tried MS SQL Server (using DBD::ODBC
! and SPOPS::DBI::Sybase) which works fine for read-write and DB2 on
an AS/400 which works fine for read-only operations.
--- 114,118 ----
* ODBC datasources; so far we've tried MS SQL Server (using DBD::ODBC
! and SPOPS::DBI::Sybase) which works fine for read-write, and DB2 on
an AS/400 which works fine for read-only operations.
Index: RELEASE
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/RELEASE,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RELEASE 2001/08/28 21:09:54 1.7
--- RELEASE 2001/10/15 04:28:24 1.8
***************
*** 2,5 ****
--- 2,12 ----
=========================
+ 0.51 Sun Oct 14 20:23:59 EDT 2001
+
+ * Bugfixes, several to SPOPS::LDAP
+
+ * Added first draft of manual ('perldoc SPOPS::Manual')
+
+
0.50 Tue Aug 28 16:59:39 EDT 2001
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:27:41
|
Update of /cvsroot/openinteract/SPOPS/SPOPS/ClassFactory
In directory usw-pr-cvs1:/tmp/cvs-serv28934/SPOPS/ClassFactory
Modified Files:
DefaultBehavior.pm
Log Message:
ensure that 'fetch_by' doesn't use something as a hashref that isn't
necessarily defined as such
Index: DefaultBehavior.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/SPOPS/ClassFactory/DefaultBehavior.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DefaultBehavior.pm 2001/10/12 21:00:26 1.10
--- DefaultBehavior.pm 2001/10/15 04:27:39 1.11
***************
*** 259,262 ****
--- 259,263 ----
sub %%CLASS%%::fetch_by_%%FETCH_BY_FIELD%% {
my ( $item, $fb_field_value, $p ) = @_;
+ $p ||= {};
my $obj_list = $item->fetch_group({ where => "%%FETCH_BY_FIELD%% = ?",
value => [ $fb_field_value ],
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:25:37
|
Update of /cvsroot/openinteract/SPOPS/eg
In directory usw-pr-cvs1:/tmp/cvs-serv28349
Modified Files:
stock_user_group.pl
Log Message:
updated script and object class for user/group/security samples
Index: stock_user_group.pl
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/stock_user_group.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** stock_user_group.pl 2001/10/08 02:32:52 1.2
--- stock_user_group.pl 2001/10/15 04:25:35 1.3
***************
*** 11,38 ****
use Data::Dumper qw( Dumper );
- my $USER_CLASS = 'My::User';
- my $GROUP_CLASS = 'My::Group';
-
- eval "require $USER_CLASS";
- eval "require $GROUP_CLASS";
require My::Security;
my @USER_FIELD = qw( email last_name first_name password login_name );
my @USER_DATA = (
[ 'sup...@my...', 'user', 'super', 'password', 'superuser' ],
! map { [ "$_\@myco.com", "$_", 'User', "password$_", "User$_" ] }
! ( 'A' .. 'G' )
);
! my @GROUP_FIELD = qw( name notes );
my @GROUP_DATA = (
! [ 'admin', 'The all-powerful group' ],
! [ 'public', 'All users should belong' ],
! [ 'managers', 'PHB' ],
! );
!
! my %GROUP_USER = (
! 'admin' => { map { $_ => 1 } qw( UserA UserD UserG ) },
! 'managers' => { map { $_ => 1 } qw( UserB UserC ) },
);
--- 11,30 ----
use Data::Dumper qw( Dumper );
require My::Security;
+ require My::User;
my @USER_FIELD = qw( email last_name first_name password login_name );
my @USER_DATA = (
[ 'sup...@my...', 'user', 'super', 'password', 'superuser' ],
! ( map { [ "$_\@myco.com", "$_", 'User', "password$_", "User$_" ] } qw( A B ) ),
! ( map { [ "$_\@myco.com", "$_", 'Manager', "password$_", "Manager$_" ] } qw( C D ) ),
! ( map { [ "$_\@myco.com", "$_", 'Admin', "password$_", "Admin$_" ] } qw( E F ) ),
);
! my @GROUP_FIELD = qw( group_id name notes );
my @GROUP_DATA = (
! [ 1, 'admin', 'The all-powerful group' ],
! [ 2, 'public', 'All users should belong' ],
! [ 3, 'managers', 'PHB' ],
);
***************
*** 41,49 ****
foreach my $data ( @USER_DATA ) {
! my $user = $USER_CLASS->new;
for ( my $i = 0; $i < scalar @USER_FIELD; $i++ ) {
$user->{ $USER_FIELD[ $i ] } = $data->[ $i ];
}
! $user->save({ skip_log => 1, skip_cache => 1 });
print "Created user with ID: ", $user->id, "\n";
}
--- 33,41 ----
foreach my $data ( @USER_DATA ) {
! my $user = My::User->new;
for ( my $i = 0; $i < scalar @USER_FIELD; $i++ ) {
$user->{ $USER_FIELD[ $i ] } = $data->[ $i ];
}
! $user->save({ skip_cache => 1 });
print "Created user with ID: ", $user->id, "\n";
}
***************
*** 51,61 ****
# Next the groups
- my $user_list = $USER_CLASS->fetch_group({ skip_security => 1 });
foreach my $data ( @GROUP_DATA ) {
! my $group = $GROUP_CLASS->new;
for ( my $i = 0; $i < scalar @GROUP_FIELD; $i++ ) {
$group->{ $GROUP_FIELD[ $i ] } = $data->[ $i ];
}
! $group->save({ skip_log => 1, skip_cache => 1 });
print "Created group with ID: ", $group->id, "\n";
}
--- 43,52 ----
# Next the groups
foreach my $data ( @GROUP_DATA ) {
! my $group = My::Group->new;
for ( my $i = 0; $i < scalar @GROUP_FIELD; $i++ ) {
$group->{ $GROUP_FIELD[ $i ] } = $data->[ $i ];
}
! $group->save({ skip_cache => 1 });
print "Created group with ID: ", $group->id, "\n";
}
***************
*** 63,84 ****
# Finally the memberships
! my $public_group = $GROUP_CLASS->fetch_by_name( 'public',
! { skip_security => 1 } )->[0];
! my $admin_group = $GROUP_CLASS->fetch_by_name( 'admin',
! { skip_security => 1 } )->[0];
! my $mgr_group = $GROUP_CLASS->fetch_by_name( 'managers',
! { skip_security => 1 } )->[0];
! my $user_list = $USER_CLASS->fetch_group({ skip_security => 1 });
foreach my $user ( @{ $user_list } ) {
eval {
! $user->group_add( $public_group->id,
! { skip_security => 1 } );
! if ( $GROUP_USER{admin}->{ $user->{login_name} } ) {
! $user->group_add( $admin_group->id,
! { skip_security => 1 } );
}
! if ( $GROUP_USER{managers}->{ $user->{login_name} } ) {
! $user->group_add( $mgr_group->id,
! { skip_security => 1 } );
}
};
--- 54,69 ----
# Finally the memberships
! my $public_group = My::Group->fetch_by_name( 'public', { return_single => 1 } );
! my $admin_group = My::Group->fetch_by_name( 'admin', { return_single => 1 } );
! my $mgr_group = My::Group->fetch_by_name( 'managers', { return_single => 1 } );
! my $user_list = My::User->fetch_group();
foreach my $user ( @{ $user_list } ) {
eval {
! $user->group_add( $public_group->id );
! if ( $user->{login_name} =~ /^Admin/ ) {
! $user->group_add( $admin_group->id );
}
! if ( $user->{login_name} =~ /^Manager/ ) {
! $user->group_add( $mgr_group->id );
}
};
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:25:37
|
Update of /cvsroot/openinteract/SPOPS/eg/My
In directory usw-pr-cvs1:/tmp/cvs-serv28349/My
Modified Files:
Common.pm Group.pm Security.pm User.pm
Log Message:
updated script and object class for user/group/security samples
Index: Common.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/My/Common.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Common.pm 2001/08/27 03:54:06 1.3
--- Common.pm 2001/10/15 04:25:35 1.4
***************
*** 27,31 ****
# Modify database connection info as needed
! use constant DBI_DSN => 'DBI:Pg:dbname=spops';
use constant DBI_USER => 'postgres';
use constant DBI_PASSWORD => 'postgres';
--- 27,31 ----
# Modify database connection info as needed
! use constant DBI_DSN => 'DBI:Pg:dbname=test';
use constant DBI_USER => 'postgres';
use constant DBI_PASSWORD => 'postgres';
***************
*** 35,38 ****
--- 35,41 ----
sub set_user {
my ( $class, $user ) = @_;
+ unless ( $class->global_group_current ) {
+ $class->set_group( $user->group );
+ }
return $USER = $user;
}
***************
*** 42,45 ****
--- 45,54 ----
return $GROUP = $group;
}
+
+
+ # You can change who the superuser is by modifying this ID
+
+ sub get_superuser_id { return 1 }
+ sub get_supergroup_id { return 1 }
sub global_security_object_class { return 'My::Security' }
Index: Group.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/My/Group.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Group.pm 2001/10/08 02:33:32 1.5
--- Group.pm 2001/10/15 04:25:35 1.6
***************
*** 30,34 ****
creation_security => {
u => undef,
! g => { 2 => 'WRITE' },
w => 'READ',
},
--- 30,34 ----
creation_security => {
u => undef,
! g => { 3 => 'WRITE' },
w => 'READ',
},
Index: Security.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/My/Security.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Security.pm 2001/10/12 19:41:33 1.6
--- Security.pm 2001/10/15 04:25:35 1.7
***************
*** 11,14 ****
--- 11,16 ----
$My::Security::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
+ use constant DEBUG => 0;
+
sub _base_config {
my $config = {
***************
*** 54,63 ****
sub fetch_by_object {
my ( $class, $item, $p ) = @_;
- my $R = OpenInteract::Request->instance;
my $object_id = $p->{oid} || $p->{object_id};
unless ( $item or ( $p->{class} and defined $object_id ) ) {
my $msg = 'Cannot check security';
my $system_msg = 'No item passed into method to check!';
! $R->scrib( 0, "Cannot retrieve security since no item passed in to check!" );
SPOPS::Error->set({ user_msg => $msg,
type => 'security',
--- 56,64 ----
sub fetch_by_object {
my ( $class, $item, $p ) = @_;
my $object_id = $p->{oid} || $p->{object_id};
unless ( $item or ( $p->{class} and defined $object_id ) ) {
my $msg = 'Cannot check security';
my $system_msg = 'No item passed into method to check!';
! warn " -- Cannot retrieve security since no item passed in to check!\n";
SPOPS::Error->set({ user_msg => $msg,
type => 'security',
***************
*** 86,91 ****
$where .= ')';
! $R->DEBUG && $R->scrib( 2, "Searching clause: $where\n",
! "with values ", join( '//', @value ) );
# Fetch the objects
--- 87,91 ----
$where .= ')';
! DEBUG && warn "Searching clause: $where\nwith values ", join( '//', @value ), "\n";
# Fetch the objects
***************
*** 110,121 ****
if ( $sec->{scope} eq SEC_SCOPE_WORLD || $sec->{scope} eq SEC_SCOPE_USER ) {
$items{ $sec->{scope} } = $sec->{security_level};
! $R->DEBUG && $R->scrib( 2, "Assign $sec->{security_level} to $sec->{scope}" );
}
elsif ( $sec->{scope} eq SEC_SCOPE_GROUP ) {
$items{ $sec->{scope} }->{ $sec->{scope_id} } = $sec->{security_level};
! $R->DEBUG && $R->scrib( 2, "Assign $sec->{security_level} to $sec->{scope}/$sec->{scope_id}" );
}
}
! $R->DEBUG && $R->scrib( 2, "All security: ", Dumper( \%items ) );
return undef unless ( $found_item );
return \%items;
--- 110,121 ----
if ( $sec->{scope} eq SEC_SCOPE_WORLD || $sec->{scope} eq SEC_SCOPE_USER ) {
$items{ $sec->{scope} } = $sec->{security_level};
! DEBUG && warn "Assign $sec->{security_level} to $sec->{scope}\n";
}
elsif ( $sec->{scope} eq SEC_SCOPE_GROUP ) {
$items{ $sec->{scope} }->{ $sec->{scope_id} } = $sec->{security_level};
! DEBUG && warn "Assign $sec->{security_level} to $sec->{scope}/$sec->{scope_id}\n";
}
}
! DEBUG && warn "All security: ", Dumper( \%items ), "\n";
return undef unless ( $found_item );
return \%items;
***************
*** 127,131 ****
sub _build_group_sql {
my ( $class, $p ) = @_;
- my $R = OpenInteract::Request->instance;
# See if we were actually given any groups or the instruction to
--- 127,130 ----
***************
*** 135,139 ****
? scalar @{ $p->{group} } : 0;
unless ( $num_groups or $p->{group} eq 'all' ) {
! $R->DEBUG && $R->scrib( 3, "No groups passed in, returning empty info" );
return ( undef, [] );
}
--- 134,138 ----
? scalar @{ $p->{group} } : 0;
unless ( $num_groups or $p->{group} eq 'all' ) {
! DEBUG && warn "No groups passed in, returning empty info\n";
return ( undef, [] );
}
***************
*** 152,156 ****
? $p->{group} : [ $p->{group} ];
if ( scalar @{ $group_list } ) {
! $R->DEBUG && $R->scrib( 3, scalar @{ $group_list }, " groups found passed in" );
$where .= ' AND ( ';
foreach my $group ( @{ $group_list } ) {
--- 151,155 ----
? $p->{group} : [ $p->{group} ];
if ( scalar @{ $group_list } ) {
! DEBUG && warn scalar @{ $group_list }, " groups found passed in\n";
$where .= ' AND ( ';
foreach my $group ( @{ $group_list } ) {
***************
*** 165,169 ****
}
$where .= ' ) ' if ( $where );
! $R->DEBUG && $R->scrib( 3, "Group WHERE clause: { $where }" );
return ( $where, \@value );
}
--- 164,168 ----
}
$where .= ' ) ' if ( $where );
! DEBUG && warn "Group WHERE clause: { $where }\n";
return ( $where, \@value );
}
***************
*** 178,183 ****
return ( $where, \@value ) unless ( $p->{user} );
- my $R = OpenInteract::Request->instance;
-
# Note that we can only do one user at a time. The caller of this
# routine should ensure that $p->{user} is a single user object or
--- 177,180 ----
***************
*** 188,192 ****
push @value, SEC_SCOPE_USER, $uid;
! $R->DEBUG && $R->scrib( 3, "User WHERE clause: { $where }" );
return ( $where, \@value );
}
--- 185,189 ----
push @value, SEC_SCOPE_USER, $uid;
! DEBUG && warn "User WHERE clause: { $where }\n";
return ( $where, \@value );
}
***************
*** 205,216 ****
return undef if ( $p->{scope} ne SEC_SCOPE_WORLD and ! $p->{scope_id} );
- my $R = OpenInteract::Request->instance;
-
$p->{scope_id} = 'world' if ( $p->{scope} eq SEC_SCOPE_WORLD );
my ( $obj_class, $oid ) = $class->_get_class_and_oid( { %{ $p }, item => $item } );
! $R->DEBUG && $R->scrib( 1, "Try to find match for $obj_class ($oid) ",
! "scope $p->{scope} ($p->{scope_id})" );
my $where = " class = ? AND object_id = ? AND scope = ? AND scope_id = ? ";
my @values = ( $obj_class, $oid, $p->{scope}, $p->{scope_id} );
--- 202,211 ----
return undef if ( $p->{scope} ne SEC_SCOPE_WORLD and ! $p->{scope_id} );
$p->{scope_id} = 'world' if ( $p->{scope} eq SEC_SCOPE_WORLD );
my ( $obj_class, $oid ) = $class->_get_class_and_oid( { %{ $p }, item => $item } );
! DEBUG && warn "Try to find match for $obj_class ($oid) ",
! "scope $p->{scope} ($p->{scope_id})\n";
my $where = " class = ? AND object_id = ? AND scope = ? AND scope_id = ? ";
my @values = ( $obj_class, $oid, $p->{scope}, $p->{scope_id} );
Index: User.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/My/User.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** User.pm 2001/10/08 02:33:32 1.5
--- User.pm 2001/10/15 04:25:35 1.6
***************
*** 31,35 ****
creation_security => {
u => undef,
! g => { 2 => 'WRITE' },
w => 'READ',
},
--- 31,35 ----
creation_security => {
u => undef,
! g => { 3 => 'WRITE' },
w => 'READ',
},
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:25:07
|
Update of /cvsroot/openinteract/SPOPS/eg In directory usw-pr-cvs1:/tmp/cvs-serv28096 Modified Files: users_groups_mysql.sql users_groups_pgsql.sql users_groups_tsql.sql Log Message: updated SQL to include the sample dummy object (doodad) table Index: users_groups_mysql.sql =================================================================== RCS file: /cvsroot/openinteract/SPOPS/eg/users_groups_mysql.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** users_groups_mysql.sql 2001/10/08 02:33:11 1.3 --- users_groups_mysql.sql 2001/10/15 04:25:04 1.4 *************** *** 38,39 **** --- 38,50 ---- ); + + CREATE TABLE spops_doodad ( + doodad_id int not null auto_increment, + name varchar(100) not null, + description text null, + unit_cost numeric(10,2) default 0, + factory varchar(50) not null, + created_by int not null, + primary key ( doodad_id ), + unique ( name ) + ); \ No newline at end of file Index: users_groups_pgsql.sql =================================================================== RCS file: /cvsroot/openinteract/SPOPS/eg/users_groups_pgsql.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** users_groups_pgsql.sql 2001/10/08 02:33:11 1.3 --- users_groups_pgsql.sql 2001/10/15 04:25:04 1.4 *************** *** 38,39 **** --- 38,50 ---- ); + + CREATE TABLE spops_doodad ( + doodad_id serial, + name varchar(100) not null, + description text null, + unit_cost numeric(10,2) default 0, + factory varchar(50) not null, + created_by int not null, + primary key ( doodad_id ), + unique ( name ) + ); \ No newline at end of file Index: users_groups_tsql.sql =================================================================== RCS file: /cvsroot/openinteract/SPOPS/eg/users_groups_tsql.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** users_groups_tsql.sql 2001/10/08 02:33:11 1.3 --- users_groups_tsql.sql 2001/10/15 04:25:04 1.4 *************** *** 1,4 **** CREATE TABLE spops_user ( ! user_id numeric( 10, 0 ) identity not null, login_name varchar(25) not null, password varchar(30) not null, --- 1,4 ---- CREATE TABLE spops_user ( ! user_id numeric(10,0) identity not null, login_name varchar(25) not null, password varchar(30) not null, *************** *** 13,17 **** CREATE TABLE spops_group ( ! group_id numeric( 10, 0 ) identity not null, name varchar(30) not null, notes text null, --- 13,17 ---- CREATE TABLE spops_group ( ! group_id numeric(10,0) identity not null, name varchar(30) not null, notes text null, *************** *** 21,26 **** CREATE TABLE spops_group_user ( ! group_id numeric( 10, 0 ) not null, ! user_id numeric( 10, 0 ) not null, primary key ( group_id, user_id ) ); --- 21,26 ---- CREATE TABLE spops_group_user ( ! group_id numeric(10,0) not null, ! user_id numeric(10,0) not null, primary key ( group_id, user_id ) ); *************** *** 28,32 **** CREATE TABLE spops_security ( ! sid numeric( 10, 0 ) identity not null, class varchar(60) not null, object_id varchar(150) default '0', --- 28,32 ---- CREATE TABLE spops_security ( ! sid numeric(10,0) identity not null, class varchar(60) not null, object_id varchar(150) default '0', *************** *** 38,39 **** --- 38,50 ---- ); + + CREATE TABLE spops_doodad ( + doodad_id numeric(10,0) identity not null, + name varchar(100) not null, + description text null, + unit_cost numeric(10,2) default 0, + factory varchar(50) not null, + created_by int not null, + primary key ( doodad_id ), + unique ( name ) + ); \ No newline at end of file |
|
From: Chris W. <la...@us...> - 2001-10-15 04:24:40
|
Update of /cvsroot/openinteract/SPOPS/eg
In directory usw-pr-cvs1:/tmp/cvs-serv27838
Modified Files:
README
Log Message:
updated listing of sample stuff
Index: README
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/eg/README,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** README 2001/10/08 13:23:34 1.5
--- README 2001/10/15 04:24:38 1.6
***************
*** 9,12 ****
--- 9,19 ----
- sample standalone scripts
+ My/DiscoverField.pm
+
+ - class that implements an SPOPS::ClassFactory rule so that you
+ do not need to specify fields in your object configuration if
+ you're using all fields in the table. (Extremely handy!)
+
+
The remainder of the files are to demonstrate user, group and security
objects. You can use these as you like.
***************
*** 18,22 ****
will be fixed with the next version of SPOPS.)
! users_groups_*.sql
- SQL to create the user, group and linking tables. Three
--- 25,29 ----
will be fixed with the next version of SPOPS.)
! users_groups_(mysql|pgsql|tsql).sql
- SQL to create the user, group and linking tables. Three
***************
*** 25,41 ****
Microsoft SQL Server (tsql).
stock_user_group.pl
- add some sample user/group data
! My/Common.com
- common parents for the My::* hierarchy. You'll need to set a
few values here so the objects know what database they are
connecting to and how they'll connect.
! My/User.pm
! - sample user object
My/Group.pm
--- 32,66 ----
Microsoft SQL Server (tsql).
+ users_groups_clear.sql
+
+ - SQL to clear out the tables (all databases)
+
+ users_groups_clear_pgsql.sql
+
+ - Extra SQL to clear out sequences from PostgreSQL. Run in
+ addition to 'users_groups_clear.sql'.
+
stock_user_group.pl
- add some sample user/group data
! stock_doodads.pl
+ - add sample objects
+
+ fetch_doodads.pl
+
+ - fetch sample objects as two different users, displaying
+ different security settings for each
+
+ My/Common.pm
+
- common parents for the My::* hierarchy. You'll need to set a
few values here so the objects know what database they are
connecting to and how they'll connect.
! My/Doodad.pm
! - sample dummy object
My/Group.pm
***************
*** 47,55 ****
- sample security object
! My/DiscoverField.pm
! - class that implements an SPOPS::ClassFactory rule so that you
! do not need to specify fields in your object configuration if
! you're using all fields in the table. (Extremely handy!)
========================================
--- 72,78 ----
- sample security object
! My/User.pm
! - sample user object
========================================
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:24:18
|
Update of /cvsroot/openinteract/SPOPS/eg In directory usw-pr-cvs1:/tmp/cvs-serv27695 Added Files: users_groups_clear.sql users_groups_clear_pgsql.sql Log Message: added SQL to clear out our sample tables, including the sequences for Pg --- NEW FILE: users_groups_clear.sql --- DROP TABLE spops_user; DROP TABLE spops_group; DROP TABLE spops_group_user; DROP TABLE spops_security; DROP TABLE spops_doodad; --- NEW FILE: users_groups_clear_pgsql.sql --- DROP SEQUENCE spops_group_group_id_seq; DROP SEQUENCE spops_security_sid_seq; DROP SEQUENCE spops_user_user_id_seq; DROP SEQUENCE spops_doodad_doodad_id_seq; |
|
From: Chris W. <la...@us...> - 2001-10-15 04:23:21
|
Update of /cvsroot/openinteract/SPOPS/eg
In directory usw-pr-cvs1:/tmp/cvs-serv27433
Added Files:
fetch_doodads.pl stock_doodads.pl
Log Message:
added object class and sample scripts to create and fetch objects
under security
--- NEW FILE: fetch_doodads.pl ---
#!/usr/bin/perl
# $Id: fetch_doodads.pl,v 1.1 2001/10/15 04:23:18 lachoy Exp $
use strict;
require My::Security;
require My::User;
require My::Doodad;
{
# Display info as a normal user, then as a manager
runas( 'UserA' );
runas( 'ManagerC' );
}
sub runas {
my ( $username ) = @_;
my $user = My::User->fetch_by_login_name( $username, { return_single => 1 } );
My::Doodad->set_user( $user );
My::Doodad->set_group( $user->group );
my $iter = My::Doodad->fetch_iterator;
print "\nDoodads in database, fetched as user ($username):\n";
while ( my $doodad = $iter->get_next ) {
printf "%-20s (\$%5.2f) Security: %s\n", $doodad->{name}, $doodad->{unit_cost},
$doodad->{tmp_security_level};
}
}
--- NEW FILE: stock_doodads.pl ---
#!/usr/bin/perl
# $Id: stock_doodads.pl,v 1.1 2001/10/15 04:23:18 lachoy Exp $
use strict;
require My::Security;
require My::User;
require My::Doodad;
my @DOODAD_FIELD = qw( name description unit_cost factory );
my @DOODAD_DATA = (
[ 'Gobstopper', "Doesn't melt in your hand or your mouth", 1.75, 'Kalamazoo, Michigan, USA' ],
[ 'AF-22 Peacegiver', 'Brings feeling of peace instead of anger', 20,000, 'San Jose, California, USA' ],
[ 'Chuckie', 'One bad doll', 12.95, 'Gary, Indiana, USA' ],
[ 'Lego army', 'With friends like these...', 85.75, 'Copenhagen, Denmark' ],
);
{
my $user = My::User->fetch_by_login_name( 'UserA', { return_single => 1 } );
My::Doodad->set_user( $user );
foreach my $data ( @DOODAD_DATA ) {
my $doodad = My::Doodad->new;
for ( my $i = 0; $i < scalar @DOODAD_FIELD; $i++ ) {
$doodad->{ $DOODAD_FIELD[ $i ] } = $data->[ $i ];
}
$doodad->save({ skip_cache => 1 });
print "Created doodad with ID: ", $doodad->id, "\n";
}
}
|
|
From: Chris W. <la...@us...> - 2001-10-15 04:23:21
|
Update of /cvsroot/openinteract/SPOPS/eg/My
In directory usw-pr-cvs1:/tmp/cvs-serv27433/My
Added Files:
Doodad.pm
Log Message:
added object class and sample scripts to create and fetch objects
under security
--- NEW FILE: Doodad.pm ---
package My::Doodad;
# $Id: Doodad.pm,v 1.1 2001/10/15 04:23:18 lachoy Exp $
use strict;
use SPOPS::Initialize;
use SPOPS::Secure qw( :level :scope );
$My::Doodad::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
sub _base_config {
my $config = {
doodad => {
class => 'My::Doodad',
isa => [ 'SPOPS::Secure', 'My::Common' ],
rules_from => [ 'My::DiscoverField' ],
field_discover => 'yes',
field => [],
id_field => 'doodad_id',
increment_field => 1,
no_insert => [ 'doodad_id' ],
skip_undef => [],
no_update => [ 'doodad_id' ],
base_table => 'spops_doodad',
sql_defaults => [],
alias => [],
has_a => { 'My::User' => 'created_by' },
links_to => {},
fetch_by => [ 'name' ],
creation_security => {
u => undef,
g => { 3 => 'WRITE' },
w => 'READ',
},
track => { create => 1, update => 1, remove => 1 },
display => { url => '/Doodad/show/' },
name => 'name',
object_name => 'Doodad',
}
};
return $config;
}
sub config_class {
require My::User;
SPOPS::Initialize->process({ config => [ _base_config() ] });
}
&config_class;
########################################
# RULES
########################################
sub ruleset_factory {
my ( $class, $ruleset ) = @_;
push @{ $ruleset->{pre_save_action} }, \&set_creator;
warn "Added 'set_creator' to $class\n";
return __PACKAGE__;
}
sub set_creator {
my ( $self ) = @_;
return 1 if ( $self->is_saved );
my $user = $self->global_user_current;
$self->{created_by} = $user->id;
return 1;
}
1;
|
|
From: Chris W. <la...@us...> - 2001-10-15 00:08:32
|
Update of /cvsroot/openinteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv19159
Modified Files:
Makefile.PL
Log Message:
updated to recognize ODBC as a valid driver and if it's chosen, to ask
the user what SPOPS driver to use (e.g., use 'Sybase' with Microsoft
SQL)
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/Makefile.PL,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Makefile.PL 2001/08/22 11:10:04 1.10
--- Makefile.PL 2001/10/15 00:08:27 1.11
***************
*** 15,18 ****
--- 15,19 ----
Pg => 1,
ASAny => 1,
+ ODBC => 1,
Sybase => \&_set_sybase_env );
***************
*** 130,134 ****
eval { require DBI };
if ( $@ ) {
! print "You don't appear to have DBI installed; skipping DBI tests.";
return ( 'n' );
}
--- 131,135 ----
eval { require DBI };
if ( $@ ) {
! print "You don't appear to have DBI installed; skipping DBI tests.\n";
return ( 'n' );
}
***************
*** 159,162 ****
--- 160,172 ----
print "\n";
+ my ( $odbc_driver );
+ if ( $dbi_driver eq 'ODBC' ) {
+ print "You've chosen ODBC as your DBD. However, SPOPS needs to know ",
+ "what type of database is working behind the ODBC driver.\n";
+ $odbc_driver = get_response( "Choose a database behind the scenes (MySQL, Pg, Sybase)\n" .
+ "(MS SQL users should enter 'Sybase')", 'Sybase' );
+ }
+ print "\n";
+
$dbi_dsn = get_response( "Please enter the tail end of the DSN to use for the driver you chose\n" .
"('DBI:$dbi_driver:' will be prepended unless you specify a full DSN)\n",
***************
*** 176,179 ****
--- 186,191 ----
"'$CONFIG_FILE' after the tests have run since it \n",
"contains user/password information.\n\n";
+
+ $dbi_driver = $odbc_driver if ( $odbc_driver );
return ( 'y', $dbi_driver, $dbi_dsn, $dbi_user, $dbi_pass );
}
***************
*** 186,190 ****
eval { require Net::LDAP };
if ( $@ ) {
! print "You don't appear to have Net::LDAP installed; skipping LDAP tests.";
return ( 'n' );
}
--- 198,202 ----
eval { require Net::LDAP };
if ( $@ ) {
! print "You don't appear to have Net::LDAP installed; skipping LDAP tests.\n";
return ( 'n' );
}
***************
*** 214,218 ****
eval { require GDBM_File };
if ( $@ ) {
! print "You don't appear to have GDBM_File installed, skipping GDBM tests.";
return ( 'n' );
}
--- 226,230 ----
eval { require GDBM_File };
if ( $@ ) {
! print "You don't appear to have GDBM_File installed, skipping GDBM tests.\n";
return ( 'n' );
}
|
|
From: Chris W. <la...@us...> - 2001-10-15 00:00:58
|
Update of /cvsroot/openinteract/SPOPS/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv17465
Modified Files:
Tie.pm
Log Message:
don't try and fetch anything if given an empty key
Index: Tie.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/SPOPS/Tie.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Tie.pm 2001/10/12 21:00:26 1.18
--- Tie.pm 2001/10/15 00:00:53 1.19
***************
*** 94,97 ****
--- 94,98 ----
sub FETCH {
my ( $self, $key ) = @_;
+ return unless ( $key );
my $cmp_key = lc $key;
DEBUG() && _w( 3, " tie: Trying to retrieve value for ($key)\n" );
|
|
From: Chris W. <la...@us...> - 2001-10-15 00:00:19
|
Update of /cvsroot/openinteract/SPOPS/doc/Manual In directory usw-pr-cvs1:/tmp/cvs-serv17347 Modified Files: Serialization.pod Log Message: fixed POD error Index: Serialization.pod =================================================================== RCS file: /cvsroot/openinteract/SPOPS/doc/Manual/Serialization.pod,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Serialization.pod 2001/10/12 19:39:07 1.6 --- Serialization.pod 2001/10/15 00:00:17 1.7 *************** *** 160,165 **** Sets the 'loaded' property of all fields in the object to false. - =back - For an example of how a SPOPS subclass implements lazy-loading, see L<SPOPS::DBI|SPOPS::DBI>. --- 160,163 ---- |
|
From: Chris W. <la...@us...> - 2001-10-14 23:51:45
|
Update of /cvsroot/openinteract/SPOPS/doc In directory usw-pr-cvs1:/tmp/cvs-serv15842 Modified Files: outline Log Message: ... Index: outline =================================================================== RCS file: /cvsroot/openinteract/SPOPS/doc/outline,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** outline 2001/09/05 13:04:36 1.1 --- outline 2001/10/14 23:51:42 1.2 *************** *** 29,32 **** --- 29,33 ---- SPOPS::Iterator::DBI SPOPS::Iterator::LDAP + SPOPS::Iterator::WrapList SPOPS::Key::Random SPOPS::Key::DBI::HandleField |
|
From: Chris W. <la...@us...> - 2001-10-14 23:51:01
|
Update of /cvsroot/openinteract/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv15710
Modified Files:
Changes
Log Message:
Add date, small edits
Index: Changes
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/Changes,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** Changes 2001/10/12 05:51:24 1.62
--- Changes 2001/10/14 23:50:57 1.63
***************
*** 1,5 ****
Revision history for Perl extension SPOPS.
! 0.51
Overall:
--- 1,5 ----
Revision history for Perl extension SPOPS.
! 0.51 Sun Oct 14 20:04:08 EDT 2001
Overall:
***************
*** 19,23 ****
here. For example, all discussion of configuration keys is now in
one place, SPOPS::Manual::Configuration. Some pieces of the
! manual are fairly complete while others are barren.
* eg/(items from 0.50):
--- 19,24 ----
here. For example, all discussion of configuration keys is now in
one place, SPOPS::Manual::Configuration. Some pieces of the
! manual are fairly complete while others are barren. To start,
! just do 'perldoc SPOPS::Manual'.
* eg/(items from 0.50):
***************
*** 47,51 ****
handle from the correct class. (This hasn't been a problem for
people because most people use the same datasource to hold
! related objects.)
* SPOPS/ClassFactory/DefaultBehavior.pm:
--- 48,52 ----
handle from the correct class. (This hasn't been a problem for
people because most people use the same datasource to hold
! related objects. But SPOPS doesn't care!)
* SPOPS/ClassFactory/DefaultBehavior.pm:
|
|
From: Chris W. <la...@us...> - 2001-10-14 23:25:24
|
Update of /cvsroot/openinteract/OpenInteract/pkg/classified In directory usw-pr-cvs1:/tmp/cvs-serv10726 Modified Files: Changes package.conf Log Message: meta Index: Changes =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/Changes,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Changes 2001/10/14 20:38:43 1.18 --- Changes 2001/10/14 23:25:21 1.19 *************** *** 1,4 **** --- 1,8 ---- Revision history for OpenInteract package classified. + 1.32 Sun Oct 14 19:34:50 EDT 2001 + + Fix the default method called by the handler + 1.31 Sun Oct 14 16:43:28 EDT 2001 Index: package.conf =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/package.conf,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** package.conf 2001/10/14 20:38:44 1.18 --- package.conf 2001/10/14 23:25:21 1.19 *************** *** 1,4 **** name classified ! version 1.31 author Chris Winters <ch...@cw...> author Marcus Baker <mb...@in...> --- 1,4 ---- name classified ! version 1.32 author Chris Winters <ch...@cw...> author Marcus Baker <mb...@in...> |
|
From: Chris W. <la...@us...> - 2001-10-14 23:19:35
|
Update of /cvsroot/openinteract/OpenInteract/pkg/classified/OpenInteract/Handler In directory usw-pr-cvs1:/tmp/cvs-serv9552 Modified Files: Classified.pm Log Message: fix default method Index: Classified.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/OpenInteract/Handler/Classified.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Classified.pm 2001/10/14 20:39:23 1.7 --- Classified.pm 2001/10/14 23:19:33 1.8 *************** *** 13,17 **** $OpenInteract::Handler::Classified::author = 'ch...@cw...'; ! $OpenInteract::Handler::Classified::default_method = 'listing'; @OpenInteract::Handler::Classified::forbidden_methods = qw(); %OpenInteract::Handler::Classified::security = ( --- 13,17 ---- $OpenInteract::Handler::Classified::author = 'ch...@cw...'; ! $OpenInteract::Handler::Classified::default_method = 'search_form'; @OpenInteract::Handler::Classified::forbidden_methods = qw(); %OpenInteract::Handler::Classified::security = ( |
|
From: Chris W. <la...@us...> - 2001-10-14 20:57:49
|
Update of /cvsroot/openinteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv9275
Modified Files:
Changes
Log Message:
latest changes
Index: Changes
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/Changes,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** Changes 2001/10/12 16:07:17 1.68
--- Changes 2001/10/14 20:57:46 1.69
***************
*** 10,14 ****
now be reduced to a series of configuration steps and templates
while still allowing for custom behavior. This makes for very
! maintainable code and rapid development.
* Custom template behaviors:
--- 10,15 ----
now be reduced to a series of configuration steps and templates
while still allowing for custom behavior. This makes for very
! maintainable code and rapid development. See the 'classified'
! package for an example that uses it.
* Custom template behaviors:
***************
*** 100,104 ****
behaviors.
! * OpenInteract/ApacheStartup.pm:
- Jochen Lillich <ge...@li...> noticed that we weren't
--- 101,105 ----
behaviors.
! * OpenInteract/ApacheStartup.pm:
- Jochen Lillich <ge...@li...> noticed that we weren't
***************
*** 109,113 ****
if new configration key 'template_info'->'compile_cleanup' is true
! * OpenInteract/Auth.pm:
- Fixed subtle bug when using CGI::Cookie -- setting a cookie
--- 110,114 ----
if new configration key 'template_info'->'compile_cleanup' is true
! * OpenInteract/Auth.pm:
- Fixed subtle bug when using CGI::Cookie -- setting a cookie
***************
*** 124,128 ****
have to use 'handler' (see config addition for this as well).
! * OpenInteract/CommonHandler.pm:
- Created base handler for most tasks (search form, search,
--- 125,129 ----
have to use 'handler' (see config addition for this as well).
! * OpenInteract/CommonHandler.pm:
- Created base handler for most tasks (search form, search,
***************
*** 131,142 ****
docs for implementation.
! * OpenInteract/DBI.pm:
! - Option 'trace_level' now avaialble to initialize the database
handle using the 'trace()' method.
- Updated docs to include all options that are processed.
! * OpenInteract/Package.pm:
- You can now specify 'template_plugin', 'module' and (to be used
--- 132,143 ----
docs for implementation.
! * OpenInteract/DBI.pm:
! - Option 'trace_level' now avaialble to initialize the database
handle using the 'trace()' method.
- Updated docs to include all options that are processed.
! * OpenInteract/Package.pm:
- You can now specify 'template_plugin', 'module' and (to be used
***************
*** 241,256 ****
* script/oi_manage:
! - Add 'template', 'mail' and 'uploads' to list of directories
! created when you run 'create_website'; removed 'email'
! - Add 'cache' and 'cache/tt' to list of directories created when
! you run 'create_website'
! - Modify how/when install_sql creates database handles. (This still
! needs some work, but it should be ok for now.)
! - Create a $CONFIG object when doing apply_package or
! upgrade_package and pass it to the install_to_website() method of
! OpenInteract::Package.
--- 242,257 ----
* script/oi_manage:
! - Add 'template', 'mail' and 'uploads' to list of directories
! created when you run 'create_website'; removed 'email'
! - Add 'cache' and 'cache/tt' to list of directories created when
! you run 'create_website'
! - Modify how/when install_sql creates database handles. (This still
! needs some work, but it should be ok for now.)
! - Create a $CONFIG object when doing apply_package or
! upgrade_package and pass it to the install_to_website() method of
! OpenInteract::Package.
|
|
From: Chris W. <la...@us...> - 2001-10-14 20:57:27
|
Update of /cvsroot/openinteract/OpenInteract In directory usw-pr-cvs1:/tmp/cvs-serv9234 Modified Files: MANIFEST Log Message: update classified version; template widgets Index: MANIFEST =================================================================== RCS file: /cvsroot/openinteract/OpenInteract/MANIFEST,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** MANIFEST 2001/10/12 16:02:37 1.61 --- MANIFEST 2001/10/14 20:57:24 1.62 *************** *** 95,99 **** pkg/base_theme-1.27.tar.gz pkg/base_user-1.37.tar.gz ! pkg/classified-1.28.tar.gz pkg/full_text-1.27.tar.gz pkg/lookup-0.15.tar.gz --- 95,99 ---- pkg/base_theme-1.27.tar.gz pkg/base_user-1.37.tar.gz ! pkg/classified-1.31.tar.gz pkg/full_text-1.27.tar.gz pkg/lookup-0.15.tar.gz *************** *** 107,110 **** --- 107,111 ---- template/data_cell_begin template/date_select + template/error_message template/form_checkbox template/form_hidden *************** *** 123,126 **** --- 124,128 ---- template/header_row template/label_form_checkbox_row + template/label_form_date_row template/label_form_radio_row template/label_form_select_row *************** *** 134,137 **** --- 136,140 ---- template/search_results_page_listing template/show_label + template/status_message template/table_bordered_begin template/table_bordered_end |
|
From: Chris W. <la...@us...> - 2001-10-14 20:56:33
|
Update of /cvsroot/openinteract/OpenInteract/OpenInteract
In directory usw-pr-cvs1:/tmp/cvs-serv9051/OpenInteract
Modified Files:
CommonHandler.pm
Log Message:
debugging updates and enable the template specified to depend on the
parameters (in particular 'do_edit' will get the form, not will get
the detail, as implemented by the user)
Index: CommonHandler.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/OpenInteract/CommonHandler.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** CommonHandler.pm 2001/10/08 21:35:01 1.23
--- CommonHandler.pm 2001/10/14 20:56:30 1.24
***************
*** 35,39 ****
$class->_search_form_customize( \%params );
! my $template_name = $class->_template_name( \%params, $class->MY_SEARCH_FORM_TEMPLATE );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
--- 35,41 ----
$class->_search_form_customize( \%params );
! my $template_name = $class->_template_name(
! \%params,
! $class->MY_SEARCH_FORM_TEMPLATE( \%params ) );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
***************
*** 53,57 ****
$p ||= {};
! my $R = OpenInteract::Request->instance;
my %params = %{ $p };
--- 55,61 ----
$p ||= {};
! my $R = OpenInteract::Request->instance;
! my $apr = $R->apache;
!
my %params = %{ $p };
***************
*** 64,67 ****
--- 68,72 ----
if ( $search_id ) {
+ $R->DEBUG && $R->scrib( 1, "Retrieving search for ID ($search_id)" );
$results->{search_id} = $search_id;
}
***************
*** 72,84 ****
else {
my $iterator = $class->_search_build_and_run({ is_paged => 1 });
$results->save( $iterator );
$class->_search_save_id( $results->{search_id} );
}
$params{page_number_field} = $class->MY_SEARCH_RESULTS_PAGE_FIELD;
! $params{current_page} = $R->apache->param( $params{page_number_field} ) || 1;
my $hits_per_page = $class->MY_SEARCH_RESULTS_PAGE_SIZE;
! my ( $min, $max ) = $results->find_page_boundaries( $params{current_page}, $hits_per_page );
$params{iterator} = $results->retrieve({ min => $min, max => $max,
return => 'iterator' });
--- 77,92 ----
else {
+ $R->DEBUG && $R->scrib( 1, "Running search for the first time" );
my $iterator = $class->_search_build_and_run({ is_paged => 1 });
$results->save( $iterator );
+ $R->DEBUG && $R->scrib( 1, "Search ID ($results->{search_id})" );
$class->_search_save_id( $results->{search_id} );
}
$params{page_number_field} = $class->MY_SEARCH_RESULTS_PAGE_FIELD;
! $params{current_page} = $apr->param( $params{page_number_field} ) || 1;
my $hits_per_page = $class->MY_SEARCH_RESULTS_PAGE_SIZE;
! my ( $min, $max ) = $results->find_page_boundaries(
! $params{current_page}, $hits_per_page );
$params{iterator} = $results->retrieve({ min => $min, max => $max,
return => 'iterator' });
***************
*** 87,90 ****
--- 95,100 ----
$params{search_id} = $results->{search_id};
$params{search_results_key} = $class->MY_SEARCH_RESULTS_KEY;
+ $R->DEBUG && $R->scrib( 1, "Search info: min: ($min); max: ($max)",
+ "records ($results->{num_records})" );
}
***************
*** 99,103 ****
$class->_search_customize( \%params );
! my $template_name = $class->_template_name( \%params, $class->MY_SEARCH_RESULTS_TEMPLATE );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
--- 109,115 ----
$class->_search_customize( \%params );
! my $template_name = $class->_template_name(
! \%params,
! $class->MY_SEARCH_RESULTS_TEMPLATE( \%params ) );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
***************
*** 274,278 ****
}
push @value, $search_value;
! $R->DEBUG && $R->scrib( 1, "Set ($field_name) ($oper) ($search_value)" );
}
push @where, '( ' . join( ' OR ', @where_param ) . ' )';
--- 286,290 ----
}
push @value, $search_value;
! $R->DEBUG && $R->scrib( 1, "Set ($field_name) $oper ($search_value)" );
}
push @where, '( ' . join( ' OR ', @where_param ) . ' )';
***************
*** 308,312 ****
elsif ( $num_linking_fields == 3 ) {
my ( $base_id_field, $middle_table, $link_id_field ) = @{ $id_link };
! $R->DEBUG && $R->scrib( 1, "Linking to ($link_table) through ($middle_table)" );
push @where, join( ' = ', "$object_table.$base_id_field",
"$middle_table.$base_id_field" );
--- 320,325 ----
elsif ( $num_linking_fields == 3 ) {
my ( $base_id_field, $middle_table, $link_id_field ) = @{ $id_link };
! $R->DEBUG && $R->scrib( 1, "Linking to ($link_table) through ",
! "($middle_table)" );
push @where, join( ' = ', "$object_table.$base_id_field",
"$middle_table.$base_id_field" );
***************
*** 324,328 ****
}
else {
! $R->DEBUG && $R->scrib( 1, "Straight link to ($link_table) with ($id_link)" );
push @where, join( ' = ', "$object_table.$id_link",
"$link_table.$id_link" );
--- 337,342 ----
}
else {
! $R->DEBUG && $R->scrib( 1, "Straight link to ($link_table) with",
! "($id_link)" );
push @where, join( ' = ', "$object_table.$id_link",
"$link_table.$id_link" );
***************
*** 363,368 ****
# create and modify?
! my $do_edit = ( $R->apache->param( 'edit' ) and
! $p->{level} >= SEC_LEVEL_WRITE );
# Setup our default info
--- 377,382 ----
# create and modify?
! $params{do_edit} = ( $R->apache->param( 'edit' ) and
! $p->{level} >= SEC_LEVEL_WRITE );
# Setup our default info
***************
*** 377,381 ****
# Ensure the object can be edited
! unless ( $do_edit or $object->is_saved ) {
my $error_msg = 'Sorry, did not specify an object to display nor did ' .
'you request to edit an object. (Try: "?edit=1" at the ' .
--- 391,395 ----
# Ensure the object can be edited
! unless ( $params{do_edit} or $object->is_saved ) {
my $error_msg = 'Sorry, did not specify an object to display nor did ' .
'you request to edit an object. (Try: "?edit=1" at the ' .
***************
*** 391,395 ****
$class->_show_customize( \%params );
! my $template_name = $class->_template_name( \%params, $class->MY_OBJECT_FORM_TEMPLATE );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
--- 405,411 ----
$class->_show_customize( \%params );
! my $template_name = $class->_template_name(
! \%params,
! $class->MY_OBJECT_FORM_TEMPLATE( \%params ) );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
***************
*** 404,408 ****
my ( $class, $p ) = @_;
unless ( $class->MY_ALLOW_EDIT ) {
! my $error_msg = 'Objects of this type cannot be edited. No modification made.';
return $class->search_form({ error_msg => $error_msg });
}
--- 420,424 ----
my ( $class, $p ) = @_;
unless ( $class->MY_ALLOW_EDIT ) {
! my $error_msg = 'Objects of this type cannot be edited. No action done.';
return $class->search_form({ error_msg => $error_msg });
}
***************
*** 615,619 ****
$class->_wizard_form_customize( \%params );
! my $template_name = $class->_template_name( \%params, $class->MY_WIZARD_FORM_TEMPLATE );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
--- 631,637 ----
$class->_wizard_form_customize( \%params );
! my $template_name = $class->_template_name(
! \%params,
! $class->MY_WIZARD_FORM_TEMPLATE( \%params ) );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
***************
*** 640,644 ****
$class->_wizard_search_customize( \%params );
! my $template_name = $class->_template_name( \%params, $class->MY_WIZARD_RESULTS_TEMPLATE );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
--- 658,664 ----
$class->_wizard_search_customize( \%params );
! my $template_name = $class->_template_name(
! \%params,
! $class->MY_WIZARD_RESULTS_TEMPLATE( \%params ) );
return $R->template->handler( {}, \%params, { name => $template_name } );
}
***************
*** 1276,1281 ****
searched is an exact match, we use '=' as a search test.
! Otherwise we use 'LIKE' and wrap the value in '%' so it will match
! anywhere in the string.
If you need other custom behavior, do not include the field in
--- 1296,1302 ----
searched is an exact match, we use '=' as a search test.
! Otherwise we use 'LIKE' and, if the field is not in
! C<MY_SEARCH_FIELDS_LEFT_EXACT> or C<MY_SEARCH_FIELDS_RIGHT_EXACT>,
! wrap the value in '%'.
If you need other custom behavior, do not include the field in
***************
*** 1296,1300 ****
Optional. Returns fields from C<MY_SEARCH_FIELDS> that must match
! exactly on the right-hand side. This basically sets up:
$fieldname LIKE "%$fieldvalue"
--- 1317,1321 ----
Optional. Returns fields from C<MY_SEARCH_FIELDS> that must match
! exactly on the right-hand side. This sets up:
$fieldname LIKE "%$fieldvalue"
***************
*** 1305,1313 ****
Optional. Returns table name => ID field mapping used to build WHERE
! clauses with multiple tables.
A key is a table name, and the value enables us to build a join clause
to link table specified in the key to the table containing the object
! being searched. The value is either a scalar or an arrayref:
If a scalar, the value is just the ID field in the destination table
--- 1326,1334 ----
Optional. Returns table name => ID field mapping used to build WHERE
! clauses that JOIN multiple tables when executing a search.
A key is a table name, and the value enables us to build a join clause
to link table specified in the key to the table containing the object
! being searched. The value is either a scalar or an arrayref.
If a scalar, the value is just the ID field in the destination table
***************
*** 1320,1324 ****
the ID of our object matches.
! If the value is an arrayref that means one of two things.
First, a two-element arrayref. This means we are have a non-key field
--- 1341,1346 ----
the ID of our object matches.
! If the value is an arrayref that means one of two things, depending on
! the number of elements in the arrayref.
First, a two-element arrayref. This means we are have a non-key field
***************
*** 1533,1541 ****
Modify the GenericDispatcher so that things like security information,
forbidden methods, etc. are available through class methods we can
! override.
=head1 SEE ALSO
! L<OpenInteract::Handler::GenericDispatcher>
=head1 COPYRIGHT
--- 1555,1565 ----
Modify the GenericDispatcher so that things like security information,
forbidden methods, etc. are available through class methods we can
! override. We might hold off on this until we implement the
! ActionDispatcher -- no reason to modify something we will
! remove/modify soon anyway...
=head1 SEE ALSO
! L<OpenInteract::Handler::GenericDispatcher|OpenInteract::Handler::GenericDispatcher>
=head1 COPYRIGHT
|
|
From: Chris W. <la...@us...> - 2001-10-14 20:54:50
|
Update of /cvsroot/openinteract/OpenInteract/template
In directory usw-pr-cvs1:/tmp/cvs-serv8669/template
Modified Files:
date_select header_cell show_label
Log Message:
template widget updates
Index: date_select
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/template/date_select,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** date_select 2001/10/11 15:15:09 1.1
--- date_select 2001/10/14 20:54:47 1.2
***************
*** 7,10 ****
--- 7,13 ----
year_list = list of years
+ object = Class::Date object from which we can get the year,
+ month and day; if this is given we ignore the
+ year/month/day_value fields
year_value = chosen year
month_value = chosen month (number)
***************
*** 29,36 ****
[%- IF field_prefix -%]
! [%- month_field = "${field_prefix}_month";
! day_field = "${field_prefix}_day";
! year_field = "${field_prefix}_year"; -%]
[% END -%]
[% INCLUDE form_select( name = month_field, plain = 1, first_blank = is_blank,
value_list = [ 1..12 ], label_list = month_names,
--- 32,45 ----
[%- IF field_prefix -%]
! [%- month_field = "${field_prefix}_month";
! day_field = "${field_prefix}_day";
! year_field = "${field_prefix}_year"; -%]
[% END -%]
+ [%- IF object -%]
+ [%- year_value = object.year;
+ month_value = object.month;
+ day_value = object.day; -%]
+ [%- END -%]
+
[% INCLUDE form_select( name = month_field, plain = 1, first_blank = is_blank,
value_list = [ 1..12 ], label_list = month_names,
Index: header_cell
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/template/header_cell,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** header_cell 2001/10/09 00:52:45 1.2
--- header_cell 2001/10/14 20:54:47 1.3
***************
*** 4,6 ****
########################################-%]
! <td><b>[% INCLUDE show_label %]</b></td>
--- 4,6 ----
########################################-%]
! <td>[% INCLUDE show_label %]</td>
Index: show_label
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/template/show_label,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** show_label 2001/10/08 20:20:00 1.1
--- show_label 2001/10/14 20:54:47 1.2
***************
*** 1,5 ****
[%########################################
! show_label( label )
! Display a label.
########################################-%]
! <b>[% label %]</b>
\ No newline at end of file
--- 1,14 ----
[%########################################
! show_label( label, is_required, required_display )
! Display a label. If it's required, pass in a true value for
! 'is_required'. If it's required and you don't pass anything in
! for 'required_display' we use what's in the theme.
########################################-%]
! [%- req = '' -%]
! [% IF is_required -%]
! [%- IF NOT required_display -%]
! [%- required_display = OI.theme_properties.required -%]
! [%- END -%]
! [%- req = required_display -%]
! [% END %]
! <b>[% label %][% req %]</b>
\ No newline at end of file
|
|
From: Chris W. <la...@us...> - 2001-10-14 20:54:33
|
Update of /cvsroot/openinteract/OpenInteract/template
In directory usw-pr-cvs1:/tmp/cvs-serv8613/template
Added Files:
label_form_date_row
Log Message:
template widget for a date row
--- NEW FILE: label_form_date_row ---
[%########################################
label_form_date_row( label, count, name, value, field_label )
Display a row to input a date: label on left, date input on right.
########################################-%]
[%- DEFAULT colspan = 2; -%]
[%- INCLUDE label_row_begin( colspan = 1 ) -%]
[%- INCLUDE data_cell_begin -%]
[%- PROCESS date_select( object = OI.date_info_object( value ),
blank = 1, field_prefix = name ) -%]
[% field_label -%]
</td></tr>
|
|
From: Chris W. <la...@us...> - 2001-10-14 20:41:10
|
Update of /cvsroot/openinteract/OpenInteract/pkg/classified/template
In directory usw-pr-cvs1:/tmp/cvs-serv3295/template
Modified Files:
classified_detail.tmpl classified_form.tmpl
classified_list.tmpl classified_tools_box.tmpl
Added Files:
classified_search_form.meta classified_search_form.tmpl
classified_search_results.meta classified_search_results.tmpl
Log Message:
updated templates to use template widgets
--- NEW FILE: classified_search_form.meta ---
name: classified_search_form
title: Classified search form
package: classified
Form for searching classified ads
--- NEW FILE: classified_search_form.tmpl ---
[%- DEFAULT theme = OI.theme_properties;
SET count = 0;
OI.box_add( 'classified_tools_box' ); -%]
[%- PROCESS error_message -%]
[%- PROCESS status_message -%]
<div align="center">
<h2>Search Classified Ads</h2>
<p align="left">Enter criteria below to search classified ads. The
more criteria you enter, the more restrictive your search and the
fewer results you will retrieve.</p>
<form name="classified_search" method="GET" action="/Classified/search/">
[% INCLUDE table_bordered_begin( table_width = '75%' ) -%]
[%- count = count + 1 -%]
[% INCLUDE label_form_text_row( label = 'Keywords', name = 'keyword' ) -%]
[%- count = count + 1 -%]
[% INCLUDE label_form_date_row( label = 'Posted After Date', name = 'posted_after' ) -%]
[%- count = count + 1 -%]
[% INCLUDE form_submit_row( value = 'Search' ) -%]
[% INCLUDE table_bordered_end() -%]
</form>
</div>
--- NEW FILE: classified_search_results.meta ---
name: classified_search_results
title: Classified search results
package: classified
Search results for classifieds, with surrounding goop along with the
actual listing
--- NEW FILE: classified_search_results.tmpl ---
[%- DEFAULT theme = OI.theme_properties;
OI.box_add( 'classified_tools_box' ) -%]
[%- PROCESS error_message -%]
[%- PROCESS status_message -%]
<div align="center">
<h2 align="left">Classified Listings</h2>
<div align="center">
[% IF iterator AND iterator.has_next -%]
<p>Following are the classifieds that match your criteria.</p>
[% PROCESS classified::classified_list -%]
[% ELSE -%]
<p align="left">No classifieds matching your criteria are currently in
the database.</p>
[% END -%]
</div>
Index: classified_detail.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/template/classified_detail.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** classified_detail.tmpl 2001/08/13 16:10:15 1.4
--- classified_detail.tmpl 2001/10/14 20:41:07 1.5
***************
*** 1,18 ****
! [%- th = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
! [% OI.box_add( 'classified_tools_box', object = classified, view = 'static' ) %]
<div align="center">
<h2>Classified Ad: [% classified.title %]</h2>
! <table border="0" bgcolor="[% th.border_color %]" cellpadding="1" cellspacing="0" width="80%">
! <tr><td>
!
! <table border="0" cellpadding="5" cellspacing="0"
! width="100%" bgcolor="[% th.bgcolor %]">
! <tr><td bgcolor="[% th.border_color %]">
! <font size="+1" color="[% th.label_font_color %]"><b>[% classified.title %]</b></font>
</td></tr>
--- 1,25 ----
! [% MACRO label_text_two_row BLOCK -%]
! <tr><td bgcolor="[% theme.even_color %]">
! <b>[% label %]</b>
! </td></tr>
! <tr><td>
! [% text %]
! </td></tr>
! [% END -%]
+ [%- OI.box_add( 'classified_tools_box', object = classified, view = 'static' );
+ DEFAULT theme = OI.theme_properties -%]
+
+ [%- PROCESS error_message -%]
+ [%- PROCESS status_message -%]
+
<div align="center">
<h2>Classified Ad: [% classified.title %]</h2>
! [% INCLUDE table_bordered_begin( table_width = '80%', border_width = 1 ) -%]
! <tr><td bgcolor="[% theme.border_color %]">
! <font size="+1" color="[% theme.label_font_color %]"><b>[% classified.title %]</b></font>
</td></tr>
***************
*** 31,79 ****
[% IF classified.deadline %]
! <tr><td bgcolor="[% th.even_color %]">
! <b>Deadline</b>
! </td></tr>
! <tr><td>
! [% classified.deadline %]
! </td></tr>
[% END %]
[% IF classified.required_skills %]
! <tr><td bgcolor="[% th.even_color %]">
! <b>Required Skills</b>
! </td></tr>
! <tr><td>
! [% classified.required_skills %]
! </td></tr>
[% END %]
[% IF classified.recommended_skills %]
! <tr><td bgcolor="[% th.even_color %]">
! <b>Recommended Skills</b>
! </td></tr>
! <tr><td>
! [% classified.recommended_skills %]
! </td></tr>
[% END %]
[% IF classified.location %]
! <tr><td bgcolor="[% th.even_color %]">
! <b>Location</b>
! </td></tr>
! <tr><td>
! [% classified.location %]
! </td></tr>
[% END %]
[% IF classified.application_info %]
! <tr><td bgcolor="[% th.even_color %]">
! <b>Application Information</b>
! </td></tr>
! <tr><td>
! [% classified.application_info %]
! </td></tr>
[% END %]
! <tr><td bgcolor="[% th.even_color %]">
<b>Contact Information</b>
</td></tr>
--- 38,66 ----
[% IF classified.deadline %]
! [% label_text_two_row( label = 'Deadline',
! text = classified.deadline ) -%]
[% END %]
[% IF classified.required_skills %]
! [% label_text_two_row( label = 'Required Skills',
! text = classified.required_skills ) -%]
[% END %]
[% IF classified.recommended_skills %]
! [% label_text_two_row( label = 'Recommended Skills',
! text = classified.recommended_skills ) -%]
[% END %]
[% IF classified.location %]
! [% label_text_two_row( label = 'Location',
! text = classified.location ) -%]
[% END %]
[% IF classified.application_info %]
! [% label_text_two_row( label = 'Appliction Information',
! text = classified.application_info ) -%]
[% END %]
! <tr><td bgcolor="[% theme.even_color %]">
<b>Contact Information</b>
</td></tr>
***************
*** 87,92 ****
</td></tr>
! </table>
!
! </td></tr>
! </table>
--- 74,76 ----
</td></tr>
! [% PROCESS table_bordered_end -%]
\ No newline at end of file
Index: classified_form.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/template/classified_form.tmpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** classified_form.tmpl 2001/08/15 13:38:05 1.6
--- classified_form.tmpl 2001/10/14 20:41:07 1.7
***************
*** 1,202 ****
! [%- th = OI.theme_properties -%]
! [% OI.comp( 'showerror', error_msg = error_msg ) %]
! [% OI.box_add( 'classified_tools_box', object = classified, view = 'form' ) %]
<div align="center">
! <h2>Add/Update Classified Ad</h2>
! <form name="classified" action="[% main_script %]/edit/" method="post"
onsubmit="return data_check( this )">
-
- <table border="0" bgcolor="[% th.border_color %]" width="80%"
- cellpadding="1" cellspacing="0">
- <tr><td>
! <table border="0" bgcolor="[% th.bgcolor %]" width="100%"
! cellpadding="5" cellspacing="0">
! <tr valign="top" bgcolor="[% th.head_bgcolor %]">
<th colspan="2">
! <font color="[% th.head_font_color %]">
! [% IF classified.classified_id %]Edit a Classified Item[% ELSE %]Create a New Classified Item[% END %]
</font>
</th>
</tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Title</b>[% th.required %]</td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="title"
! value="[% classified.title %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Description</b>[% th.required %]</td>
! <td><font size="-1">
! <textarea rows="4" cols="30" wrap="virtual"
! name="description">[% OI.html_encode( classified.description ) %]</textarea>
! <br>HTML ok, but no funny stuff...
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Required Skills</b></td>
! <td><font size="-1">
! <textarea rows="4" cols="30" wrap="virtual"
! name="required_skills">[% OI.html_encode( classified.required_skills ) %]</textarea>
! <br>HTML ok, but no funny stuff...
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Recommended Skills</b></td>
! <td><font size="-1">
! <textarea rows="4" cols="30" wrap="virtual"
! name="recommended_skills">[% OI.html_encode( classified.recommended_skills ) %]</textarea>
! <br>HTML ok, but no funny stuff...
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Location</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="location"
! value="[% classified.location %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Application Instructions</b></td>
! <td><font size="-1">
! <textarea rows="4" cols="30" wrap="virtual"
! name="application_info">[% OI.html_encode( classified.application_info ) %]</textarea>
! <br>HTML ok, but no funny stuff...
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Contact Person</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="contact"
! value="[% classified.contact %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Organization</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="organization"
! value="[% classified.organization %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Phone</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="phone"
! value="[% classified.phone %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Fax</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="fax"
! value="[% classified.fax %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>E-Mail</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="email"
! value="[% classified.email %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td align="right"><b>Website URL</b></td>
! <td><font size="-1">
! <input type="text" size="20" maxlength="50" name="url"
! value="[% classified.url %]">
! </font></td>
! </tr>
! <tr valign="top" bgcolor="[% th.even_color %]">
! <td align="right"><b>Deadline</b></td>
! <td><font size="-1">
! [%- deadline_info = OI.date_into_object( classified.deadline ) -%]
! [%- OI.comp( 'dateselect', month_value = deadline_info.month,
! day_value = deadline_info.day,
! year_value = deadline_info.year, blank = 1,
! field_prefix = 'deadline' ) -%]
! </font> </td>
! </tr>
[% IF classified.tmp_security_level >= OI.security_level.write -%]
[%- active_choice = classified.active || 'no' -%]
! <tr bgcolor="[% th.admin_color %]">
! <td align="right"><b>Active?</b></td>
! <td><font size="-1">
! <select name="active">
! <option value="yes"[% ' SELECTED' IF active_choice == 'yes' %]>Yes</option>
! <option value="no"[% ' SELECTED' IF active_choice == 'no' %]>no</option>
! </select>
! </font></td>
! </tr>
!
[% END -%]
! <tr valign="top" bgcolor="[% th.odd_color %]">
! <td colspan="2" align="right"><input type="submit" value="Modify"></td>
! </tr>
! <tr valign="top" bgcolor="[% th.head_bgcolor %]"><td colspan="2"> </td></tr>
!
! </table>
! </td></tr>
! </table>
! <input type="hidden" name="classified_id"
! value="[% classified.classified_id %]">
</form>
-
- </div>
! <script language="Javascript">
!
! var default_value_fields = new Array( 'title', 'description', 'deadline' );
! var date_fields = new Array( 'deadline' );
! var field_titles = new Object;
! field_titles[ 'title' ] = 'Title';
! field_titles[ 'description' ] = 'Classified';
! field_titles[ 'deadline' ] = 'Deadline';
!
! function data_check ( form ) {
! var i;
!
! // Check to see that all .value fields have info
! for ( i = 0; i < default_value_fields.length; i++ ) {
! var field = default_value_fields[ i ];
! var value = form[ field ].value;
! if ( value == '' || value == null ) {
! alert( 'Please enter information in ' + field_titles[ field ] + '. Form not submitted.' );
! return false;
! }
! }
! return true;
! }
!
! function confirm_remove( classified_id ) {
! if ( confirm( 'Are you sure you want to remove classified item ' + classified_id + '?' ) ) {
! var URL = '[% main_script %]/remove/?classified_id=' + classified_id;
! self.location = URL;
! }
! }
!
! </script>
\ No newline at end of file
--- 1,115 ----
! [%- DEFAULT theme = OI.theme_properties;
! OI.box_add( 'classified_tools_box', object = classified, view = 'form' ) -%]
!
! [% PROCESS error_message %]
<div align="center">
! [%- display_action = ( classified.id ) ? 'Update' : 'Create' -%]
! <h2>[% display_action %] a Classified Ad</h2>
! <form name="classified" action="/Classified/edit/" method="post"
onsubmit="return data_check( this )">
! [% INCLUDE table_bordered_begin( table_width = '80%', border_width = 1 ) -%]
! <tr valign="top" bgcolor="[% theme.head_bgcolor %]">
<th colspan="2">
! <font color="[% theme.head_font_color %]">
! [% display_action %] a Classified Item
</font>
</th>
</tr>
! [%- count = 0 -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Title', is_required = 1,
! name = 'title', value = classified.title,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Description', is_required = 1,
! name = 'description', rows = 4,
! cols = 30, wrap = virtual,
! value = OI.html_encode( classified.description ) ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Required Skills',
! name = 'required_skills', rows = 4,
! cols = 30, wrap = virtual,
! value = OI.html_encode( classified.required_skills ) ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Recommended Skills',
! name = 'recommended_skills', rows = 4,
! cols = 30, wrap = virtual,
! value = OI.html_encode( classified.recommended_skills ) ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Location',
! name = 'location', value = classified.location,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_textarea_row( label = 'Application Instructions',
! name = 'application_info', rows = 4,
! cols = 30, wrap = virtual,
! value = OI.html_encode( classified.application_info ) ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Contact Person',
! name = 'contact', value = classified.contact,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Organization',
! name = 'organization', value = classified.organization,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Phone',
! name = 'phone', value = classified.phone,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'Fax',
! name = 'fax', value = classified.fax,
! size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_text_row( label = 'E-Mail',
! name = 'email', value = classified.email,
! size = 20, maxlength = 50 ) -%]
+ [%- count = count + 1 -%]
+ [% INCLUDE label_form_text_row( label = 'Website URL',
+ name = 'url', value = classified.url,
+ size = 20, maxlength = 50 ) -%]
! [%- count = count + 1 -%]
! [% INCLUDE label_form_date_row( label = 'Deadline',
! name = 'deadline', value = classified.deadline ) -%]
[% IF classified.tmp_security_level >= OI.security_level.write -%]
[%- active_choice = classified.active || 'no' -%]
! [% INCLUDE label_form_select_row( color = theme.admin_color,
! label = 'Active?',
! picked = active_choice,
! name = 'active', plain = 1,
! value_list = [ 'yes', 'no' ],
! label_list = [ 'Yes', 'No' ] ) -%]
[% END -%]
! [%- count = count + 1 -%]
! [% INCLUDE form_submit_row( value = 'Modify' ) -%]
! <tr valign="top" bgcolor="[% theme.head_bgcolor %]"><td colspan="2"> </td></tr>
! [% PROCESS table_bordered_end -%]
! [% PROCESS form_hidden( name = 'classified_id', value = classified.id ) -%]
</form>
! </div>
\ No newline at end of file
Index: classified_list.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/template/classified_list.tmpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** classified_list.tmpl 2001/08/13 16:10:15 1.6
--- classified_list.tmpl 2001/10/14 20:41:07 1.7
***************
*** 1,75 ****
- [%- th = OI.theme_properties -%]
- [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
- [%- OI.box_add( 'classified_tools_box' ) -%]
-
- <div align="center">
-
- <h2 align="left">Classified Listings</h2>
-
- [% IF classified_iterator AND classified_iterator.has_next -%]
-
- <table border="0" bgcolor="[% th.border_color %]"
- cellspacing="0" cellpadding="1">
- <tr><td>
-
- <table border="0" bgcolor="[% th.classified_border_color %]" width="100%"
- cellspacing="0" cellpadding="5">
- <tr align="center" bgcolor="[% th.head_bgcolor %]" >
- <td><font color="[% th.head_font_color %]"><b>Posted on</b></font></td>
- <td><font color="[% th.head_font_color %]"><b>By</b></font></td>
- <td><font color="[% th.head_font_color %]"><b>Title</b></font></td>
- <td><font color="[% th.head_font_color %]"><b>Deadline</b></font></td>
- <td><font color="[% th.head_font_color %]"><b>Actions</b></font></td></tr>
! [%- count = 0 -%]
! [% WHILE ( classified = classified_iterator.get_next ) -%]
! [%- SET row_color = th.odd_color -%]
! [%- SET row_color = th.even_color IF count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]" valign="top">
<td align="center"><font size="-1">[% classified.posted_on %]</font></td>
<td align="center"><font size="-1">
! [%- poster = classified.posted_by_user -%]
! [%- IF poster -%]
! [%- poster_oi = poster.object_description -%]
! <a href="[% poster_oi.url %]">[% poster.login_name %]</a>
! [%- ELSE -%]
! public
! [%- END -%]
! </font></td>
<td><font size="-1">[% classified.title %]</font></td>
! <td align="center"><font size="-1">
! [% classified.deadline %]
! </font></td>
! <td><font size="-1">
! <a href="[% main_script %]/show/?classified_id=[% classified.classified_id %]">Detail</a>
! | <a href="javascript:notify( '[% classified.classified_id %]' )">Notify</a>
[%- IF classified.tmp_security_level == OI.security_level.write -%]
! | <a href="[% main_script %]/show/?edit=1;classified_id=[% classified.classified_id %]">Edit</a>
[% END -%]
</font></td>
</tr>
! [%- count = count + 1 -%]
! [% END %]
! </table>
!
! </td></tr>
! </table>
- [% ELSE %]
- <p align="left">No classifieds are currently in the database.</p>
- [% END %]
! </div>
! <script language="Javascript">
! function notify ( classified_id ) {
! var email = prompt( 'Who should receive this classified object? (e-mail address only)' );
! if ( email != '' && email != null ) {
! var URL = '/Popup[% main_script %]/notify/?classified_id=' + classified_id + ';email=' + escape( email );
! var notifyWin = window.open( URL, 'notifyWin', 'width=200,height=200' );
! notifyWin.focus();
! }
! }
! </script>
\ No newline at end of file
--- 1,36 ----
! [% BLOCK classified_row -%]
! [%- SET poster = classified.posted_by_user;
! SET poster_oi = poster.object_description IF poster;
! SET view_url = OI.make_url( base = '/Classified/show/',
! classified_id = classified.id );
! SET edit_url = OI.make_url( base = '/Classified/show/', edit = 1,
! classified_id = classified.id );
! -%]
! <tr valign="top" align="center" bgcolor="[% PROCESS row_color %]">
<td align="center"><font size="-1">[% classified.posted_on %]</font></td>
<td align="center"><font size="-1">
! [%- IF poster %]<a href="[% poster_oi.url %]">[% poster.login_name %]</a>
! [%- ELSE %]public[% END %]</font></td>
<td><font size="-1">[% classified.title %]</font></td>
! <td align="center"><font size="-1">[% classified.deadline %] </font></td>
! <td><font size="-1"><a href="[% view_url %]">Detail</a>
[%- IF classified.tmp_security_level == OI.security_level.write -%]
! | <a href="[% edit_url %]">Edit</a>
[% END -%]
</font></td>
</tr>
! [% END -%]
! [% INCLUDE table_bordered_begin() -%]
! [% INCLUDE header_row( labels = [ 'Posted On', 'By', 'Title', 'Deadline', 'Actions'] ) -%]
! [% count = 1 -%]
! [% WHILE ( classified = iterator.get_next ) -%]
! [% PROCESS classified_row -%]
! [%- count = count + 1 -%]
! [% END -%]
! [% PROCESS table_bordered_end() -%]
\ No newline at end of file
Index: classified_tools_box.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/classified/template/classified_tools_box.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** classified_tools_box.tmpl 2001/08/13 16:10:15 1.4
--- classified_tools_box.tmpl 2001/10/14 20:41:07 1.5
***************
*** 1,11 ****
! [%- th = OI.theme_properties -%]
<font size="-1">
! [% th.bullet %] <a href="/Classified/listing/">List classified ads</a><br>
! [% th.bullet %] <a href="/Classified/show/?edit=1">Create a new classified ad</a><br>
[%- IF object and object.id and object.tmp_security_level == OI.security_level.write -%]
! [% th.bullet %] <a href="/Classified/remove/?classified_id=[% object.id %]">Remove this classified ad</a><br>
! [% th.bullet %] <a href="/Classified/show/?edit=1;classified_id=[% object.id %]">Edit this classified ad</a><br>
! [% th.bullet %] <a href="/Classified/show/?classified_id=[% object.id %]">View this classified ad</a><br>
! [% END -%]
</font>
--- 1,18 ----
! [%- DEFAULT theme = OI.theme_properties;
! search_url = OI.make_url( base = '/Classified/search_form/' );
! new_url = OI.make_url( base = '/Classified/show/', edit = 1 ); -%]
<font size="-1">
! [% theme.bullet %] <a href="[% search_url %]">Search classified ads</a><br>
! [% theme.bullet %] <a href="[% new_url %]">Create a new classified ad</a>
[%- IF object and object.id and object.tmp_security_level == OI.security_level.write -%]
! [%- remove_url = OI.make_url( base = '/Classified/remove/', classified_id = classified.id );
! view_url = OI.make_url( base = '/Classified/show/', classified_id = classified.id );
! edit_url = OI.make_url( base = '/Classified/show/', edit = 1, classified_id = classified.id ); -%]
! <br>
! [%- theme.bullet %] <a href="[% remove_url %]">Remove this classified ad</a><br>
! [%- theme.bullet %] <a href="[% edit_url %]">Edit this classified ad</a><br>
! [%- theme.bullet %] <a href="[% view_url %]">View this classified ad</a>
! [%- END -%]
!
</font>
|