Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-core
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-core
Commits
a1434d06
Commit
a1434d06
authored
Sep 03, 2004
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- started adding new-company-from-freelance
parent
75bb82b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
74 deletions
+66
-74
intranet-customer-procs.tcl
tcl/intranet-customer-procs.tcl
+3
-0
index.adp
www/customers/index.adp
+51
-1
index.tcl
www/customers/index.tcl
+12
-73
No files found.
tcl/intranet-customer-procs.tcl
View file @
a1434d06
...
...
@@ -35,6 +35,9 @@ ad_proc -public im_customer_type_other {} { return 52 }
ad_proc -public im_customer_type_internal
{}
{
return 53
}
ad_proc -public im_customer_type_provider
{}
{
return 56
}
ad_proc -public im_customer_type_customer
{}
{
return 57
}
ad_proc -public im_customer_type_freelance
{}
{
return 58
}
ad_proc -public im_customer_type_office_equip
{}
{
return 59
}
ad_proc -public im_customer_annual_rev_0_1
{}
{
return 223
}
ad_proc -public im_customer_annual_rev_1_10
{}
{
return 224
}
...
...
www/customers/index.adp
View file @
a1434d06
...
...
@@ -2,7 +2,57 @@
<property name="title">Companies</property>
<property name="context">context</property>
<%= $customer_filter_html %>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<form method=get action='/intranet/customers/index' name=filter_form>
<%= [export_form_vars start_idx order_by how_many letter view_name] %>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td colspan='2' class=rowtitle align=center>
Filter Companies
</td>
</tr>
<tr>
<td valign=top>View: </td>
<td valign=top><%= [im_select view_type $view_types ""] %></td>
</tr>
<tr>
<td valign=top>Company Status: </td>
<td valign=top><%= [im_select status_id $status_types ""] %></td>
</tr>
<tr>
<td valign=top>Company Type: </td>
<td valign=top>
<%= [im_select type_id $customer_types ""] %>
<input type=submit value=Go name=submit>
</td>
</tr>
</table>
</form>
</td>
<td> </td>
<td valign=top>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class=rowtitle align=center>
Admin Companies
</td>
</tr>
<tr>
<td>
@admin_html;noquote@
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100% cellpadding=2 cellspacing=2 border=0>
<%= $table_header_html %>
...
...
www/customers/index.tcl
View file @
a1434d06
...
...
@@ -29,7 +29,7 @@ ad_page_contract {
@author Frank Bergmann
(
frank.bergmann@project-open.com
)
}
{
{
status_id:integer
""
}
{
type_id:integer
"
0
"
}
{
type_id:integer
"
[
im_customer_type_customer
]
"
}
{
start_idx:integer
"1"
}
{
order_by
"Company"
}
{
how_many
""
}
...
...
@@ -160,7 +160,16 @@ if { ![empty_string_p $status_id] && $status_id != 0 } {
if
{
$type
_id > 0
}
{
ns_set put
$bind
_vars type_id
$type
_id
lappend criteria
"c.customer_type_id=:type_id"
lappend criteria
"c.customer_type_id in (
select category_id
from im_categories
where category_id= :type_id
UNION
select distinct
child_id
from im_category_hierarchy
where parent_id = :type_id
)"
}
if
{
!
[
empty_string_p
$letter
]
&&
[
string
compare
$letter
"ALL"
]
!= 0 &&
[
string
compare
$letter
"SCROLL"
]
!= 0
}
{
...
...
@@ -245,6 +254,7 @@ set perm_sql "
c.customer_id = r.object_id(+)
$where
_clause
"
set
sql
"
select
c.*,
...
...
@@ -305,37 +315,6 @@ if {[string compare $letter "ALL"]} {
ns_log Notice
$selection
# ---------------------------------------------------------------
# 6. Format the Filter
# ---------------------------------------------------------------
set
filter_html
"
<form method=get action='/intranet/customers/index' name=filter_form>
[
export_form_vars start_idx order_by how_many letter view_name
]
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td colspan='2' class=rowtitle align=center>
Filter Companies
</td>
</tr>
<tr>
<td valign=top>View: </td>
<td valign=top>
[
im_select view_type
$view
_types
""
]
</td>
</tr>
<tr>
<td valign=top>Company Status: </td>
<td valign=top>
[
im_select status_id
$status
_types
""
]
</td>
</tr>
<tr>
<td valign=top>Company Type: </td>
<td valign=top>
[
im_select type_id
$customer
_types
""
]
<input type=submit value=Go name=submit>
</td>
</tr>
</table>
</form>"
# ----------------------------------------------------------
# Do we have to show administration links?
...
...
@@ -357,37 +336,6 @@ if {[im_permission $user_id admin_customers]} {
}
set
customer_filter_html
$filter
_html
if
{
""
!=
$admin
_html
}
{
set customer_filter_html
"
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <!-- TD for the left hand filter HTML -->
$filter
_html
</td> <!-- end of left hand filter TD -->
<td> </td>
<td valign=top>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class=rowtitle align=center>
Admin Companies
</td>
</tr>
<tr>
<td>
$admin
_html
</td>
</tr>
</table>
</td>
</tr>
</table>
"
}
# ---------------------------------------------------------------
# 7. Format the List Table Header
# ---------------------------------------------------------------
...
...
@@ -476,15 +424,6 @@ if { $start_idx > 1 } {
}
# ---------------------------------------------------------------
# 9. Format Table Continuation
# ---------------------------------------------------------------
# nothing to do here ... (?
)
set
table_continuation_html
""
# ---------------------------------------------------------------
# 10. Join all parts together
# ---------------------------------------------------------------
db_release_unused_handles
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