Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-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
acs-workflow
Commits
28c44638
Commit
28c44638
authored
Nov 28, 2006
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added single-column WF task panels
- upgrading costs(?)
parent
61053454
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
106 deletions
+76
-106
task.adp
www/task.adp
+34
-38
task.tcl
www/task.tcl
+40
-68
task.xql
www/task.xql
+2
-0
No files found.
www/task.adp
View file @
28c44638
...
...
@@ -5,53 +5,49 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr><td bgcolor="#cccccc">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr bgcolor="#9bbad6">
<th colspan="@panels:rowcount@"><big>Task: @task.task_name@</big></th>
</tr>
<tr valign="middle">
<multiple name="panels">
<th bgcolor="#ffffe4" width="@panel_width@%">@panels.header@</th>
</multiple>
</tr>
<tr>
<multiple name="panels">
<td bgcolor="@panels.bgcolor@" valign="top">
<!-- @panels.template_url@ -->
<include src="@panels.template_url;noquote@" &="task" &="task_attributes_to_set" &="task_assigned_users" &="task_roles_to_assign" &="export_form_vars" &="return_url">
</td>
</multiple>
</tr>
</table>
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr bgcolor="#9bbad6">
<th colspan="@panels:rowcount@"><big>Task: @task.task_name@</big></th>
</tr>
<tr valign="middle">
<multiple name="panels">
<th bgcolor="#ffffe4" width="@panel_width@%">@panels.header@</th>
</multiple>
</tr>
<tr>
<multiple name="panels">
<td bgcolor="@panels.bgcolor@" valign="top">
<!-- @panels.template_url@ -->
<include src="@panels.template_url;noquote@" &="task" &="task_attributes_to_set" &="task_assigned_users" &="task_roles_to_assign" &="export_form_vars" &="return_url">
</td>
</multiple>
</tr>
</table>
</td></tr>
</table>
<p>
<if @extreme_p@ eq 1>
<table width="100%">
<tr><td align="center" bgcolor="#dddddd">
<small>
Extreme actions:
<multiple name="extreme_actions">
(<a href="@extreme_actions.url@">@extreme_actions.title@</a>)
</multiple>
</small>
</td></tr>
</table>
<table width="100%">
<tr><td align="center" bgcolor="#dddddd">
<small>
Extreme actions:
<multiple name="extreme_actions">
(<a href="@extreme_actions.url@">@extreme_actions.title@</a>)
</multiple>
</small>
</td></tr>
</table>
</if>
<p>
<include src="journal" case_id="@case_id;noquote@">
</master>
www/task.tcl
View file @
28c44638
...
...
@@ -23,22 +23,13 @@ ad_page_contract {
extreme_p
}
set
user_id
[
ad_get_user_id
]
# Fire all message transitions before:
wf_sweep_message_transition_tcl
# ---------------------------------------------------------
# Defaults & Security
# We don't force the user to authentify, is that right?
set
user_id
[
ad_get_user_id
]
####################
#
# Process the form
#
####################
#
# NOTE! We need to add some double-click protection here.
#
# ToDo: NOTE! We need to add some double-click protection here.
set
the_action
[
array
names action
]
if
{
[
llength
$the
_action
]
> 1
}
{
...
...
@@ -53,15 +44,15 @@ if { [llength $the_action] > 1 } {
}
# ---------------------------------------------------------
# Fire all message transitions before:
####################
#
# Output the page
#
####################
wf_sweep_message_transition_tcl
# ---------------------------------------------------------
# Get everything about the task
array
set task
[
wf_task_info
$task
_id
]
...
...
@@ -73,30 +64,19 @@ set task(action_url) "task"
set
task
(
return_url
)
$return
_url
set
context
[
list
[
list
"case?case_id=
$task
(case_id)"
"
$task
(object_name) case"
]
"
$task
(task_name)"
]
set
panel_color
"#dddddd"
template::multirow create panels header template_url bgcolor
set
show_action_panel_p 1
# ---------------------------------------------------------
# Get "information panel" information - displayed on the left usually
template::multirow create panels header template_url bgcolor
set
this_user_is_assigned_p
$task
(
this_user_is_assigned_p
)
db_multirow panels panels
{
select tp.header,
tp.template_url,
'' as bgcolor
from wf_context_task_panels tp,
wf_cases c,
wf_tasks t
where t.task_id = :task_id
and c.case_id = t.case_id
and tp.context_key = c.context_key
and tp.workflow_key = c.workflow_key
and tp.transition_key = t.transition_key
and
(
tp.only_display_when_started_p = 'f' or
(
t.state = 'started' and :this_user_is_assigned_p = 1
))
and tp.overrides_action_p = 'f'
order by tp.sort_order
}
{
db_multirow panels panels
{}
{
set bgcolor
$panel
_color
if
{
"t"
==
$overrides
_both_panels_p
}
{
set show_action_panel_p 0
}
}
# Only display the default-info-panel when we have nothing better
...
...
@@ -104,50 +84,40 @@ if { ${panels:rowcount} == 0 } {
template::multirow append panels
"Case"
"task-default-info"
$panel
_color
}
# ---------------------------------------------------------
# Display instructions, if any
if
{
[
db_string instruction_check
"
select count(*)
from wf_transition_info ti, wf_tasks t
where t.task_id = :task_id
and t.transition_key = ti.transition_key
and t.workflow_key = ti.workflow_key
and instructions is not null
"
]
}
{
if
{
[
db_string instruction_check
""
]
}
{
template::multirow append panels
"Instructions"
"task-instructions"
$panel
_color
}
# ---------------------------------------------------------
# Now for action panels -- these are always displayed at the far right
set
override_action 0
db_foreach action_panels
{
select tp.header,
tp.template_url
from wf_context_task_panels tp,
wf_cases c,
wf_tasks t
where t.task_id = :task_id
and c.case_id = t.case_id
and tp.context_key = c.context_key
and tp.workflow_key = c.workflow_key
and tp.transition_key = t.transition_key
and
(
tp.only_display_when_started_p = 'f' or
(
t.state = 'started' and :this_user_is_assigned_p = 1
))
and tp.overrides_action_p = 't'
order by tp.sort_order
}
{
set override_action 1
template::multirow append panels
$header
$template
_url
"#ffffff"
}
if
{
$show
_action_panel_p
}
{
set override_action 0
db_foreach action_panels
{}
{
set override_action 1
template::multirow append panels
$header
$template
_url
"#ffffff"
}
if
{
$override
_action == 0
}
{
template::multirow append panels
"Action"
"task-action"
"#ffffff"
if
{
$override
_action == 0
}
{
template::multirow append panels
"Action"
"task-action"
"#ffffff"
}
}
set
panel_width
[
expr
{
100/
(
${panels:rowcount}
)}]
set
panel_width
[
expr
{
100/
(
${panels:rowcount}
)}]
set
case_id
$task
(
case_id
)
set
case_state
[
db_string case_state
"select state from wf_cases where case_id = :case_id"
]
set
case_state
[
db_string case_state
"select state from wf_cases where case_id = :case_id"
]
# ---------------------------------------------------------
# "Extreme Actions" - cancel and/or suspend the case
set
extreme_p 0
if
{[
string
compare
$case
_state
"active"
]
== 0
}
{
...
...
@@ -159,7 +129,9 @@ if {[string compare $case_state "active"] == 0} {
# ---------------------------------------------------------
# Fire all message transitions after the action:
wf_sweep_message_transition_tcl
...
...
www/task.xql
View file @
28c44638
...
...
@@ -6,6 +6,7 @@
select tp.header,
tp.template_url,
tp.overrides_both_panels_p,
'' as bgcolor
from wf_context_task_panels tp,
wf_cases c,
...
...
@@ -32,6 +33,7 @@
and t.transition_key = ti.transition_key
and t.workflow_key = ti.workflow_key
and instructions is not null
and trim(instructions) != ''
</querytext>
</fullquery>
...
...
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