Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-invoices
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-invoices
Commits
1845214e
Commit
1845214e
authored
Aug 31, 2004
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added invoice notify files
parent
700187e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
0 deletions
+163
-0
notify-2.tcl
www/notify-2.tcl
+33
-0
notify.adp
www/notify.adp
+39
-0
notify.tcl
www/notify.tcl
+91
-0
No files found.
www/notify-2.tcl
0 → 100755
View file @
1845214e
# /packages/intranet-core/www/member-notify.tcl
#
# Copyright (C
)
1998-2004 various parties
# The code is based on ArsDigita ACS 3.4
#
# This program is free software. You can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation
;
# either version 2 of the License, or (at your option
)
# any later version. This program is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY
;
# without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
ad_page_contract
{
Sends a notification message to a member
@author frank.bergmann@project-open.com
}
{
user_id_from_search:integer
object_id:integer
role_id:integer
subject
message
return_url
}
set
user_id
[
ad_maybe_redirect_for_registration
]
# Send out an email alert
im_send_alert
$user
_id_from_search
"hourly"
$subject
$message
ad_returnredirect
$return
_url
www/notify.adp
0 → 100755
View file @
1845214e
<master src="master">
<property name=title>Add a user</property>
<property name="context">@context;noquote@</property>
<H1>Send Notification</H1>
@first_names_from_search@ @last_name_from_search@ has been added to @system_name@.
Edit the message below and hit "Send Email" to
notify this user.
</p>
<form method="post" action="member-notify">
@export_vars;noquote@
<textarea name=subject rows=1 cols=70 wrap=hard>
@role_name@ of @object_name@
</textarea>
<textarea name=message rows=10 cols=70 wrap=hard>
Dear @first_names_from_search@,
You have been added as a @role_name@
to @object_name@
in @system_name@
at @object_url@
Please click on the link above for details.
Best regards,
@current_user_name@
</textarea>
<center>
<input type="submit" value="Send Email" />
</center>
</form>
</p>
www/notify.tcl
0 → 100755
View file @
1845214e
# /packages/intranet-core/www/member-add-2.tcl
#
# Copyright (C
)
1998-2004 various parties
# The code is based on ArsDigita ACS 3.4
#
# This program is free software. You can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation
;
# either version 2 of the License, or (at your option
)
# any later version. This program is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY
;
# without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
ad_page_contract
{
Purpose: Confirms adding of person to group
@param user_id_from_search user_id to add
@param object_id group to which to add
@param role_id role in which to add
@param return_url Return URL
@param also_add_to_group_id Additional groups to which to add
@author mbryzek@arsdigita.com
@author frank.bergmann@project-open.com
}
{
user_id_from_search:integer
{
notify_asignee 0
}
object_id:integer
role_id:integer
return_url
{
also_add_to_group_id:integer
""
}
}
set
user_id
[
ad_maybe_redirect_for_registration
]
# expect commands such as: "im_project_permissions" ...
#
set
object_type
[
db_string acs_object_type
"select object_type from acs_objects where object_id=:object_id"
]
set
perm_cmd
"
${object_type}
_permissions
\$
user_id
\$
object_id view read write admin"
eval
$perm
_cmd
if
{
!$write
}
{
ad_return_complaint 1
"You have no rights to add members to this object."
return
}
im_biz_object_add_role
$user
_id_from_search
$object
_id
$role
_id
# --------------------------------------------------------
# Prepare to send out an email alert
# --------------------------------------------------------
set
system_name
[
ad_system_name
]
set
object_name
[
db_string project_name
"select acs_object.name(:object_id) from dual"
]
set
page_title
"Notify user"
set
context
[
list
$page
_title
]
set
export_vars
[
export_form_vars user_id_from_search object_id role_id return_url
]
set
current_user_name
[
db_string cur_user
"select im_name_from_user_id(:user_id) from dual"
]
set
object_rel_url
[
db_string object_url
"select url from im_biz_object_urls where url_type = 'view' and object_type = :object_type"
]
set
role_name
[
db_string role_name
"select im_category_from_id(:role_id) from dual"
-default
"Member"
]
# Get the SystemUrl without trailing "/"
set
system_url
[
ad_parameter -package_id
[
ad_acs_kernel_id
]
SystemURL
""
]
set
sysurl_len
[
string
length
$system
_url
]
set
last_char
[
string
range
$system
_url
[
expr
$sysurl
_len-1
]
$sysurl
_len
]
if
{[
string
equal
"/"
$last
_char
]}
{
set system_url
"
[
string
range
$system
_url 0
[
expr
$sysurl
_len-2
]]
"
}
set
object_url
"
$system
_url
$object
_rel_url
$object
_id"
db_1row user_name
"
select
im_name_from_user_id(person_id) as user_name_from_search,
first_names as first_names_from_search,
last_name as last_name_from_search
from
persons
where
person_id=:user_id_from_search"
if
{
""
!=
$notify
_asignee && !
[
string
equal
"0"
$notify
_asignee
]}
{
# Show a textarea to edit the alert at member-add-2.tcl
ad_return_template
}
else
{
ad_returnredirect
$return
_url
}
return
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