Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2
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
1
Merge Requests
1
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
Commits
09881be9
Commit
09881be9
authored
Dec 12, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up translation, whitespaces
parent
80b81907
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
90 deletions
+88
-90
index.tcl
www/hours/index.tcl
+88
-90
No files found.
www/hours/index.tcl
View file @
09881be9
...
...
@@ -15,7 +15,7 @@
ad_page_contract
{
Calendar format display of user's hours with links
Calendar format display of user's hours with links
to log more hours, if the user is looking at him/
herself
...
...
@@ -25,7 +25,7 @@ ad_page_contract {
@param user_id the user for whom we're viewing hours. Defaults to currently logged in user.
@param project_id The user group for which we're viewing hours. Defaults to all groups.
@param return_url Return URL
@author Michael Bryzek
(
mbryzek@arsdigita.com
)
@author Frank Bergmann
(
frank.bergmann@project-open.com
)
@author Klaus Hofeditz
(
klaus.hofeditz@project-open.com
)
...
...
@@ -41,7 +41,7 @@ ad_page_contract {
}
# Decision FB on 160624: Disregard for now:
# Clean up data in case WF cases have been
OCdeleted in WF Admin Panel.
# Clean up data in case WF cases have been
deleted in WF Admin Panel.
# conf_object will not be removed and hours are shown as 'to be confirmed'.
# db_dml sql "update im_hours set conf_object_id = null where conf_object_id not in (select object_id from wf_cases
)
"
# db_dml sql "
delete from im_timesheet_conf_objects where conf_id not in
(
select object_id from wf_cases
)
"
...
...
@@ -60,8 +60,8 @@ set break_l10n [lang::message::lookup "" intranet-attendance-management.Break "B
set hour_l10n
[
lang::message::lookup
""
intranet-core.Hour_abbrev
"h"
]
switch
$user
_id_from_search {
"" - all - mine - direct_reports - employees - customers - providers {
set user_id_from_search
$current
_user_id
"" - all - mine - direct_reports - employees - customers - providers {
set user_id_from_search
$current
_user_id
}
default {
# Is the user allowed to log hours for another user?
...
...
@@ -70,11 +70,11 @@ switch $user_id_from_search {
set reportees
[
im_user_direct_reports_ids -user_id
$current
_user_id
]
if {
[
lsearch
$reportees
$user
_id_from_search
]
< 0} {
# User not in reportees - reset to current user
set user_id_from_search
$current
_user_id
set user_id_from_search
$current
_user_id
}
} else {
# The user has no permission to log hours for others
set user_id_from_search
$current
_user_id
set user_id_from_search
$current
_user_id
}
}
}
...
...
@@ -107,23 +107,23 @@ set attendance_management_installed_p [im_table_exists im_attendance_intervals]
set header_days_of_week "";
# Patch: http://sourceforge.net/projects/project-open/forums/forum/295937/topic/3324310
for {
set i
$start
_day } {
$i
< 7 } { incr i
} {
if {
$i
==0
} { append header_days_of_week "
[
_ intranet-timesheet2.Sunday
]
" }
if {
$i
==1
} { append header_days_of_week "
[
_ intranet-timesheet2.Monday
]
" }
if {
$i
==2
} { append header_days_of_week "
[
_ intranet-timesheet2.Tuesday
]
" }
if {
$i
==3
} { append header_days_of_week "
[
_ intranet-timesheet2.Wednesday
]
" }
if {
$i
==4
} { append header_days_of_week "
[
_ intranet-timesheet2.Thursday
]
" }
if {
$i
==5
} { append header_days_of_week "
[
_ intranet-timesheet2.Friday
]
" }
if {
$i
==6
} { append header_days_of_week "
[
_ intranet-timesheet2.Saturday
]
" }
for {
set i
$start
_day} {
$i
< 7} {incr i
} {
if {
$i
==0
} { append header_days_of_week "
[
_ intranet-timesheet2.Sunday
]
" }
if {
$i
==1
} { append header_days_of_week "
[
_ intranet-timesheet2.Monday
]
" }
if {
$i
==2
} { append header_days_of_week "
[
_ intranet-timesheet2.Tuesday
]
" }
if {
$i
==3
} { append header_days_of_week "
[
_ intranet-timesheet2.Wednesday
]
" }
if {
$i
==4
} { append header_days_of_week "
[
_ intranet-timesheet2.Thursday
]
" }
if {
$i
==5
} { append header_days_of_week "
[
_ intranet-timesheet2.Friday
]
" }
if {
$i
==6
} { append header_days_of_week "
[
_ intranet-timesheet2.Saturday
]
" }
}
for {
set i 0 } {
$i
<
$start
_day } { incr i
} {
if {
$i
==0
} { append header_days_of_week "
[
_ intranet-timesheet2.Sunday
]
" }
if {
$i
==1
} { append header_days_of_week "
[
_ intranet-timesheet2.Monday
]
" }
if {
$i
==2
} { append header_days_of_week "
[
_ intranet-timesheet2.Tuesday
]
" }
if {
$i
==3
} { append header_days_of_week "
[
_ intranet-timesheet2.Wednesday
]
" }
if {
$i
==4
} { append header_days_of_week "
[
_ intranet-timesheet2.Thursday
]
" }
if {
$i
==5
} { append header_days_of_week "
[
_ intranet-timesheet2.Friday
]
" }
if {
$i
==6
} { append header_days_of_week "
[
_ intranet-timesheet2.Saturday
]
" }
for {
set i 0} {
$i
<
$start
_day} {incr i
} {
if {
$i
==0
} { append header_days_of_week "
[
_ intranet-timesheet2.Sunday
]
" }
if {
$i
==1
} { append header_days_of_week "
[
_ intranet-timesheet2.Monday
]
" }
if {
$i
==2
} { append header_days_of_week "
[
_ intranet-timesheet2.Tuesday
]
" }
if {
$i
==3
} { append header_days_of_week "
[
_ intranet-timesheet2.Wednesday
]
" }
if {
$i
==4
} { append header_days_of_week "
[
_ intranet-timesheet2.Thursday
]
" }
if {
$i
==5
} { append header_days_of_week "
[
_ intranet-timesheet2.Friday
]
" }
if {
$i
==6
} { append header_days_of_week "
[
_ intranet-timesheet2.Saturday
]
" }
}
set weekly_logging_days
[
parameter::get_from_package_key -package_key intranet-timesheet2 -parameter TimesheetWeeklyLoggingDays -default
"0 1 2 3 4 5 6"
]
...
...
@@ -131,7 +131,7 @@ set weekly_logging_days [parameter::get_from_package_key -package_key intranet-t
# ---------------------------------
# Date Logic: We are working with "
YYYY-MM-DD
" dates in this page.
if {"" ==
$date
} {
if {"" ==
$date
} {
if {"" !=
$julian
_date} {
set date
[
db_string julian_date_select
"select to_char( to_date(:julian_date,'J'), 'YYYY-MM-DD') from dual"
]
} else {
...
...
@@ -141,7 +141,7 @@ if {"" == $date } {
set julian_date
[
db_string conv
"select to_char(:date::date, 'J')"
]
# Set last day of month:
# Set last day of month:
set last_day_of_month_ansi
[
db_string get_last_day_month
"select date_trunc('month',add_months(:date,1))::date - 1"
-default 0
]
set first_day_of_month_ansi
[
db_string get_first_day_month
"select date_trunc('month', '
$date
'::DATE)::date"
-default 0
]
set first_day_of_month_julian
[
db_string fdom_julian
"select to_char(:first_day_of_month_ansi::date, 'J')"
]
...
...
@@ -163,7 +163,7 @@ set menu_links_html [im_menu_ul_list -no_uls 1 "timesheet_hours_new_admin" $bind
# Enable the functionality to confirm timesheet hours?
set confirm_timesheet_hours_p 0
if {
"" !=
[
parameter::get -package_id
[
apm_package_id_from_key intranet-timesheet2-workflow
]
-parameter
"DefaultWorkflowKey"
-default
""
]
} {
if {
"" !=
[
parameter::get -package_id
[
apm_package_id_from_key intranet-timesheet2-workflow
]
-parameter
"DefaultWorkflowKey"
-default
""
]
} {
set confirm_timesheet_hours_p 1
}
...
...
@@ -199,7 +199,7 @@ if {$attendance_management_installed_p} {
92100 {
# Work Attendance
set v 0.0
if {
[
info
exists att_work_hash
(
$attendance
_start_julian
)]
} { set v
$att
_work_hash(
$attendance
_start_julian)
}
if {
[
info
exists att_work_hash
(
$attendance
_start_julian
)]
} { set v
$att
_work_hash(
$attendance
_start_julian)}
set v
[
expr
$v
+
$duration
_hours
]
set att_work_hash(
$attendance
_start_julian)
$v
set attendance_work
[
expr
$attendance
_work +
$duration
_hours
;]
...
...
@@ -207,7 +207,7 @@ if {$attendance_management_installed_p} {
92110 {
# Break
set v 0.0
if {
[
info
exists att_break_hash
(
$attendance
_start_julian
)]
} { set v
$att
_break_hash(
$attendance
_start_julian)
}
if {
[
info
exists att_break_hash
(
$attendance
_start_julian
)]
} { set v
$att
_break_hash(
$attendance
_start_julian)}
set v
[
expr
$v
+
$duration
_hours
]
set att_break_hash(
$attendance
_start_julian)
$v
set attendance_break
[
expr
$attendance
_break +
$duration
_hours
;]
...
...
@@ -231,13 +231,13 @@ calendar_get_info_from_db $date
# --------------------------------------------------------------
# Grab all the hours from im_hours
set sql "
select to_char
(
day, 'J'
)
as julian_date,
select to_char
(
day, 'J'
)
as julian_date,
sum
(
hours
)
as hours
from im_hours
where user_id = :user_id_from_search
and day between to_date
(
:first_julian_date, 'J'
)
and to_date
(
:last_julian_date, 'J'
)
and day between to_date
(
:first_julian_date, 'J'
)
and to_date
(
:last_julian_date, 'J'
)
$project
_restriction
group by
group by
to_char
(
day, 'J'
)
"
db_foreach hours_logged
$sql
{
...
...
@@ -257,46 +257,47 @@ set absence_list [absence_list_for_user_and_time_period $user_id_from_search $fi
set absence_index 0
set curr_absence ""
# Column counter runs from 1 to 7
# Column counter runs from 1 to 7
set column_ctr 1
# Counter for weekday -> need to correspond with weekly_logging_days
if {
1 ==
$start
_day
} {
# Week starts with Monday
set week_day 1
if {
1 ==
$start
_day
} {
# Week starts with Monday
set week_day 1
} else {
# Week starts with Sunday
set week_day 0
# Week starts with Sunday
set week_day 0
}
# Helper to determine location of last WF confirm button -> last day shown or last day of month
# Helper to determine location of last WF confirm button -> last day shown or last day of month
set show_last_confirm_button_p 1
set timesheet_entry_blocked_p 0
# And now fill in information for every day of the month
for {
set current_date
$first
_julian_date} {
$current
_date <=
$last
_julian_date } { incr current_date
} {
set current_date_ansi
[
dt_julian_to_ansi
$current
_date
]
for {
set current_date
$first
_julian_date} {
$current
_date <=
$last
_julian_date} {incr current_date
} {
set current_date_ansi
[
dt_julian_to_ansi
$current
_date
]
if {
$confirm
_timesheet_hours_p
} {
if {
$confirm
_timesheet_hours_p
} {
set no_ts_approval_wf_sql "
select count
(
*
)
from im_hours
where conf_object_id is not null
and day::text like '%
[
string
range
$current
_date_ansi 0 9
]
%'
select count
(
*
)
from im_hours
where conf_object_id is not null
and day::text like '%
[
string
range
$current
_date_ansi 0 9
]
%'
and user_id = :current_user_id
"
set no_ts_approval_wf
[
db_string workflow_started_p
$no
_ts_approval_wf_sql -default
"0"
]
if {
$confirm
_timesheet_hours_p && ("
monthly
" in
$confirmation
_period || "
weekly
" in
$confirmation
_period) && 0 !=
$no
_ts_approval_wf
} {
if {
$confirm
_timesheet_hours_p && ("
monthly
" in
$confirmation
_period || "
weekly
" in
$confirmation
_period) && 0 !=
$no
_ts_approval_wf
} {
# ns_log Notice "
TS: Entry blocked: Date:
$current
_date_ansi
;
Number:
$no
_ts_approval_wf
;
$no
_ts_approval_wf_sql
"
set timesheet_entry_blocked_p 1
set timesheet_entry_blocked_p 1
}
}
# -------------------------------------------------------------------------
# User's hours for the day
set hours ""
if {
[
info
exists users_hours
(
$current
_date
)]
&&
$users
_hours(
$current
_date) ne ""
} {
if {
[
info
exists users_hours
(
$current
_date
)]
&&
$users
_hours(
$current
_date) ne ""
} {
set hours "
$users
_hours
(
$current
_date
)
[
lang::message::lookup
""
intranet-timesheet2.hours
"hours"
]
"
set hours_for_this_week
[
expr
{
$hours
_for_this_week +
$users
_hours
(
$current
_date
)}]
...
...
@@ -307,11 +308,11 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
}
} else {
if {
$timesheet
_entry_blocked_p
} {
if {
$timesheet
_entry_blocked_p
} {
set hours "
<span class='log_hours'>
[
lang::message::lookup
""
intranet-timesheet2.Nolog_Workflow_In_Progress
"0 hours"
]
</span>
"
} else {
if {
[
string
first
$week
_day
$weekly
_logging_days
]
!= -1
} {
set hours "
<span class='log_hours'>
[
_ intranet-timesheet2.log_hours
]
</span>
"
if {
[
string
first
$week
_day
$weekly
_logging_days
]
!= -1
} {
set hours "
<span class='log_hours'>
[
lang::message::lookup
""
intranet-timesheet2.Log_hours
"Log hours"
]
</span>
"
}
}
}
...
...
@@ -319,7 +320,7 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
if {!
[
info
exists unconfirmed_hours
(
$current
_date
)]
} { set unconfirmed_hours(
$current
_date) "" }
if {"" ==
$unconfirmed
_hours(
$current
_date)} { set unconfirmed_hours(
$current
_date) 0 }
# Sum up unconfirmed_hours - KH: 160624: This might be broken and it seems that vars are not being used.
# Sum up unconfirmed_hours - KH: 160624: This might be broken and it seems that vars are not being used.
set unconfirmed_hours_for_this_week
[
expr
{
$unconfirmed
_hours_for_this_week +
$unconfirmed
_hours
(
$current
_date
)}]
set unconfirmed_hours_for_this_month
[
expr
{
$unconfirmed
_hours_for_this_month +
$unconfirmed
_hours
(
$current
_date
)}]
...
...
@@ -329,13 +330,13 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
set hours_url
[
export_vars -base
"
$hours
_base_url/new"
{
user_id_from_search
{
julian_date
$current
_date
}
show_week_p return_url project_id project_id
}]
if {
[
string
first
$week
_day
$weekly
_logging_days
]
!= -1
} {
if {
[
string
first
$week
_day
$weekly
_logging_days
]
!= -1
} {
set hours "
<a href=$hours_url>$hours</a>
"
} else {
set hours "
$hours
"
}
if {
$column
_ctr == 1 &&
$show
_link_log_hours_for_week_p
} {
if {
$column
_ctr == 1 &&
$show
_link_log_hours_for_week_p} {
set log_hours_for_the_week_html "
<br>
<a href=
[
export_vars -base
"
$hours
_base_url/new"
{
user_id_from_search
{
julian_date
$current
_date
}
{
show_week_p 1
}
return_url
}]
><span class='log_hours'>
[
lang::message::lookup
""
intranet-timesheet2.Log_hours_for_the_week
"Log hours for the week"
]
</span></a>
...
...
@@ -344,9 +345,9 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
set log_hours_for_the_week_html ""
}
if {
[
info
exists users_hours
(
$current
_date
)]
} {
if {
[
info
exists unconfirmed_hours
(
$current
_date
)]
&&
$confirm
_timesheet_hours_p
} {
set no_unconfirmed_hours
[
get_unconfirmed_hours_for_period
$user
_id_from_search
$current
_date
$current
_date
]
if {
[
info
exists users_hours
(
$current
_date
)]
} {
if {
[
info
exists unconfirmed_hours
(
$current
_date
)]
&&
$confirm
_timesheet_hours_p
} {
set no_unconfirmed_hours
[
get_unconfirmed_hours_for_period
$user
_id_from_search
$current
_date
$current
_date
]
if {0 ==
$no
_unconfirmed_hours || "" ==
$no
_unconfirmed_hours} {
set wf_actice_case_sql "
select count
(
*
)
...
...
@@ -357,13 +358,13 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
h.user_id = :user_id_from_search
"
set no_wf_cases
[
db_string no_wf_cases
$wf
_actice_case_sql
]
if {
$no
_wf_cases > 0
} {
if {
$no
_wf_cases > 0
} {
set html "
<span id='hours_confirmed_yellow'>$hours</span>$curr_absence$log_hours_for_the_week_html
"
} else {
set html "
<span id='hours_confirmed_green'>$hours</span>$curr_absence$log_hours_for_the_week_html
"
}
} else {
set html "
${hours}${curr_absence}
<br>
"
set html "
${hours}${curr_absence}
<br>
"
if {
$confirm
_timesheet_hours_p} {
append html "
[
lang::message::lookup
""
intranet-timesheet2.ToConfirm
"To confirm"
]
: 
;
"
append html "
<span id='hours_confirmed_red'>$
{
no_unconfirmed_hours
}
 
;[
_ intranet-timesheet2.hours
]
</span>
"
...
...
@@ -378,29 +379,29 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
}
# Weekly total
if {(
$column
_ctr == 7 || 0 &&
$current
_date_ansi ==
$last
_day_of_month_ansi) &&
$show
_last_confirm_button_p
} {
if {(
$column
_ctr == 7 || 0 &&
$current
_date_ansi ==
$last
_day_of_month_ansi) &&
$show
_last_confirm_button_p} {
append html "
<br>
<a href=
[
export_vars -base
"week"
{{
julian_date
$current
_date
}
user_id_from_search
}]
>
[
_ intranet-timesheet2.Week_total_1
]
[
format
"%.2f"
[
expr
{
double
(
round
(
100*$hours_for_this_week
))
/100
}]]
</a>
"
if {
$current
_date_ansi ==
$last
_day_of_month_ansi} { set show_last_confirm_button_p 0 }
if {
$current
_date_ansi ==
$last
_day_of_month_ansi} { set show_last_confirm_button_p 0 }
# Include link for weekly TS confirmation
# Monthly confirmation_period not supported yet, always assume weekly
# if {
$confirmation
_period eq "
weekly
" &&
$confirm
_timesheet_hours_p
} {}
# if {
$confirmation
_period eq "
weekly
" &&
$confirm
_timesheet_hours_p
} {}
if {
$confirm
_timesheet_hours_p} {
if {
!
$fill
_up_first_last_row_p
} {
if {
!
$fill
_up_first_last_row_p
} {
set start_date_julian_wf
[
eval_wf_start_date
$current
_date
$column
_ctr
]
set end_date_julian_wf
$current
_date
} else {
set start_date_julian_wf
[
expr
{
$current
_date - 6
}]
set end_date_julian_wf
$current
_date
set end_date_julian_wf
$current
_date
}
set no_unconfirmed_hours
[
get_unconfirmed_hours_for_period
$user
_id_from_search
$start
_date_julian_wf
$end
_date_julian_wf
]
if {
$confirm
_timesheet_hours_p && (0 <
$no
_unconfirmed_hours || "" !=
$no
_unconfirmed_hours) && ("
weekly
" in
$confirmation
_period)
} {
set conf_url
[
export_vars -base
$base
_url_confirm_wf
{
{
user_id
$user
_id_from_search
}
{
start_date_julian
$start
_date_julian_wf
}
{
end_date_julian
$end
_date_julian_wf
}
return_url
}]
if {
$confirm
_timesheet_hours_p && (0 <
$no
_unconfirmed_hours || "" !=
$no
_unconfirmed_hours) && ("
weekly
" in
$confirmation
_period)} {
set conf_url
[
export_vars -base
$base
_url_confirm_wf
{
{
user_id
$user
_id_from_search
}
{
start_date_julian
$start
_date_julian_wf
}
{
end_date_julian
$end
_date_julian_wf
}
return_url
}]
set button_txt
[
lang::message::lookup
""
intranet-timesheet2.Confirm_weekly_hours
"Confirm hours for this week"
]
append html "
<p> 
;
</p><a href='$conf_url' class=button>$button_txt</a>
"
}
...
...
@@ -428,18 +429,18 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
package_name = 'intranet-attendance-management'
"
}
err_msg
]
} {
ad_return_complaint 1 "
<b>Error locating the attendance portlet</b>:
ad_return_complaint 1 "
<b>Error locating the attendance portlet</b>:
There is no portlet named 'Attendance Management' of package 'intranet-attendance-management'.<br>
"
}
set work_url
[
export_vars -base
$page
_url
{{
view_name
"component"
}
plugin_id
{
julian
$current
_date
}}]
# Calculate the actual work/break time
set work 0
if {
[
info
exists att_work_hash
(
$current
_date
)]
} {
set work
[
expr
round
(
10.0 *
$att
_work_hash
(
$current
_date
))
/ 10.0
]
if {
[
info
exists att_work_hash
(
$current
_date
)]
} {
set work
[
expr
round
(
10.0 *
$att
_work_hash
(
$current
_date
))
/ 10.0
]
}
set break ""
if {
[
info
exists att_break_hash
(
$current
_date
)]
} {
if {
[
info
exists att_break_hash
(
$current
_date
)]
} {
set break
[
expr
round
(
10.0 *
$att
_break_hash
(
$current
_date
))
/ 10.0
]
}
...
...
@@ -452,11 +453,11 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
# Write out lines for work and break
set line_items
[
list
]
if {"" ne
$work
} {
if {"" ne
$work
} {
lappend line_items "
<a href=$work_url target=_>$color_html
$work
_l10n:
${work}${hour_l10n}$color
_html_end</a>
"
}
if {"" ne
$break
} {
lappend line_items "
$break
_l10n:
${break}${hour_l10n}
"
if {"" ne
$break
} {
lappend line_items "
$break
_l10n:
${break}${hour_l10n}
"
}
if {
[
llength
$line
_items
]
> 0} {
append html "
<br>
[
join
$line
_items
",<br> "
]
"
...
...
@@ -468,38 +469,36 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
# Comparison at the end of the month
if {
$current
_date_ansi ==
$last
_day_of_month_ansi} {
append html "
<br>Attend. month:
[
expr
round
(
10.0 *
$attendance
_work
)
/ 10.0
]
${hour_l10n}
"
}
}
}
# Monthly hour approval request
if {
$current
_date_ansi ==
$last
_day_of_month_ansi && ("
monthly
" in
$confirmation
_period)
} {
if {
$current
_date_ansi ==
$last
_day_of_month_ansi && ("
monthly
" in
$confirmation
_period)
} {
set start_date_month_julian
[
dt_ansi_to_julian_single_arg
$first
_day_of_month_ansi
]
set end_date_month_julian
[
dt_ansi_to_julian_single_arg
$last
_day_of_month_ansi
]
set conf_url
[
export_vars -base
$base
_url_confirm_wf
{
{
user_id
$user
_id_from_search
}
{
start_date_julian
$start
_date_month_julian
}
{
end_date_julian
$end
_date_month_julian
}
return_url
}
]
set conf_url
[
export_vars -base
$base
_url_confirm_wf
{
{
user_id
$user
_id_from_search
}
{
start_date_julian
$start
_date_month_julian
}
{
end_date_julian
$end
_date_month_julian
}
return_url
}
]
set button_txt
[
lang::message::lookup
""
intranet-timesheet2.Confirm_monthly_hours
"Confirm hours for this month"
]
append html "
<p> 
;
</p><a href='$conf_url' class=button>$button_txt</a>
"
}
}
ns_set put
$calendar
_details
$current
_date "
$html
<br> 
;
"
# we keep track of the day of the week we are on
incr column_ctr
incr week_day
incr week_day
if {
$column
_ctr > 7
} {
if {
$column
_ctr > 7
} {
set column_ctr 1
set hours_for_this_week 0.0
set unconfirmed_hours_for_this_week 0.0
}
# Weekday needs to be in range
[
0..6
]
if {
$week
_day > 6
} {
set week_day 0
if {
$week
_day > 6
} {
set week_day 0
}
set curr_absence ""
...
...
@@ -508,14 +507,14 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
}
set prev_month_template "
<font color=white><
;
</font>
<font color=white><
;
</font>
<a href=
\"
[
export_vars -base index
{
user_id_from_search
}]
&date=
\$
ansi_date
\"
>
<font color=white>
\[
_ intranet-timesheet2.$prev_month_name
]
</font>
</a>
"
set next_month_template "
<a href=
\"
[
export_vars -base index
{
user_id_from_search
}]
&date=
\$
ansi_date
\"
>
<font color=white>
\[
_ intranet-timesheet2.$next_month_name
]
</font>
</a>
</a>
<font color=white>>
;
</font>
"
set day_bgcolor "
#efefef
"
...
...
@@ -569,7 +568,7 @@ set left_navbar_html "
</div>
<form action='$hours_base_url/index' method=GET>
[
export_vars -form
{
show_week_p
}]
[
export_vars -form
{
show_week_p
}]
<table border=0 cellpadding=1 cellspacing=1>
<tr>
<td>
[
lang::message::lookup
""
intranet-core.Date
"Date"
]
</td>
...
...
@@ -652,4 +651,3 @@ if {"" ne $admin_html} {
</div><ul>$admin_html</ul></div>
"
}
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