Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-tasks
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-tasks
Commits
cacdee7c
Commit
cacdee7c
authored
Aug 09, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added admin links to task hierarchy component component
parent
72896950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
intranet-timesheet2-tasks-procs.tcl
tcl/intranet-timesheet2-tasks-procs.tcl
+9
-2
No files found.
tcl/intranet-timesheet2-tasks-procs.tcl
View file @
cacdee7c
...
@@ -120,6 +120,7 @@ ad_proc -public im_timesheet_task_list_component {
...
@@ -120,6 +120,7 @@ ad_proc -public im_timesheet_task_list_component {
}
{
}
{
# ---------------------- Security - Show the comp? -------------------------------
# ---------------------- Security - Show the comp? -------------------------------
set user_id
[
ad_get_user_id
]
set user_id
[
ad_get_user_id
]
set user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
set include_subprojects 0
set include_subprojects 0
...
@@ -181,6 +182,7 @@ ad_proc -public im_timesheet_task_list_component {
...
@@ -181,6 +182,7 @@ ad_proc -public im_timesheet_task_list_component {
#
#
set column_headers
[
list
]
set column_headers
[
list
]
set column_vars
[
list
]
set column_vars
[
list
]
set admin_links
[
list
]
set extra_selects
[
list
]
set extra_selects
[
list
]
set extra_froms
[
list
]
set extra_froms
[
list
]
set extra_wheres
[
list
]
set extra_wheres
[
list
]
...
@@ -198,6 +200,8 @@ ad_proc -public im_timesheet_task_list_component {
...
@@ -198,6 +200,8 @@ ad_proc -public im_timesheet_task_list_component {
if
{
""
==
$visible
_for ||
[
eval
$visible
_for
]}
{
if
{
""
==
$visible
_for ||
[
eval
$visible
_for
]}
{
lappend column_headers
"
$column
_name"
lappend column_headers
"
$column
_name"
lappend column_vars
"
$column
_render_tcl"
lappend column_vars
"
$column
_render_tcl"
lappend admin_links
"<a href=
[
export_vars -base
"/intranet/admin/views/new-column"
{
return_url column_id
{
form_mode edit
}}]
target=
\"
_blank
\"
>
[
im_gif wrench
]
</a>"
if
{
""
!=
$extra
_select
}
{
lappend extra_selects
$extra
_select
}
if
{
""
!=
$extra
_select
}
{
lappend extra_selects
$extra
_select
}
if
{
""
!=
$extra
_from
}
{
lappend extra_froms
$extra
_from
}
if
{
""
!=
$extra
_from
}
{
lappend extra_froms
$extra
_from
}
if
{
""
!=
$extra
_where
}
{
lappend extra_wheres
$extra
_where
}
if
{
""
!=
$extra
_where
}
{
lappend extra_wheres
$extra
_where
}
...
@@ -253,6 +257,8 @@ ad_proc -public im_timesheet_task_list_component {
...
@@ -253,6 +257,8 @@ ad_proc -public im_timesheet_task_list_component {
# Format the header names with links that modify the
# Format the header names with links that modify the
# sort order of the SQL query.
# sort order of the SQL query.
#
#
set col_ctr 0
set admin_link
""
set table_header_html
""
set table_header_html
""
foreach col
$column
_headers
{
foreach col
$column
_headers
{
set cmd_eval
""
set cmd_eval
""
...
@@ -261,8 +267,9 @@ ad_proc -public im_timesheet_task_list_component {
...
@@ -261,8 +267,9 @@ ad_proc -public im_timesheet_task_list_component {
eval
$cmd
eval
$cmd
regsub -all
" "
$cmd
_eval
"_"
cmd_eval_subs
regsub -all
" "
$cmd
_eval
"_"
cmd_eval_subs
set cmd_eval
[
lang::message::lookup
""
intranet-timesheet2-tasks.$cmd_eval_subs
$cmd
_eval
]
set cmd_eval
[
lang::message::lookup
""
intranet-timesheet2-tasks.$cmd_eval_subs
$cmd
_eval
]
lappend column_headers
$column
_name
if
{
$user
_is_admin_p
}
{
set admin_link
[
lindex
$admin
_links
$col
_ctr
]
}
append table_header_html
" <th class=rowtitle>
$cmd
_eval</th>
\n
"
append table_header_html
" <th class=rowtitle>
$cmd
_eval
$admin
_link</th>
\n
"
incr col_ctr
}
}
set table_header_html
"
set table_header_html
"
...
...
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