Index: openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql 28 Aug 2003 09:42:00 -0000 1.8
+++ openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql 22 Sep 2003 18:43:24 -0000 1.9
@@ -741,6 +741,1166 @@
select inline_11 ();
drop function inline_11 ();
+--jackp: From here on the functions are defined
+
+--jackp: To p_create each presentation
+create function wp_presentation__new (
+ timestamp,
+ integer,
+ varchar(400),
+ varchar(400),
+ varchar(400),
+ varchar,
+ integer,
+ boolean,
+ boolean,
+ varchar,
+ varchar,
+ integer
+)
+returns integer as'
+declare
+ p_creation_date alias for $1;
+ p_creation_user alias for $2;
+ p_creation_ip alias for $3;
+ p_pres_title alias for $4;
+ p_page_signature alias for $5;
+ p_copyright_notice alias for $6;
+ p_style alias for $7;
+ p_public_p alias for $8;
+ p_show_modified_p alias for $9;
+ aud alias for $10;
+ back alias for $11;
+ p_parent_id alias for $12;
+ v_item_id cr_items.item_id%TYPE;
+ v_audience_item_id cr_items.item_id%TYPE;
+ v_background_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_audience_revision_id cr_revisions.revision_id%TYPE;
+ v_background_revision_id cr_revisions.revision_id%TYPE;
+ v_max_id integer;
+ v_name cr_wp_presentations.pres_title%TYPE;
+begin
+ select coalesce(max(item_id),0) into v_max_id
+ from cr_items
+ where content_type = ''cr_wp_presentation''
+ and name like p_pres_title || ''%'';
+
+ v_name := p_pres_title || ''_'' || v_max_id;
+
+ v_item_id := content_item__new(
+ v_name,
+ p_parent_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_presentation'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+ v_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ null,
+ v_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_revision_id);
+
+--jackp: Actually place the information entered by the user into the table
+ insert into cr_wp_presentations
+ (
+ presentation_id,
+ pres_title,
+ page_signature,
+ copyright_notice,
+ style,
+ public_p,
+ show_modified_p
+ ) values (
+ v_revision_id,
+ p_pres_title,
+ p_page_signature,
+ p_copyright_notice,
+ p_style,
+ p_public_p,
+ p_show_modified_p
+ );
+
+ v_audience_item_id := content_item__new(
+ aud,
+ v_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_presentation_aud'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+ v_audience_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ aud,
+ v_audience_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_audience_revision_id);
+
+ insert into cr_wp_presentations_aud
+ (
+ id,
+ presentation_id
+ ) values (
+ v_audience_revision_id,
+ v_revision_id
+ );
+
+ v_background_item_id := content_item__new(
+ back,
+ v_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_presentation_back'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+ v_background_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ back,
+ v_background_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_background_revision_id);
+
+ insert into cr_wp_presentations_back
+ (
+ id,
+ presentation_id
+ ) values (
+ v_background_revision_id,
+ v_revision_id
+ );
+
+ return v_item_id;
+end;' language 'plpgsql';
+
+create function wp_presentation__delete_audience (
+ integer
+)
+returns integer as'
+declare
+ audience_item_id alias for $1;
+begin
+ delete from cr_wp_presentations_aud
+ where exists (select 1 from cr_revisions where revision_id = cr_wp_presentations_aud.id and item_id = audience_item_id);
+ delete from cr_item_publish_audit
+ where item_id = audience_item_id;
+
+ PERFORM content_item__delete(audience_item_id);
+return 0;
+end;' language 'plpgsql';
+
+create function wp_presentation__delete_background (
+ integer
+)
+returns integer as'
+declare
+ background_item_id alias for $1;
+begin
+ delete from cr_wp_presentations_back
+ where exists (select 1 from cr_revisions where revision_id = cr_wp_presentations_back.id and item_id = background_item_id);
+ delete from cr_item_publish_audit
+ where item_id = background_item_id;
+
+ PERFORM content_item__delete(background_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_presentation__delete (
+ integer
+)
+returns integer as'
+declare
+ pres_item_id alias for $1;
+ v_audience_item_id cr_items.item_id%TYPE;
+ v_background_item_id cr_items.item_id%TYPE;
+ del_rec record;
+begin
+ for del_rec in select item_id as slide_item_id
+ from cr_items
+ where content_type = ''cr_wp_slide''
+ and parent_id = pres_item_id
+ loop
+ PERFORM wp_slide__delete(del_rec.slide_item_id);
+ end loop;
+
+ select item_id into v_audience_item_id
+ from cr_items
+ where content_type = ''cr_wp_presentation_aud''
+ and parent_id = pres_item_id;
+
+ PERFORM wp_presentation__delete_audience(v_audience_item_id);
+
+ select item_id into v_background_item_id
+ from cr_items
+ where content_type = ''cr_wp_presentation_back''
+ and parent_id = pres_item_id;
+
+ PERFORM wp_presentation__delete_background(v_background_item_id);
+
+ delete from acs_permissions where object_id = pres_item_id;
+ -- update acs_objects set context_id=null where context_id = pres_item_id;
+ delete from cr_wp_presentations where exists (select 1 from cr_revisions where cr_revisions.revision_id = cr_wp_presentations.presentation_id and cr_revisions.item_id = pres_item_id);
+ PERFORM content_item__delete(pres_item_id);
+return 0;
+end;' language 'plpgsql';
+
+-- DRB: All these could've been implemented as a single function with a type argument
+-- but I'm not going to rewrite all of wp-slim's queries just to clean this up...
+
+create function wp_presentation__get_ad_revision (integer) returns text as '
+declare
+ p_pres_revision_id alias for $1;
+begin
+ return r.content
+ from cr_revisions r,
+ cr_wp_presentations_aud pa
+ where pa.presentation_id = p_pres_revision_id
+ and r.revision_id = pa.id;
+end;' language 'plpgsql';
+
+create function wp_presentation__get_audience (
+ integer
+) returns text as'
+declare
+ p_pres_item_id alias for $1;
+begin
+ return content
+ from cr_revisions, cr_items
+ where cr_items.content_type = ''cr_wp_presentation_aud''
+ and cr_items.parent_id = p_pres_item_id
+ and cr_revisions.revision_id = cr_items__live_revision;
+end;' language 'plpgsql';
+
+create function wp_presentation__get_bg_revision (integer) returns text as '
+declare
+ p_pres_revision_id alias for $1;
+begin
+ return r.content
+ from cr_revisions r,
+ cr_wp_presentations_aud pa
+ where pa.presentation_id = p_pres_revision_id
+ and r.revision_id = pa.id;
+end;' language 'plpgsql';
+
+create function wp_presentation__get_background (
+ integer
+) returns text as'
+declare
+ pres_item_id alias for $1;
+begin
+ return content
+ from cr_revisions, cr_items
+ where cr_items.content_type = ''cr_wp_presentation_bak''
+ and cr_items.parent_id = p_pres_item_id
+ and cr_revisions.revision_id = cr_items__live_revision;
+end;' language 'plpgsql';
+
+
+create function wp_presentation__new_revision (
+ timestamp,
+ integer,
+ varchar,
+ integer,
+ varchar(400),
+ varchar(200),
+ varchar(400),
+ integer,
+ boolean,
+ boolean,
+ varchar,
+ varchar
+) returns integer as'
+declare
+ p_creation_date alias for $1;
+ p_creation_user alias for $2;
+ p_creation_ip alias for $3;
+ p_pres_item_id alias for $4;
+ p_pres_title alias for $5;
+ p_page_signature alias for $6;
+ p_copyright_notice alias for $7;
+ p_style alias for $8;
+ p_public_p alias for $9;
+ p_show_modified_p alias for $10;
+ p_audience alias for $11;
+ p_background alias for $12;
+ v_audience_item_id cr_items.item_id%TYPE;
+ v_background_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_audience_revision_id cr_revisions.revision_id%TYPE;
+ v_background_revision_id cr_revisions.revision_id%TYPE;
+begin
+ v_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ null,
+ p_pres_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_revision_id);
+
+ insert into cr_wp_presentations
+ (
+ presentation_id,
+ pres_title,
+ page_signature,
+ copyright_notice,
+ style,
+ public_p,
+ show_modified_p
+ ) values (
+ v_revision_id,
+ p_pres_title,
+ p_page_signature,
+ p_copyright_notice,
+ p_style,
+ p_public_p,
+ p_show_modified_p
+ );
+
+ select item_id into v_audience_item_id
+ from cr_items
+ where parent_id = p_pres_item_id
+ and content_type = ''cr_wp_presentation_aud'';
+
+ v_audience_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_audience,
+ v_audience_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_audience_revision_id);
+
+ insert into cr_wp_presentations_aud
+ (
+ id,
+ presentation_id
+ ) values (
+ v_audience_revision_id,
+ v_revision_id
+ );
+
+ select item_id into v_background_item_id
+ from cr_items
+ where parent_id = p_pres_item_id
+ and content_type = ''cr_wp_presentation_back'';
+
+ v_background_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_background,
+ v_background_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_background_revision_id);
+
+ insert into cr_wp_presentations_back
+ (
+ id,
+ presentation_id
+ ) values (
+ v_background_revision_id,
+ v_revision_id
+ );
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_slide__new (
+ integer,
+ timestamp,
+ integer,
+ varchar,
+ varchar,
+ integer,
+ integer,
+ integer,
+ varchar,
+ varchar,
+ varchar,
+ boolean,
+ boolean,
+ integer
+) returns integer as'
+declare
+ p_pres_item_id alias for $1;
+ p_creation_date alias for $2;
+ p_creation_user alias for $3;
+ p_creation_ip alias for $4;
+ p_slide_title alias for $5;
+ p_style alias for $6;
+ p_original_slide_id alias for $7;
+ p_sort_key alias for $8;
+ p_preamble alias for $9;
+ p_bullet_items alias for $10;
+ p_postamble alias for $11;
+ p_include_in_outline_p alias for $12;
+ p_context_break_after_p alias for $13;
+ p_context_id alias for $14;
+ v_item_id cr_items.item_id%TYPE;
+ v_preamble_item_id cr_items.item_id%TYPE;
+ v_postamble_item_id cr_items.item_id%TYPE;
+ v_bullet_items_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_preamble_revision_id cr_revisions.revision_id%TYPE;
+ v_postamble_revision_id cr_revisions.revision_id%TYPE;
+ v_bullet_items_revision_id cr_revisions.revision_id%TYPE;
+ v_max_id integer;
+ v_name varchar;
+begin
+ select coalesce(max(item_id),0) into v_max_id
+ from cr_items
+ where content_type = ''cr_wp_slide''
+ and name like p_slide_title || ''%'';
+
+ v_name := p_slide_title || ''_'' || v_max_id;
+
+ v_item_id := content_item__new(
+ v_name,
+ p_pres_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_slide'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+ v_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ null,
+ v_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_revision_id);
+
+ update cr_wp_slides
+ set sort_key = sort_key + 1
+ where sort_key >= p_sort_key
+ and exists (select 1 from cr_items, cr_revisions where parent_id =
+ p_pres_item_id and cr_items.item_id = cr_revisions.item_id
+ and cr_revisions.revision_id=cr_wp_slides.slide_id);
+
+ insert into cr_wp_slides
+ (
+ slide_id,
+ original_slide_id,
+ sort_key,
+ slide_title,
+ include_in_outline_p,
+ context_break_after_p,
+ style
+ ) values (
+ v_revision_id,
+ p_original_slide_id,
+ p_sort_key,
+ p_slide_title,
+ p_include_in_outline_p,
+ p_context_break_after_p,
+ p_style
+ );
+
+ v_preamble_item_id := content_item__new(
+ ''preamble'',
+ v_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_slide_preamble'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+ v_preamble_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_preamble,
+ v_preamble_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_preamble_revision_id);
+
+ insert into cr_wp_slides_preamble
+ (
+ id,
+ slide_id
+ ) values (
+ v_preamble_revision_id,
+ v_revision_id
+ );
+
+ v_postamble_item_id := content_item__new(
+ ''postamble'',
+ v_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_slide_postamble'',
+ null,
+ null,
+ ''text/plain'',
+ null,
+ null,
+ ''text''
+ );
+
+
+ v_postamble_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_postamble,
+ v_postamble_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_postamble_revision_id);
+
+ insert into cr_wp_slides_postamble
+ (
+ id,
+ slide_id
+ ) values (
+ v_postamble_revision_id,
+ v_revision_id
+ );
+
+ v_bullet_items_item_id := content_item__new(
+ ''bullet_items'',
+ v_item_id,
+ null,
+ null,
+ p_creation_date,
+ p_creation_user,
+ null,
+ p_creation_ip,
+ ''content_item'',
+ ''cr_wp_slide_bullet_items'',
+ null,
+ null,
+ null,
+ ''text/plain'',
+ null,
+ ''text''
+ );
+
+
+ v_bullet_items_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_bullet_items,
+ v_bullet_items_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_bullet_items_revision_id);
+
+ insert into cr_wp_slides_bullet_items
+ (
+ id,
+ slide_id
+ ) values (
+ v_bullet_items_revision_id,
+ v_revision_id
+ );
+ return v_item_id;
+end;' language 'plpgsql';
+
+create function wp_slide__delete_preamble (
+ integer
+) returns integer as'
+declare
+ delete_preamble__preamble_item_id alias for $1;
+begin
+ delete from cr_wp_slides_preamble
+ where exists (select 1 from cr_revisions where revision_id =
+ cr_wp_slides_preamble.id
+ and item_id = delete_preamble__preamble_item_id);
+
+ delete from cr_item_publish_audit
+ where item_id = delete_preamble__preamble_item_id;
+
+ PERFORM content_item__delete(delete_preamble__preamble_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_slide__delete_postamble(
+ integer
+) returns integer as'
+declare
+ delete_postamble__postamble_item_id alias for $1;
+begin
+ delete from cr_wp_slides_postamble
+ where exists (select 1 from cr_revisions where revision_id =
+ cr_wp_slides_postamble.id
+ and item_id = delete_postamble__postamble_item_id);
+
+ delete from cr_item_publish_audit
+ where item_id = delete_postamble__postamble_item_id;
+
+ PERFORM content_item__delete(delete_postamble__postamble_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_slide__delete_bullet_items(
+ integer
+) returns integer as'
+declare
+ delete_bullet_items__bullet_items_item_id alias for $1;
+begin
+ delete from cr_wp_slides_bullet_items
+ where exists (select 1 from cr_revisions where revision_id =
+ cr_wp_slides_bullet_items.id
+ and item_id = delete_bullet_items__bullet_items_item_id);
+
+ delete from cr_item_publish_audit
+ where item_id = delete_bullet_items__bullet_items_item_id;
+
+ PERFORM content_item__delete(delete_bullet_items__bullet_items_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_slide__delete(
+ integer
+) returns integer as'
+declare
+ del_rec record;
+ slide_item_id alias for $1;
+ v_sort_key cr_wp_slides.sort_key%TYPE;
+ v_pres_item_id cr_items.item_id%TYPE;
+ v_preamble_item_id cr_items.item_id%TYPE;
+ v_postamble_item_id cr_items.item_id%TYPE;
+ v_bullet_items_item_id cr_items.item_id%TYPE;
+begin
+ for del_rec in select item_id as attach_item_id
+ from cr_items
+ where content_type in (''cr_wp_image_attachment'', ''cr_wp_file_attachment'')
+ and parent_id = slide_item_id
+ loop
+ PERFORM wp_attachment__delete(del_rec.attach_item_id);
+ end loop;
+
+ select item_id into v_preamble_item_id
+ from cr_items
+ where content_type = ''cr_wp_slide_preamble''
+ and parent_id = slide_item_id;
+
+ PERFORM wp_slide__delete_preamble(v_preamble_item_id);
+
+ select item_id into v_postamble_item_id
+ from cr_items
+ where content_type = ''cr_wp_slide_postamble''
+ and parent_id = slide_item_id;
+
+ PERFORM wp_slide__delete_postamble(v_postamble_item_id);
+
+ select item_id into v_bullet_items_item_id
+ from cr_items
+ where content_type = ''cr_wp_slide_bullet_items''
+ and parent_id = slide_item_id;
+
+ PERFORM wp_slide__delete_bullet_items(v_bullet_items_item_id);
+
+-- sort_key of all revisions should be the same
+ select max(s.sort_key), max(i.parent_id) into v_sort_key,
+ v_pres_item_id
+ from cr_wp_slides s, cr_revisions r, cr_items i
+ where r.item_id = slide_item_id
+ and r.revision_id = s.slide_id
+ and i.item_id = r.item_id;
+
+ delete from cr_wp_slides where exists (select 1 from cr_revisions
+ where cr_revisions.revision_id = cr_wp_slides.slide_id
+ and cr_revisions.item_id = slide_item_id);
+
+ update cr_wp_slides set sort_key = sort_key - 1
+ where sort_key > v_sort_key and exists
+ (select 1 from cr_revisions r, cr_items i
+ where i.parent_id = v_pres_item_id and i.item_id = r.item_id
+ and r.revision_id = cr_wp_slides.slide_id);
+
+-- update acs_objects set context_id=null
+-- where context_id = slide_item_id;
+
+ delete from cr_item_publish_audit where item_id = slide_item_id;
+
+ PERFORM content_item__delete(slide_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_slide__get_preamble_revision (
+ integer
+) returns text as '
+declare
+ p_slide_revision_id alias for $1;
+begin
+ return content
+ from cr_revisions r, cr_wp_slides_preamble sp
+ where sp.slide_id = p_slide_revision_id
+ and r.revision_id = sp.id;
+end;' language 'plpgsql';
+
+create function wp_slide__get_postamble_revision (
+ integer
+) returns text as '
+declare
+ p_slide_revision_id alias for $1;
+begin
+ return content
+ from cr_revisions r, cr_wp_slides_postamble sp
+ where sp.slide_id = p_slide_revision_id
+ and r.revision_id = sp.id;
+end;' language 'plpgsql';
+
+create function wp_slide__get_bullet_items_revision (
+ integer
+) returns text as '
+declare
+ p_slide_revision_id alias for $1;
+begin
+ return content
+ from cr_revisions r, cr_wp_slides_bullet_items sp
+ where sp.slide_id = p_slide_revision_id
+ and r.revision_id = sp.id;
+end;' language 'plpgsql';
+
+create function wp_slide__get_postamble(
+ integer
+) returns text as '
+declare
+ p_slide_item_id alias for $1;
+begin
+ return content
+ from cr_revisions, cr_items
+ where cr_items.content_type = ''cr_wp_slide_postamble''
+ and cr_items.parent_id = p_slide_item_id
+ and cr_revisions.revision_id = cr_items.live_revision;
+end;' language 'plpgsql';
+
+create function wp_slide__get_preamble(
+ integer
+) returns text as'
+declare
+ p_slide_item_id alias for $1;
+begin
+ return content
+ from cr_revisions, cr_items
+ where cr_items.content_type = ''cr_wp_slide_preamble''
+ and cr_items.parent_id = p_slide_item_id
+ and cr_revisions.revision_id = cr_items.live_revision;
+end;' language 'plpgsql';
+
+create function wp_slide__get_bullet_items(
+ integer
+) returns text as'
+declare
+ p_slide_item_id alias for $1;
+begin
+ return content
+ from cr_revisions, cr_items
+ where cr_items.content_type = ''cr_wp_slide_bullet_items''
+ and cr_items.parent_id = p_slide_item_id
+ and cr_revisions.revision_id = cr_items.live_revision;
+end;' language 'plpgsql';
+
+create function wp_slide__new_revision(
+ timestamp,
+ integer,
+ varchar,
+ integer,
+ varchar,
+ text,
+ varchar,
+ varchar,
+ integer,
+ integer,
+ integer,
+ boolean,
+ boolean
+) returns integer as'
+declare
+ p_creation_date alias for $1;
+ p_creation_user alias for $2;
+ p_creation_ip alias for $3;
+ p_slide_item_id alias for $4;
+ p_slide_title alias for $5;
+ p_preamble alias for $6;
+ p_bullet_items alias for $7;
+ p_postamble alias for $8;
+ p_style alias for $9;
+ p_original_slide_id alias for $10;
+ p_sort_key alias for $11;
+ p_include_in_outline_p alias for $12;
+ p_context_break_after_p alias for $13;
+ v_preamble_item_id cr_items.item_id%TYPE;
+ v_postamble_item_id cr_items.item_id%TYPE;
+ v_bullet_items_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_preamble_revision_id cr_revisions.revision_id%TYPE;
+ v_postamble_revision_id cr_revisions.revision_id%TYPE;
+ v_bullet_items_revision_id cr_revisions.revision_id%TYPE;
+begin
+ v_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ null,
+ p_slide_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_revision_id);
+
+ insert into cr_wp_slides
+ (
+ slide_id,
+ slide_title,
+ style,
+ original_slide_id,
+ sort_key,
+ include_in_outline_p,
+ context_break_after_p
+ ) values (
+ v_revision_id,
+ p_slide_title,
+ p_style,
+ p_original_slide_id,
+ p_sort_key,
+ p_include_in_outline_p,
+ p_context_break_after_p
+ );
+
+ select item_id into v_preamble_item_id
+ from cr_items
+ where parent_id = p_slide_item_id
+ and content_type = ''cr_wp_slide_preamble'';
+
+ v_preamble_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_preamble,
+ v_preamble_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_preamble_revision_id);
+
+ insert into cr_wp_slides_preamble
+ (
+ id,
+ slide_id
+ ) values (
+ v_preamble_revision_id,
+ v_revision_id
+ );
+
+ select item_id into v_postamble_item_id
+ from cr_items
+ where parent_id = p_slide_item_id
+ and content_type = ''cr_wp_slide_postamble'';
+
+ v_postamble_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_postamble,
+ v_postamble_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_postamble_revision_id);
+
+ insert into cr_wp_slides_postamble
+ (
+ id,
+ slide_id
+ ) values (
+ v_postamble_revision_id,
+ v_revision_id
+ );
+
+ select item_id into v_bullet_items_item_id
+ from cr_items
+ where parent_id = p_slide_item_id
+ and content_type = ''cr_wp_slide_bullet_items'';
+
+ v_bullet_items_revision_id := content_revision__new(
+ null,
+ null,
+ current_timestamp,
+ ''text/plain'',
+ null,
+ p_bullet_items,
+ v_bullet_items_item_id,
+ null,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip
+ );
+
+ PERFORM content_item__set_live_revision(v_bullet_items_revision_id);
+
+ insert into cr_wp_slides_bullet_items
+ (
+ id,
+ slide_id
+ ) values (
+ v_bullet_items_revision_id,
+ v_revision_id
+ );
+ return 0;
+end;' language 'plpgsql';
+
+-- bug fixed, delete first an image then a file, roc@
+create function wp_attachment__delete(
+ integer
+) returns integer as'
+declare
+ p_attach_item_id alias for $1;
+begin
+
+ delete from cr_wp_image_attachments
+ where exists (select 1 from cr_revisions where revision_id
+ = cr_wp_image_attachments.attach_id
+ and item_id = p_attach_item_id);
+
+ delete from cr_wp_file_attachments
+ where exists (select 1 from cr_revisions where revision_id
+ = cr_wp_file_attachments.attach_id
+ and item_id = p_attach_item_id);
+
+ delete from cr_item_publish_audit
+ where item_id = p_attach_item_id;
+
+ PERFORM content_item__delete(p_attach_item_id);
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_attachment__new_revision (
+ integer
+) returns integer as'
+declare
+ p_attach_item_id alias for $1;
+begin
+ return 0;
+end; 'language 'plpgsql';
+
+
+
+
+create function wp_presentation__set_live_revision(integer) returns integer as '
+declare
+ p_revision_id alias for $1;
+ v_revision_id integer;
+begin
+ perform content_item__set_live_revision(p_revision_id);
+
+ select id into v_revision_id
+ from cr_wp_presentations_aud
+ where presentation_id = p_revision_id;
+
+ perform content_item__set_live_revision(v_revision_id);
+
+ select id into v_revision_id
+ from cr_wp_presentations_back
+ where presentation_id = p_revision_id;
+
+ perform content_item__set_live_revision(v_revision_id);
+ return 0;
+end;' language 'plpgsql';
+
+
+-- style functions roc@
+
+create function wp_style__delete(
+ integer
+) returns integer as'
+declare
+ p_style_id alias for $1;
+ p_item_id integer;
+ one_image record;
+begin
+
+ for one_image in
+ select * from wp_style_images
+ where wp_style_images_id = (select background_image from wp_styles where style_id = p_style_id)
+ loop
+ delete from wp_style_images where wp_style_images_id = one_image.wp_style_images_id;
+ select item_id into p_item_id from cr_revisions where revision_id = one_image.wp_style_images_id;
+ PERFORM content_item__delete(p_item_id);
+ end loop;
+
+ update cr_wp_slides set style = -1 where style = p_style_id;
+ update cr_wp_presentations set style = -1 where style = p_style_id;
+ delete from wp_styles where style_id = p_style_id;
+
+ return 0;
+end;' language 'plpgsql';
+
+create function wp_style__image_delete(
+ integer
+) returns integer as'
+declare
+ p_revision_id alias for $1;
+ p_item_id integer;
+begin
+
+ update wp_styles set background_image = 0 where background_image = p_revision_id;
+
+ delete from wp_style_images
+ where wp_style_images_id = p_revision_id;
+
+ select item_id into p_item_id from cr_revisions where revision_id = p_revision_id;
+
+ PERFORM content_item__delete(p_item_id);
+
+ return 0;
+end;' language 'plpgsql';
+
+
-- new permissions roc@
select acs_privilege__add_child('wp_edit_presentation', 'wp_view_presentation');
select acs_privilege__add_child('wp_admin_presentation', 'wp_create_presentation');
Index: openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 28 Aug 2003 09:42:00 -0000 1.5
+++ openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 22 Sep 2003 18:43:24 -0000 1.6
@@ -377,7 +377,7 @@
--drop package wp_slide;
DROP FUNCTION wp_slide__new(
integer,
- timestamptz,
+ timestamp,
integer,
varchar,
varchar,
@@ -417,7 +417,7 @@
--drop package wp_presentation;
DROP FUNCTION wp_presentation__new(
- timestamptz,
+ timestamp,
integer,
varchar,
varchar,
@@ -459,7 +459,7 @@
);
drop function wp_slide__new_revision(
- timestamptz,
+ timestamp,
integer,
varchar,
integer,
@@ -474,13 +474,13 @@
boolean);
drop function wp_presentation__new_revision (
- timestamptz,
+ timestamp,
integer,
varchar,
integer,
- varchar,
- varchar,
- varchar,
+ varchar(400),
+ varchar(200),
+ varchar(400),
integer,
boolean,
boolean,
Index: openacs-4/packages/wp-slim/tcl/printer-view-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/tcl/printer-view-procs-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/wp-slim/tcl/printer-view-procs-oracle.xql 28 Aug 2003 09:42:00 -0000 1.2
+++ openacs-4/packages/wp-slim/tcl/printer-view-procs-oracle.xql 22 Sep 2003 18:42:24 -0000 1.3
@@ -1,7 +1,7 @@
Here is the actual error message:
+
Index: openacs-4/packages/wp-slim/www/attach-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-detail.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/attach-detail.tcl 28 Aug 2003 09:42:00 -0000 1.5
+++ openacs-4/packages/wp-slim/www/attach-detail.tcl 22 Sep 2003 18:41:27 -0000 1.6
@@ -35,16 +35,18 @@
permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
-set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "Edit Slide"] "Details"]
+set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.Details]"]
db_multirow revisions revisions_get {
select r.revision_id,
- to_char(ao.creation_date, 'HH24:MI:SS Mon DD, YYYY') as creation_date,
+ ao.creation_date as creation_date,
ao.creation_ip
from cr_revisions r,
acs_objects ao
where r.item_id = :attach_item_id
and ao.object_id = r.revision_id
+} {
+ set creation_date [lc_time_fmt $creation_date "%X %Q"]
}
Index: openacs-4/packages/wp-slim/www/attach-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/attach-list.adp 28 Aug 2003 09:42:00 -0000 1.5
+++ openacs-4/packages/wp-slim/www/attach-list.adp 22 Sep 2003 18:41:27 -0000 1.6
@@ -1,30 +1,31 @@
+
Index: openacs-4/packages/wp-slim/www/attach-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/attach-list.tcl 28 Aug 2003 09:42:00 -0000 1.4
+++ openacs-4/packages/wp-slim/www/attach-list.tcl 22 Sep 2003 18:41:27 -0000 1.5
@@ -29,7 +29,7 @@
and item_id = :slide_item_id
}]
-set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "Edit Slide"] "List Attachments"]
+set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "[_ wp-slim.Edit_Slide]"] "[_ wp-slim.List_Attachments]"]
db_multirow att attachments_get {
select name, item_id
Index: openacs-4/packages/wp-slim/www/attach.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/attach.tcl 28 Aug 2003 09:42:00 -0000 1.8
+++ openacs-4/packages/wp-slim/www/attach.tcl 22 Sep 2003 18:41:27 -0000 1.9
@@ -31,12 +31,14 @@
set exception_text ""
if { $tmp_size == 0 } {
- append exception_text "
"
+ ad_return_complaint 1 "[_ wp-slim.lt_There_was_an_error_tr]$errmsg
"
ad_script_abort
}
Index: openacs-4/packages/wp-slim/www/create-presentation.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/create-presentation.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/create-presentation.adp 28 Aug 2003 09:42:00 -0000 1.6
+++ openacs-4/packages/wp-slim/www/create-presentation.adp 22 Sep 2003 18:41:27 -0000 1.7
@@ -1,106 +1,92 @@
$errmsg
-Give this presentation a title. Pick a title that you've never used -before, otherwise you won't be able to tell this new presentation from -old ones. Also, keep the title reasonably short so that if you choose -a style where the overall presentation title is presented on each slide, -it won't take up too much space. +#wp-slim.lt_Give_this_presentatio# | ||
Title: | +#wp-slim.Title# | |
---|---|---|
-If you want a signature at the bottom of each slide, then enter it here: +#wp-slim.lt_If_you_want_a_signatu# | ||
Page Signature: | +#wp-slim.Page_Signature# | |
-(Personally, I like to have my email address, hyperlinked to my home
-page; remember that HTML is OK here and you can have up to 200 characters.)
+#wp-slim.lt_Personally_I_like_to_#
- If you want a copyright notice somewhere on each slide, enter it here: + #wp-slim.lt_If_you_want_a_copyrig# |
||
Copyright Notice: | +#wp-slim.Copyright_Notice# | |
-WimpyPoint keeps track of the last modification time -of each slide. If you'd like that displayed on each slide, you can -say so here: +#wp-slim.lt_WimpyPoint_keeps_trac# | ||
Show Modification Date? | +#wp-slim.lt_Show_Modification_Dat# |
|
-If you want to hide this presentation from everyone except yourself -and any collaborators that you add, you should say so. Eventually -you'll probably want to change this and make the presentation public, -unless you are only using WimpyPoint to generate .html -pages and/or hardcopy slides that you will show privately. +#wp-slim.lt_If_you_want_to_hide_t# | ||
Available to Public? | +#wp-slim.Available_to_Public# |
|
-Suggestion: if you have truly secret information for a presentation,
-you'd be best off keeping it on your desktop machine. We try to keep
-our database secure but remember that your packets are being sent in
-the clear.
+#wp-slim.lt_Suggestion_if_you_hav#
- Want to make your presentation pretty? Select a style to give your presentation -some pizzazz. If you select "I'll provide my own," once you submit this form -you'll be given the opportunity to create a style, selecting your own color -scheme, background image, etc. -(You can access your personal style repository by clicking the link -entitled Edit one of your styles from WimpyPoint's main page.) + #wp-slim.lt_Want_to_make_your_pre# #wp-slim.lt_Edit_one_of_your_styl# #wp-slim.lt_from_WimpyPoints_main# |
||
Style: | +#wp-slim.Style# | @available_styles@ |
- Finally, if you're planning on making the presentation public, you might want to let the -world know whom you gave the presentation to and for what purpose. + #wp-slim.lt_Finally_if_youre_plan# |
||
Audience: |
+ #wp-slim.Audience# |
|
Background: |
+ #wp-slim.Background# |
Slide Title: | +#wp-slim.Slide_Titlenbsp# | |
---|---|---|
Preamble: |
+ #wp-slim.Preamble# |
- (optional random text that goes above the bullet list) + #wp-slim.lt_optional_random_text_# |
Bullet Items: | +#wp-slim.Bullet_Items# | |
Postamble: |
+ #wp-slim.Postamble# |
- (optional random text that goes after the bullet list) + #wp-slim.lt_optional_random_text__1# |
[
|
-Options+#wp-slim.Options#
|
[
|
@@ -39,47 +39,48 @@
[
|
- + Index: openacs-4/packages/wp-slim/www/invite-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/invite-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/invite-2.tcl 6 Sep 2002 15:32:23 -0000 1.2 +++ openacs-4/packages/wp-slim/www/invite-2.tcl 22 Sep 2003 18:41:27 -0000 1.3 @@ -22,7 +22,7 @@ ad_require_permission $pres_item_id wp_admin_presentation -set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$title"] [list "presentation-acl?[export_url_vars pres_item_id]" "Authorization"] [list "invite?[export_url_vars pres_item_id role title]" "Invite User"] "Email Sent"] +set context [list [list "presentation-top?[export_url_vars pres_item_id]" "$title"] [list "presentation-acl?[export_url_vars pres_item_id]" "[_ wp-slim.Authorization]"] [list "invite?[export_url_vars pres_item_id role title]" "[_ wp-slim.Invite_User]"] "[_ wp-slim.Email_Sent]"] set user_id [ad_verify_and_get_user_id] @@ -34,20 +34,12 @@ and parties.party_id = :user_id } +set server [ad_conn server] +set location [ad_conn location] set email_content [ad_convert_to_html -html_p t " -From: $user_name $user_email -To: $name $email - -Hello! I have invited you to work on the WimpyPoint presentation named - - $title - -on [ad_conn server]. To do so, you'll need to register for an account on -[ad_conn server]. Please visit [ad_conn location] and follow the instructions. - -$message +[_ wp-slim.lt_From_user_name_user_e] "] -ns_sendmail $email $user_email "WimpyPoint Invitation" "$email_content" +ns_sendmail $email $user_email "[_ wp-slim.lt_WimpyPoint_Invitation]" "$email_content" -ad_return_template \ No newline at end of file +ad_return_template Index: openacs-4/packages/wp-slim/www/invite.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/invite.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/invite.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/invite.adp 22 Sep 2003 18:41:27 -0000 1.5 @@ -1,6 +1,6 @@@email_content@
|
Are you sure you want to give @first_names_from_search@ @last_name_from_search@ permission to view the presentation test? +
#wp-slim.lt_Are_you_sure_you_want#
- Send an E-mail message to @first_names_from_search@ with a link to the presentation.
Include -the following message (optional): +#wp-slim.lt_Send_an_E-mail_messag#
#wp-slim.lt_Includethe_following_#
Are you sure you want to give the following users permission to @role@ the presentation @title@? +
#wp-slim.lt_Are_you_sure_you_want_1#
|
|
- The following users may view the presentation: (or you can make the presentation public so everyone can view it)
+ (#wp-slim.lt_or_you_can_a_hrefpres#) |
@@ -24,24 +24,24 @@ |
- - + + |
No users. |
#wp-slim.No_users# |
@write_users.first_names@ @write_users.last_name@
|
No users. |
#wp-slim.No_users# |
@admin_users.first_names@ @admin_users.last_name@
|
#wp-slim.lt_Create_a_new_revision#
+
Index: openacs-4/packages/wp-slim/www/presentation-revisions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-revisions.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/presentation-revisions.tcl 28 Aug 2003 09:42:00 -0000 1.4
+++ openacs-4/packages/wp-slim/www/presentation-revisions.tcl 22 Sep 2003 18:41:27 -0000 1.5
@@ -22,7 +22,7 @@
db_multirow revisions revisions_get {
select r.revision_id,
- to_char(ao.creation_date, 'HH24:MI:SS Mon DD, YYYY') as creation_date,
+ ao.creation_date as creation_date,
ao.creation_ip,
i.live_revision,
p.first_names || ' ' || p.last_name as full_name
@@ -35,9 +35,11 @@
and i.item_id = r.item_id
and p.person_id = ao.creation_user
order by creation_date
+} {
+ set creation_date [lc_time_fmt $creation_date "%X %Q"]
}
-set context [list [list "presentation-top?[export_url_vars pres_item_id]" "Presentation"] "All Revisions"]
+set context [list [list "presentation-top?[export_url_vars pres_item_id]" "[_ wp-slim.Presentation]"] "[_ wp-slim.All_Revisions]"]
set return_url [ns_urlencode "presentation-revisions?[export_url_vars pres_item_id]"]
Index: openacs-4/packages/wp-slim/www/presentation-top.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/wp-slim/www/presentation-top.adp 28 Aug 2003 09:42:00 -0000 1.6
+++ openacs-4/packages/wp-slim/www/presentation-top.adp 22 Sep 2003 18:41:27 -0000 1.7
@@ -1,10 +1,10 @@
The Slides
+#wp-slim.The_Slides#
@@ -13,75 +13,76 @@
@slides.sort_key@.
@slides.slide_title@
-[ edit |
+[ #wp-slim.edit# |
- Insert
+ #wp-slim.Insert#
- Change order of slides
+ #wp-slim.lt_Change_order_of_slide#
- Add
+ #wp-slim.Add#
Options
+#wp-slim.Options#
-
-Viewers / Collaborators
+#wp-slim.lt_Viewers__Collaborator#
-Versioning
+#wp-slim.Versioning#
+
Index: openacs-4/packages/wp-slim/www/search.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/search.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/search.adp 22 May 2003 15:18:55 -0000 1.5
+++ openacs-4/packages/wp-slim/www/search.adp 22 Sep 2003 18:41:27 -0000 1.6
@@ -1,15 +1,15 @@
@@ -24,7 +24,8 @@
+
Index: openacs-4/packages/wp-slim/www/search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/search.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/wp-slim/www/search.tcl 18 Jun 2002 15:13:23 -0000 1.1
+++ openacs-4/packages/wp-slim/www/search.tcl 22 Sep 2003 18:41:27 -0000 1.2
@@ -40,27 +40,26 @@
# this is an administrator
if { [empty_string_p $keyword] } {
incr exception_count
- append exception_text "One Revision
+#wp-slim.One_Revision#
+
Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 28 Aug 2003 09:42:00 -0000 1.5
+++ openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 22 Sep 2003 18:41:27 -0000 1.6
@@ -22,7 +22,7 @@
if {![regexp {presentation_revision/([0-9]+)/([0-9]+)} $url match pres_item_id pres_revision_id]} {
ns_log notice "Could not get a pres_item_id and a pres_revision_id out of url=$url"
- ad_return_error "Wimpy Point" "Could not get a pres_item_id and a pres_revision_id out of url=$url"
+ ad_return_error "[_ wp-slim.Wimpy_Point]" "[_ wp-slim.lt_Could_not_get_a_pres__1]"
}
#added permission checking roc@
@@ -57,6 +57,6 @@
and r.revision_id = pb.id
}
-set context [list [list "$subsite_name/presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "One Revision"]
+set context [list [list "$subsite_name/presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "[_ wp-slim.One_Revision]"]
ad_return_template
Index: openacs-4/packages/wp-slim/www/serve-presentation.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.adp,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/wp-slim/www/serve-presentation.adp 28 Aug 2003 09:42:00 -0000 1.8
+++ openacs-4/packages/wp-slim/www/serve-presentation.adp 22 Sep 2003 18:41:27 -0000 1.9
@@ -1,24 +1,24 @@
-
Title
+#wp-slim.Title_1#
@pres_title@
-
Page Signature
+#wp-slim.Page_Signature_1#
@page_signature@
-
Copyright Notice
+#wp-slim.Copyright_Notice_1#
@copyright_notice@
-
Public?
+#wp-slim.Public#
@public_p@
-
-wp
+
Show Modified Date?
+#wp-slim.Show_Modified_Date#
@show_modified_p@
-
Audience
+#wp-slim.Audience_1#
@audience@
-
Background
+#wp-slim.Background_1#
@background@
-
done
+ #wp-slim.done#
@pres_title@
-a Wimpy Point Presentation owned by @owner_name@
+#wp-slim.lt_a_Wimpy_Point_Present# @owner_name@
in collaboration with
+
#wp-slim.lt_in_collaboration_with#
@@ -13,7 +13,7 @@
@slide_title@
@@ -100,7 +100,7 @@
Slide Comments
+#wp-slim.Slide_Comments#
@comments@
-Revision in red is the current live revision.
+#wp-slim.lt_Revision_in_font_colo#
+
Index: openacs-4/packages/wp-slim/www/slide-revisions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/slide-revisions.tcl 28 Aug 2003 09:42:00 -0000 1.4
+++ openacs-4/packages/wp-slim/www/slide-revisions.tcl 22 Sep 2003 18:41:27 -0000 1.5
@@ -23,12 +23,12 @@
set subsite_name [ad_conn package_url]
-set context [list [list "presentation-top?[export_url_vars pres_item_id]" "Presentation"] "Slide Revisions"]
+set context [list [list "presentation-top?[export_url_vars pres_item_id]" "[_ wp-slim.Presentation]"] "[_ wp-slim.Slide_Revisions]"]
db_multirow revisions revisions_get {
select r.revision_id,
- to_char(ao.creation_date, 'HH24:MI:SS Mon DD, YYYY') as creation_date,
+ ao.creation_date as creation_date,
ao.creation_ip,
i.live_revision,
p.first_names || ' ' || p.last_name as full_name
@@ -41,6 +41,8 @@
and i.item_id = r.item_id
and p.person_id = ao.creation_user
order by creation_date
+} {
+ set creation_date [lc_time_fmt $creation_date "%X %Q"]
}
set return_url [ns_urlencode "slide-revisions?[export_url_vars slide_item_id pres_item_id]"]
Index: openacs-4/packages/wp-slim/www/slides-reorder.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/wp-slim/www/slides-reorder.adp 22 May 2003 15:18:55 -0000 1.4
+++ openacs-4/packages/wp-slim/www/slides-reorder.adp 22 Sep 2003 18:41:27 -0000 1.5
@@ -1,10 +1,9 @@
-