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
48cec7c4
Commit
48cec7c4
authored
Nov 23, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
98723ef6
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
30 deletions
+30
-30
intranet-timesheet2-workflow-procs.tcl
tcl/intranet-timesheet2-workflow-procs.tcl
+9
-9
absence-panel.tcl
www/absences/absence-panel.tcl
+1
-1
conf-obj-panel.tcl
www/conf-objects/conf-obj-panel.tcl
+1
-1
delete.tcl
www/conf-objects/delete.tcl
+1
-1
index.adp
www/conf-objects/index.adp
+6
-6
index.tcl
www/conf-objects/index.tcl
+2
-2
new-timesheet-workflow.adp
www/conf-objects/new-timesheet-workflow.adp
+2
-2
new-timesheet-workflow.tcl
www/conf-objects/new-timesheet-workflow.tcl
+1
-1
new.adp
www/conf-objects/new.adp
+1
-1
new.tcl
www/conf-objects/new.tcl
+1
-1
unsubmitted-hours.tcl
www/reports/unsubmitted-hours.tcl
+5
-5
No files found.
tcl/intranet-timesheet2-workflow-procs.tcl
View file @
48cec7c4
...
...
@@ -308,7 +308,7 @@ ad_proc im_timesheet_conf_new_page_wf_perm_delete_button {
]
ns_log Notice
"im_timesheet_conf_new_page_wf_perm_delete_button conf_id=
$conf
_id =>
$perm
_set"
return
[
expr
[
lsearch
$perm
_set
"d"
]
> -1
]
return
[
expr
{[
lsearch
$perm
_set
"d"
]
> -1
}
]
}
ad_proc im_timesheet_conf_new_page_wf_perm_edit_button
{
...
...
@@ -323,7 +323,7 @@ ad_proc im_timesheet_conf_new_page_wf_perm_edit_button {
]
ns_log Notice
"im_timesheet_conf_new_page_wf_perm_edit_button conf_id=
$conf
_id =>
$perm
_set"
return
[
expr
[
lsearch
$perm
_set
"w"
]
> -1
]
return
[
expr
{[
lsearch
$perm
_set
"w"
]
> -1
}
]
}
...
...
@@ -347,7 +347,7 @@ ad_proc eval_wf_start_date {
if
{
$one
_week_back_month ==
$date
_part_month
}
{
# Find
return
[
expr
$date
_julian -
[
expr
$day
_of_week - 1
]
]
return
[
expr
{
$date
_julian -
[
expr
{
$day
_of_week - 1
}]}
]
}
else
{
# return first day of month
return
[
dt_ansi_to_julian_single_arg
"
$date
_part_year-
$date
_part_month-01"
]
...
...
@@ -401,14 +401,14 @@ ad_proc im_timesheet2_workflow_unsubmitted_hours_user_notification_sweeper {
set key
"
$user
_id-
$hour
_month"
set h 0
if
{[
info
exists user_hour_month_hash
(
$key
)]}
{
set h
$user
_hour_month_hash
(
$key
)
}
set h
[
expr
$h
+
$hours
]
set h
[
expr
{
$h
+
$hours
}
]
set user_hour_month_hash
(
$key
)
$h
# Sum up unconfirmed hours total
set key
"
$user
_id"
set h 0
if
{[
info
exists user_hour_hash
(
$key
)]}
{
set h
$user
_hour_hash
(
$key
)
}
set h
[
expr
$h
+
$hours
]
set h
[
expr
{
$h
+
$hours
}
]
set user_hour_hash
(
$key
)
$h
# Store auxillary variables in their hashes
...
...
@@ -446,9 +446,9 @@ ad_proc im_timesheet2_workflow_unsubmitted_hours_user_notification_sweeper {
ad_return_complaint 1
"<pre>email=
$email
<br>system_owner=
$system
_owner<br>subject=
$subject
<br>message=
$message
<br>"
}
else
{
if
[
catch
{
if
{
[
catch
{
ns_sendmail
$email
$system
_owner
$subject
$message
}
errmsg
]
{
}
errmsg
]
}
{
ns_log Error
"im_timesheet2_workflow_unsubmitted_hours_user_notification_sweeper: Error sending to
\"
$email
\"
:
$errmsg
"
}
else
{
ns_log Notice
"im_timesheet2_workflow_unsubmitted_hours_user_notification_sweeper: Sent mail to
$email
\n
"
...
...
@@ -520,9 +520,9 @@ User %user_name% has modified hours in the following projects:\n
%ansi_list_txt%
"
]
if
[
catch
{
if
{
[
catch
{
ns_sendmail
$supervisor
_email
$sender
_email
$subject
$message
}
errmsg
]
{
}
errmsg
]
}
{
ns_log Error
"im_timesheet_conf_object_delete: Error sending to
\"
$supervisor
_email
\"
:
$errmsg
"
}
else
{
ns_log Notice
"im_timesheet_conf_object_delete: Sent mail to
$email
\n
"
...
...
www/absences/absence-panel.tcl
View file @
48cec7c4
...
...
@@ -86,7 +86,7 @@ if {[info exists task]} {
# ---------------------------------------------------------------
set
transition_key
[
db_string transition_key
"select transition_key from wf_tasks where task_id = :task_id"
-default
""
]
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
object_name
[
db_string name
"select acs_object__name(:absence_id)"
]
# ---------------------------------------------------------------
...
...
www/conf-objects/conf-obj-panel.tcl
View file @
48cec7c4
...
...
@@ -86,7 +86,7 @@ if {[info exists task]} {
# ---------------------------------------------------------------
set
transition_key
[
db_string transition_key
"select transition_key from wf_tasks where task_id = :task_id"
-default
""
]
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
object_name
[
db_string name
"select acs_object__name(:conf_id)"
-default
""
]
# ---------------------------------------------------------------
...
...
www/conf-objects/delete.tcl
View file @
48cec7c4
...
...
@@ -19,7 +19,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
if
{
!
[
info
exists conf_id
]
|| 0 ==
[
llength
$conf
_id
]}
{
aad_returnredirect
$return
_url
...
...
www/conf-objects/index.adp
View file @
48cec7c4
...
...
@@ -3,12 +3,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">notes</property>
<!--
<table border=
0 cellpadding=0 cellspacing=0
>
<table border=
"0" cellpadding="0" cellspacing="0"
>
<tr>
<td>
...
...
@@ -20,10 +20,10 @@
</td>
<td> </td>
<td valign=
top
width="30%">
<table border=
0 cellpadding=0 cellspacing=0
>
<td valign=
"top"
width="30%">
<table border=
"0" cellpadding="0" cellspacing="0"
>
<tr>
<td class=rowtitle align=
center
>
<td class=rowtitle align=
"center"
>
#intranet-core.Admin_Links#
</td>
</tr>
...
...
www/conf-objects/index.tcl
View file @
48cec7c4
...
...
@@ -21,7 +21,7 @@ ad_page_contract {
# ---------------------------------------------------------------
# User id already verified by filters
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
current_user_id
$user
_id
set
page_focus
"im_header_form.keywords"
set
user_admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
...
...
@@ -40,7 +40,7 @@ set edit_project_all_p [im_permission $current_user_id "edit_projects_all"]
# ---------------------------------------------------------------
set
admin_links
""
append
admin_links
" <li><a href=
\"
new?
[
export_vars -url
{
object_id return_url
}]
\"
>
[
_ intranet-timesheet2-workflow.Add_a_new_Conf
]
</a>
\n
"
append
admin_links
" <li><a href=
\"
[
export_vars -base new
{
object_id return_url
}]
\"
>
[
_ intranet-timesheet2-workflow.Add_a_new_Conf
]
</a>
\n
"
if
{
""
!=
$admin
_links
}
{
set admin_links
"<ul>
\n
$admin
_links</ul>
\n
"
}
set
bulk_actions_list
"
[
list
]
"
...
...
www/conf-objects/new-timesheet-workflow.adp
View file @
48cec7c4
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">timesheet</property>
<h2>@page_title@</h2>
...
...
@@ -15,7 +15,7 @@
<br> <br>
<p>
<a href="@return_url
;noquote
@"
<a href="@return_url@"
><%= [lang::message::lookup "" intranet-timesheet2-workflow.Return_to_previous_page "Return to previous page"] %></a>
</p>
<br>
www/conf-objects/new-timesheet-workflow.tcl
View file @
48cec7c4
...
...
@@ -32,7 +32,7 @@ set wf_user_id $user_id
# Check for valid user/auth_token combination
set
valid_p
[
im_valid_auto_login_p -check_user_requires_manual_login_p 0 -user_id
$user
_id -auto_login
$auth
_token
]
if
{
!$valid_p
}
{
set user_id
[
a
d_maybe_redirect_for_registratio
n
]
set user_id
[
a
uth::require_logi
n
]
}
set
page_title
"
[
lang::message::lookup
""
intranet-timesheet2-workflow.Create_New_Timesheet_Workflow
"New Timesheet Workflow(s)"
]
"
...
...
www/conf-objects/new.adp
View file @
48cec7c4
<if @enable_master_p@>
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">timesheet</property>
</if>
...
...
www/conf-objects/new.tcl
View file @
48cec7c4
...
...
@@ -26,7 +26,7 @@ if {![info exists panel_p]} {
}
}
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-timesheet2-workflow.Timesheet_Conf_Object
"Timesheet Confirmation"
]
set
context_bar
[
im_context_bar
$page
_title
]
...
...
www/reports/unsubmitted-hours.tcl
View file @
48cec7c4
...
...
@@ -32,7 +32,7 @@ ad_page_contract {
# because it identifies unquely the report's Menu and
# its permissions.
set
menu_label
"reporting-timesheet-unsubmitted-hours"
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
read_p
[
db_string report_perms
"
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
...
...
@@ -96,7 +96,7 @@ if {$level_of_detail > 3} { set level_of_detail 3 }
# ------------------------------------------------------------
# Permissions - Unprivileged users can only see their own hours
#
set
view_hours_all_p
[
expr
[
im_permission
$current
_user_id view_hours_all
]
||
[
im_permission
$current
_user_id add_hours_all
]
]
set
view_hours_all_p
[
expr
{[
im_permission
$current
_user_id view_hours_all
]
||
[
im_permission
$current
_user_id add_hours_all
]}
]
set
view_hours_direct_reports_p
[
im_permission
$current
_user_id add_hours_direct_reports
]
if
{
!$view_hours_all_p && !$view_hours_direct_reports_p
}
{
set member_id
$current
_user_id
}
if
{
!$view_hours_all_p &&
$view
_hours_direct_reports_p
}
{
...
...
@@ -181,7 +181,7 @@ switch $type_of_hours {
}
set
where_clause
[
join
$criteria
" and
\n\t\t
"
]
if
{
!
[
empty_string_p
$where
_clause
]
}
{
if
{
$where
_clause ne
""
}
{
set where_clause
" and
$where
_clause"
}
...
...
@@ -459,8 +459,8 @@ db_foreach sql $sql {
im_report_update_counters -counters
$counters
set hours_monthly_sum
[
expr
round
(
100.0 *
$hours
_monthly_sum
)
/ 100.0
]
set hours_subtotal
[
expr
round
(
100.0 *
$hours
_subtotal
)
/ 100.0
]
set hours_monthly_sum
[
expr
{
round
(
100.0 *
$hours
_monthly_sum
)
/ 100.0
}
]
set hours_subtotal
[
expr
{
round
(
100.0 *
$hours
_subtotal
)
/ 100.0
}
]
set hours_subtotal_pretty
[
im_report_format_number
$hours
_subtotal
$output
_format
$number
_locale
]
set hours_monthly_sum_pretty
[
im_report_format_number
$hours
_monthly_sum
$output
_format
$number
_locale
]
...
...
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