Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting
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-reporting
Commits
8852e9fb
Commit
8852e9fb
authored
Nov 07, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added a check to users-contacts if we already sent a mail before.
parent
a394f00f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
user-contacts.tcl
www/user-contacts.tcl
+14
-6
No files found.
www/user-contacts.tcl
View file @
8852e9fb
...
...
@@ -36,13 +36,10 @@ if {"t" ne $read_p } {
# Maxlevel is 3.
if
{
$level
_of_detail > 3
}
{
set level_of_detail 3
}
set
return_url
[
im_url_with_query
]
set
role_id 1300
set
object_id
$current
_user_id
set
notify_asignee 1
set
offset
[
expr
{
$page
*
$limit
}]
# ------------------------------------------------------------
...
...
@@ -77,6 +74,8 @@ set company_url "/intranet/companies/view?company_id="
set
user_url
"/intranet/users/view?user_id="
set
this_url
"/intranet-reporting/user-contacts?"
set
today_julian
[
dt_ansi_to_julian_single_arg
[
db_string now
"select now()::date"
]]
set
pages
[
list
]
for
{
set
i 0
}
{
$i
< 100
}
{
incr
i
}
{
lappend pages
$i
...
...
@@ -162,7 +161,7 @@ OFFSET :offset
# Global Header Line
set
header0
[
list
\
"<input type=checkbox name=_dummy onclick=
\\\"
acs_ListCheckAll('user',this.checked)
\\\"
>"
\
"<input type=checkbox name=_dummy onclick=
\\\"
acs_ListCheckAll('user',this.checked)
\\\"
checked
>"
\
[
lang::message::lookup
""
intranet-reporting.Company_short Comp
]
\
[
lang::message::lookup
""
intranet-reporting.Customer_oneletter
"C"
]
\
[
lang::message::lookup
""
intranet-reporting.Employee_oneletter
"E"
]
\
...
...
@@ -202,7 +201,7 @@ set report_def [list \
}
\
content
[
list
\
header
{
"<input type=checkbox name=user_id_from_search value=
$user
_id id=user,
$user
_id>"
"<input type=checkbox name=user_id_from_search value=
$user
_id id=user,
$user
_id
$checked
>"
""
"
$customer
_p"
"
$employee
_p"
...
...
@@ -333,7 +332,7 @@ switch $output_format {
</table>
<!-- Here starts the main report table -->
<form action='/intranet/member-add-2' method=
GE
T>
<form action='/intranet/member-add-2' method=
POS
T>
[
export_vars -form
{
return_url role_id object_id notify_asignee
}]
<table border=0 cellspacing=1 cellpadding=1>
"
...
...
@@ -379,6 +378,15 @@ db_foreach sql $report_sql {
if
{
""
!=
$wa
_country
}
{
lappend wa_list
$wa
_country
}
set wa
[
join
$wa
_list
", "
]
# Did we sent this guy an email already?
set checked
"checked"
if
{[
info
exists spam_frequency_id
]
&&
[
info
exists last_email_sent
]
&&
""
ne
$spam
_frequency_id &&
""
ne
$last
_email_sent
}
{
set last_email_julian
[
dt_ansi_to_julian_single_arg
[
lindex
$last
_email_sent 0
]]
set spam_frequency_days
[
util_memoize
[
list
db_string days_freq
"select aux_int1 from im_categories where category_id =
$spam
_frequency_id"
-default 99999
]]
if
{
$today
_julian <
[
expr
$last
_email_julian +
$spam
_frequency_days
]}
{
set checked
""
}
}
# Select either
"roweven"
or
"rowodd"
from
# a
"hash"
, depending on the value of
"counter"
.
# You need explicite evaluation
(
"expre"
)
in TCL
...
...
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