Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-cost
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-cost
Commits
f2982141
Commit
f2982141
authored
Nov 19, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- Building tree with treesortkey, separate code from name
parent
4bbbb4b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
index.tcl
www/cost-centers/index.tcl
+18
-20
No files found.
www/cost-centers/index.tcl
View file @
f2982141
...
...
@@ -41,18 +41,11 @@ if {"" == $return_url} {
set
table_header
"
<tr>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=20> </td>
<td width=150> </td>
<td> </td>
"
append
table_header
"
<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-cost.CostCenter
"Cost Center Code"
]
</td>
<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-cost.DeptQuest
"Dept?"
]
</td>
<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-cost.InheritFrom
"Inherit Permsissons From"
]
</td>
<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-cost.Manager
"Manager"
]
</td>
...
...
@@ -76,7 +69,9 @@ set main_sql "
im_name_from_user_id(m.manager_id) as manager_name,
e.employee_id as employee_id,
im_name_from_user_id(e.employee_id) as employee_name,
acs_object__name(o.context_id) as context
acs_object__name(o.context_id) as context,
o.tree_sortkey,
tree_level(o.tree_sortkey) as tree_level
from
acs_objects o,
im_cost_centers m
...
...
@@ -96,23 +91,22 @@ set table ""
set
ctr 0
set
old_package_name
""
set
last_id 0
set
space
" "
db_foreach cost_centers
$main
_sql
{
incr ctr
set object_id
$cost
_center_id
append table
"
\n
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
if
{
0 !=
$indent
_level
}
{
append table
"
\n
<td colspan=
$indent
_level> </td>"
}
set sub_indent
""
for
{
set
i 1
}
{
$i
<
$tree
_level
}
{
incr
i
}
{
append sub_indent
$space
}
if
{
$last
_id !=
$cost
_center_id
}
{
append table
"
<td colspan=
$colspan
_level>
<nobr>
append table
"<td>
<nobr>
$sub
_indent
<A href=
$cost
_center_url?cost_center_id=
$cost
_center_id&return_url=
$return
_url
>
$cost
_center_code -
$cost
_center_name</A>
>
$cost
_center_name</A>
</nobr>
<td>
$cost
_center_code</td>
</td>
<td>
$department
_p</td>
<td>
$context
</td>
...
...
@@ -120,7 +114,11 @@ db_foreach cost_centers $main_sql {
"
}
else
{
append table
"
<td colspan=
[
expr
9+2-$indent_level
]
></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
"
}
...
...
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