Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-workflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-timesheet2-workflow
Commits
039b0841
Commit
039b0841
authored
Mar 03, 2008
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- OpenACS installer changes
parent
b543f452
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
61 deletions
+57
-61
intranet-timesheet2-workflow-create.sql
sql/postgresql/intranet-timesheet2-workflow-create.sql
+57
-61
No files found.
sql/postgresql/intranet-timesheet2-workflow-create.sql
View file @
039b0841
...
...
@@ -89,6 +89,10 @@ create table im_timesheet_conf_objects (
-----------------------------------------------------------
-- Add confirmation object to hours to keep status
--
-- Add an conf_object_id field to im_hours to mark confirmed hours
alter
table
im_hours
add
column
conf_object_id
integer
constraint
im_hours_conf_obj_fk
references
im_timesheet_conf_objects
;
...
...
@@ -99,14 +103,6 @@ create index im_hours_conf_obj_idx on im_hours(conf_object_id);
-----------------------------------------------------------
-- Add confirmation object to hours to keep status
--
alter
table
im_hours
add
conf_object_id
integer
references
im_timesheet_conf_objects
;
-----------------------------------------------------------
-- Privileges
...
...
@@ -367,56 +363,56 @@ SELECT im_component_plugin__new (
-- Add "Start Timesheet Workflow" link to TimesheetNewPage
--
create
or
replace
function
inline_0
()
returns
integer
as
'
declare
-- Menu IDs
v_menu integer;
v_main_menu integer;
-- Groups
v_employees integer;
v_accounting integer;
v_senman integer;
v_proman integer;
v_admins integer;
BEGIN
-- Get some group IDs
select group_id into v_admins from groups where group_name =
''
P/O Admins
''
;
select group_id into v_senman from groups where group_name =
''
Senior Managers
''
;
select group_id into v_proman from groups where group_name =
''
Project Managers
''
;
select group_id into v_accounting from groups where group_name =
''
Accounting
''
;
select group_id into v_employees from groups where group_name =
''
Employees
''
;
-- Determine the main menu. "Label" is used to identify menus.
select menu_id into v_main_menu
from im_menus where label =
''
timesheet_hours_new_admin
''
;
-- Create the menu.
v_menu := im_menu__new (
null, -- p_menu_id
''
acs_object
''
, -- object_type
now(), -- creation_date
null, -- creation_user
null, -- creation_ip
null, -- context_id
''
intranet-timesheet2-workflow
''
, -- package_name
''
timesheet_hours_new_start_workflow
''
, -- label
''
Start Confirmation Workflow
''
, -- name
''
/intranet-timesheet2-workflow/conf-objects/new-workflow?
''
, -- url
15, -- sort_order
v_main_menu, -- parent_menu_id
null -- p_visible_tcl
);
-- Grant read permissions to most of the system
PERFORM acs_permission__grant_permission(v_menu, v_admins,
''
read
''
);
PERFORM acs_permission__grant_permission(v_menu, v_senman,
''
read
''
);
PERFORM acs_permission__grant_permission(v_menu, v_proman,
''
read
''
);
PERFORM acs_permission__grant_permission(v_menu, v_accounting,
''
read
''
);
PERFORM acs_permission__grant_permission(v_menu, v_employees,
''
read
''
);
return 0;
end;'
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
--
create or replace function inline_0 ()
--
returns integer as '
--
declare
--
-- Menu IDs
--
v_menu integer;
--
v_main_menu integer;
--
--
-- Groups
--
v_employees integer;
--
v_accounting integer;
--
v_senman integer;
--
v_proman integer;
--
v_admins integer;
--
BEGIN
--
-- Get some group IDs
--
select group_id into v_admins from groups where group_name = ''P/O Admins'';
--
select group_id into v_senman from groups where group_name = ''Senior Managers'';
--
select group_id into v_proman from groups where group_name = ''Project Managers'';
--
select group_id into v_accounting from groups where group_name = ''Accounting'';
--
select group_id into v_employees from groups where group_name = ''Employees'';
--
--
-- Determine the main menu. "Label" is used to identify menus.
--
select menu_id into v_main_menu
--
from im_menus where label = ''timesheet_hours_new_admin'';
--
--
-- Create the menu.
--
v_menu := im_menu__new (
--
null, -- p_menu_id
--
''acs_object'', -- object_type
--
now(), -- creation_date
--
null, -- creation_user
--
null, -- creation_ip
--
null, -- context_id
--
''intranet-timesheet2-workflow'', -- package_name
--
''timesheet_hours_new_start_workflow'', -- label
--
''Start Confirmation Workflow'', -- name
--
''/intranet-timesheet2-workflow/conf-objects/new-workflow?'', -- url
--
15, -- sort_order
--
v_main_menu, -- parent_menu_id
--
null -- p_visible_tcl
--
);
--
--
-- Grant read permissions to most of the system
--
PERFORM acs_permission__grant_permission(v_menu, v_admins, ''read'');
--
PERFORM acs_permission__grant_permission(v_menu, v_senman, ''read'');
--
PERFORM acs_permission__grant_permission(v_menu, v_proman, ''read'');
--
PERFORM acs_permission__grant_permission(v_menu, v_accounting, ''read'');
--
PERFORM acs_permission__grant_permission(v_menu, v_employees, ''read'');
--
--
return 0;
--
end;' language 'plpgsql';
--
select inline_0 ();
--
drop function inline_0 ();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment