Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-helpdesk
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-helpdesk
Commits
b748d456
Commit
b748d456
authored
Nov 25, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
55ec1545
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
171 additions
and
171 deletions
+171
-171
similar-tickets.tcl
lib/similar-tickets.tcl
+2
-2
ticket-age-per-queue.tcl
lib/ticket-age-per-queue.tcl
+1
-1
ticket-aging.tcl
lib/ticket-aging.tcl
+1
-1
intranet-helpdesk-procs.tcl
tcl/intranet-helpdesk-procs.tcl
+16
-16
sourceforge-import-procs.tcl
tcl/sourceforge-import-procs.tcl
+1
-1
default.adp
templates/default.adp
+3
-3
action-associate-2.adp
www/action-associate-2.adp
+3
-3
action-associate-2.tcl
www/action-associate-2.tcl
+3
-3
action-associate.adp
www/action-associate.adp
+7
-7
action-associate.tcl
www/action-associate.tcl
+1
-1
action-change-priority-2.adp
www/action-change-priority-2.adp
+1
-1
action-change-priority-2.tcl
www/action-change-priority-2.tcl
+1
-1
action-change-priority.adp
www/action-change-priority.adp
+1
-1
action-change-priority.tcl
www/action-change-priority.tcl
+2
-2
action-duplicated.tcl
www/action-duplicated.tcl
+1
-1
action-reassign-2.adp
www/action-reassign-2.adp
+1
-1
action-reassign-2.tcl
www/action-reassign-2.tcl
+1
-1
action-reassign.adp
www/action-reassign.adp
+1
-1
action-reassign.tcl
www/action-reassign.tcl
+2
-2
action.tcl
www/action.tcl
+2
-2
index.adp
www/admin/index.adp
+1
-1
index.tcl
www/admin/index.tcl
+1
-1
index.adp
www/index.adp
+5
-5
index.tcl
www/index.tcl
+31
-31
new-typeselect.adp
www/new-typeselect.adp
+3
-3
new-typeselect.tcl
www/new-typeselect.tcl
+2
-2
new.adp
www/new.adp
+5
-5
new.tcl
www/new.tcl
+11
-11
notify-stakeholders.adp
www/notify-stakeholders.adp
+5
-5
notify-stakeholders.tcl
www/notify-stakeholders.tcl
+4
-4
nuke-2.adp
www/nuke-2.adp
+2
-2
nuke-2.tcl
www/nuke-2.tcl
+1
-1
nuke.adp
www/nuke.adp
+4
-4
quote.adp
www/quote.adp
+4
-4
quote.tcl
www/quote.tcl
+1
-1
ticket-by-customer-dept.tcl
www/reporting/ticket-by-customer-dept.tcl
+3
-3
request-sla-2.adp
www/request-sla-2.adp
+2
-2
request-sla-2.tcl
www/request-sla-2.tcl
+1
-1
request-sla.adp
www/request-sla.adp
+5
-5
request-sla.tcl
www/request-sla.tcl
+1
-1
ticket-select.adp
www/ticket-select.adp
+5
-5
ticket-select.tcl
www/ticket-select.tcl
+23
-23
No files found.
lib/similar-tickets.tcl
View file @
b748d456
...
...
@@ -137,11 +137,11 @@ db_foreach tickets $sql {
}
set row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
set row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
append row_html
"<td>
$score
_html</td>
\n
"
append row_html
"<td><a href=
$ticket
_url>
$project
_name</a></td>
\n
"
append row_html
"</tr>
\n
"
append row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
append row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
append row_html
"<td colspan=2>
[
string
range
$message
0
$max
_message
]
</td>
\n
"
append row_html
"</tr>
\n
"
...
...
lib/ticket-age-per-queue.tcl
View file @
b748d456
...
...
@@ -64,6 +64,6 @@ set ticket_types_json "\[[join $ticket_types_list ","]\]"
# ----------------------------------------------------
# Create a random ID for the diagram
set
diagram_rand
[
expr
round
(
rand
()
* 100000000.0
)
]
set
diagram_rand
[
expr
{
round
(
rand
()
* 100000000.0
)}
]
set
diagram_id
"ticket_aging_
$diagram
_rand"
lib/ticket-aging.tcl
View file @
b748d456
...
...
@@ -75,6 +75,6 @@ set of_l10n [lang::message::lookup "" intranet-core.Ticket_Aging_of "of"]
# ----------------------------------------------------
# Create a random ID for the diagram
set
diagram_rand
[
expr
round
(
rand
()
* 100000000.0
)
]
set
diagram_rand
[
expr
{
round
(
rand
()
* 100000000.0
)}
]
set
diagram_id
"ticket_aging_
$diagram
_rand"
tcl/intranet-helpdesk-procs.tcl
View file @
b748d456
...
...
@@ -201,12 +201,12 @@ ad_proc -public im_ticket_permissions {
return 0
}
set owner_p
[
expr
$user
_id ==
$creation
_user_id
]
set assignee_p
[
expr
$user
_id ==
$ticket
_assignee_id
]
set customer_p
[
expr
$customer
_member_p ||
$user
_id ==
$ticket
_customer_contact_id
]
set owner_p
[
expr
{
$user
_id ==
$creation
_user_id
}
]
set assignee_p
[
expr
{
$user
_id ==
$ticket
_assignee_id
}
]
set customer_p
[
expr
{
$customer
_member_p ||
$user
_id ==
$ticket
_customer_contact_id
}
]
set read
[
expr
$admin
_p ||
$owner
_p ||
$assignee
_p ||
$customer
_p ||
$sla
_member_p ||
$ticket
_member_p ||
$holding
_user_p ||
$case
_assignee_p ||
$queue
_member_p ||
$view
_tickets_all_p ||
$edit
_tickets_all_p
]
set write
[
expr
$admin
_p ||
$edit
_tickets_all_p ||
$ticket
_admin_p
]
set read
[
expr
{
$admin
_p ||
$owner
_p ||
$assignee
_p ||
$customer
_p ||
$sla
_member_p ||
$ticket
_member_p ||
$holding
_user_p ||
$case
_assignee_p ||
$queue
_member_p ||
$view
_tickets_all_p ||
$edit
_tickets_all_p
}
]
set write
[
expr
{
$admin
_p ||
$edit
_tickets_all_p ||
$ticket
_admin_p
}
]
set view
$read
set admin
$write
...
...
@@ -393,7 +393,7 @@ namespace eval im_ticket {
while
{[
db_string lv
"select im_ticket_seq.last_value"
]
<
$last
_ticket_nr
}
{
set ttt
[
db_string update
"select nextval('im_ticket_seq')"
]
}
return
[
expr
$last
_ticket_nr + 1
]
return
[
expr
{
$last
_ticket_nr + 1
}
]
}
}
...
...
@@ -461,7 +461,7 @@ namespace eval im_ticket {
# Update the item with additional variables from the vars array
set sql_list
[
list
]
foreach var
[
array
names vars
]
{
if
{
$var
==
"ticket_id"
}
{
continue
}
if
{
$var
eq
"ticket_id"
}
{
continue
}
lappend sql_list
"
$var
= :
$var
"
}
set sql
"
...
...
@@ -1209,9 +1209,9 @@ ad_proc -public im_helpdesk_ticket_component {
set extra_select
[
join
$extra
_selects
",
\n\t
"
]
set extra_from
[
join
$extra
_froms
",
\n\t
"
]
set extra_where
[
join
$extra
_wheres
"and
\n\t
"
]
if
{
!
[
empty_string_p
$extra
_select
]
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
!
[
empty_string_p
$extra
_from
]
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
!
[
empty_string_p
$extra
_where
]
}
{
set extra_where
"and
\n\t
$extra
_where"
}
if
{
$extra
_select ne
""
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
$extra
_from ne
""
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
$extra
_where ne
""
}
{
set extra_where
"and
\n\t
$extra
_where"
}
if
{
0 ==
$ticket
_status_id
}
{
set ticket_status_id
[
im_ticket_status_open
]
}
...
...
@@ -1321,7 +1321,7 @@ ad_proc -public im_helpdesk_ticket_component {
# Format the List Table Header
# Set up colspan to be the number of headers + 1 for the # column
set colspan
[
expr
[
llength
$column
_headers
]
+ 1
]
set colspan
[
expr
{[
llength
$column
_headers
]
+ 1
}
]
set table_header_html
"<tr>
\n
"
foreach col
$column
_headers
{
...
...
@@ -1342,14 +1342,14 @@ ad_proc -public im_helpdesk_ticket_component {
db_foreach personal_ticket_query
$personal
_ticket_query
{
set url
[
im_maybe_prepend_http
$url
]
if
{
[
empty_string_p
$url
]
}
{
if
{
$url
eq
""
}
{
set url_string
" "
}
else
{
set url_string
"<a href=
\"
$url
\"
>
$url
</a>"
}
# Append together a line of data based on the
"column_vars"
parameter list
set row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
set row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
foreach column_var
$column
_vars
{
append row_html
"
\t
<td class=
\"
list
\"
>"
set cmd
"append row_html
$column
_var"
...
...
@@ -1363,7 +1363,7 @@ ad_proc -public im_helpdesk_ticket_component {
}
# Show a reasonable message when there are no result rows:
if
{
[
empty_string_p
$table
_body_html
]
}
{
if
{
$table
_body_html eq
""
}
{
# Let the component disappear if there are no tickets...
if
{
!$show_empty_ticket_list_p
}
{
return
""
}
...
...
@@ -1856,9 +1856,9 @@ No customer emails are lost, however the
offending ticket may get duplicated.
$err
_msg
"
if
[
catch
{
if
{
[
catch
{
ns_sendmail
$email
$sender
_email
$subject
$message
}
errmsg
]
{
}
errmsg
]
}
{
ns_log Error
"im_helpdesk_inbox_pop3_import_sweeper: Error sending to
\"
$email
\"
:
$errmsg
"
}
...
...
tcl/sourceforge-import-procs.tcl
View file @
b748d456
...
...
@@ -58,7 +58,7 @@ ad_proc -public im_helpdesk_sourceforge_tracker_import_sweeper { } {
set tree
[
xml_parse -persist
$xml
]
set rss_node
[
xml_doc_get_first_node
$tree
]
set root_name
[
xml_node_get_name
$rss
_node
]
if
{
!
[
string
equal
$root
_name
"rss"
]
}
{
if
{
$root
_name ne
"rss"
}
{
ns_log Error
"im_helpdesk_sourceforge_tracker_import_sweeper: Expected 'rss' as root node of xml file, found: '
$root
_name'"
return
}
...
...
templates/default.adp
View file @
b748d456
...
...
@@ -7,12 +7,12 @@ Printer Friendly Template for Tickets
<html>
<head>
<title><
%=[
lang::message::lookup
""
intranet-helpdesk
.
Ticket
"
Ticket
"]%
></title>
<link
rel=
'stylesheet'
href=
'/intranet/style/invoice.css'
type=
'text/css'
>
<link
rel=
StyleSheet
type=
text/css
href=
"/intranet/style/style.saltnpepper.css"
>
<link
rel=
"stylesheet"
href=
"/intranet/style/invoice.css"
type=
"text/css"
>
<link
rel=
StyleSheet
type=
"text/css"
href=
"/intranet/style/style.saltnpepper.css"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
</head>
<body
text=
"#000000"
>
<p
style=
'text-align:left'
><
%=[
im_logo
]%
></p>
<p
style=
"text-align:left"
><
%=[
im_logo
]%
></p>
<br>
<table
width=
"650px"
cellpadding=
"5"
cellspacing=
"5"
>
<tr>
...
...
www/action-associate-2.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
@@ -29,7 +29,7 @@
<tr>
<td></td>
<td><input type=
submit name=submit
value="Add User to Tickets"></td>
<td><input type=
"submit" name="submit"
value="Add User to Tickets"></td>
<td></td>
</tr>
</table>
...
...
@@ -55,7 +55,7 @@
<tr>
<td></td>
<td><input type=
submit name=submit
value="Add User to Tickets"></td>
<td><input type=
"submit" name="submit"
value="Add User to Tickets"></td>
<td></td>
</tr>
</table>
...
...
www/action-associate-2.tcl
View file @
b748d456
...
...
@@ -25,7 +25,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Associate_Ticket_With_$target_object_type
"Associate Ticket With
$target
_object_type"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
@@ -101,7 +101,7 @@ switch $target_object_type {
:current_user_id,
'
[
ad_conn peeraddr
]
',
:release_status_id,
[
expr
$max
_sort_order + 10
]
[
expr
{
$max
_sort_order + 10
}
]
)
"
]
...
...
@@ -163,7 +163,7 @@ switch $target_object_type {
null,
:current_user_id,
'
[
ad_conn peeraddr
]
',
[
expr
$max
_sort_order + 10
]
[
expr
{
$max
_sort_order + 10
}
]
)
"
# Write the audit log
...
...
www/action-associate.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
<br>
...
...
@@ -15,7 +15,7 @@
<thead>
<tr class="list-header">
<th colspan=
2
><%= [lang::message::lookup "" intranet-helpdesk.Associate_With "Associate With"] %></th>
<th colspan=
"2"
><%= [lang::message::lookup "" intranet-helpdesk.Associate_With "Associate With"] %></th>
<th> <%= [lang::message::lookup "" intranet-helpdesk.Object Object] %></th>
<th> <%= [lang::message::lookup "" intranet-helpdesk.Comment Comment] %></th>
</tr>
...
...
@@ -23,7 +23,7 @@
<tbody>
<tr>
<td> <input type=
radio name=target_object_type value=user
></td>
<td> <input type=
"radio" name="target_object_type" value="user"
></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Object_Type_User "User"] %></td>
<td> <%= [im_user_select user_id ""] %> <%= [lang::message::lookup "" intranet-helpdesk.Associate_As "as"] %>
<%= [im_biz_object_roles_select role_id $first_ticket_id [im_biz_object_role_full_member]] %>
...
...
@@ -35,7 +35,7 @@
</tr>
<tr>
<td> <input type=
radio name=target_object_type value=release_project
></td>
<td> <input type=
"radio" name="target_object_type" value="release_project"
></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Object_Type_Release_Project "Release Project"] %></td>
<td> <%= [im_project_select -project_type_id [im_project_type_software_release] release_project_id] %></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Associate_Msg_Release_Project "
...
...
@@ -45,7 +45,7 @@
</tr>
<tr>
<td> <input type=
radio name=target_object_type value=conf_item
></td>
<td> <input type=
"radio" name="target_object_type" value="conf_item"
></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Object_Type_Configuration_Item "Configuration Item"] %></td>
<td> <%= [im_select -ad_form_option_list_style_p 1 -translate_p 0 conf_item_id [im_conf_item_options]] %></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Associate_Msg_Conf_Item "
...
...
@@ -55,7 +55,7 @@
</tr>
<tr>
<td> <input type=
radio name=target_object_type value=ticket
></td>
<td> <input type=
"radio" name="target_object_type" value="ticket"
></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Object_Type_Ticket Ticket] %></td>
<td> <%= [im_select -ad_form_option_list_style_p 1 -translate_p 0 ticket_id [im_ticket_options -maxlen_name 30]] %></td>
<td> <%= [lang::message::lookup "" intranet-helpdesk.Associate_Msg_Ticket "
...
...
@@ -66,7 +66,7 @@
<tr>
<td> </td>
<td><input type=
submit name=submit
value="<%= [lang::message::lookup "" intranet-helpdesk.Associate_Assoc_Action Associate] %>"></td>
<td><input type=
"submit" name="submit"
value="<%= [lang::message::lookup "" intranet-helpdesk.Associate_Assoc_Action Associate] %>"></td>
<td> </td>
</tr>
<tbody>
...
...
www/action-associate.tcl
View file @
b748d456
...
...
@@ -19,7 +19,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Associate_Ticket_With_Other_Object
"Associate Tickets With Another Object"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
www/action-change-priority-2.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
www/action-change-priority-2.tcl
View file @
b748d456
...
...
@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Title_Change_Prio
"Change Ticket Prio"
]
if
{
""
==$ticket_prio
}
{
...
...
www/action-change-priority.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
www/action-change-priority.tcl
View file @
b748d456
...
...
@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
ticket_ids
[
list
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Title_Change_Prio
"Change Ticket Prio"
]
...
...
@@ -51,5 +51,5 @@ append ticket_list_html "</ul>"
set
select_box
[
im_category_select_plain
"Intranet Ticket Priority"
"ticket_prio"
]
# set form_action "
action-change-priority-2?[export_vars -url
{tid return_url
]
}
"
# set form_action "
[export_vars -base action-change-priority-2
{tid return_url
]
}
"
set form_action "
action-change-priority-2
"
www/action-duplicated.tcl
View file @
b748d456
...
...
@@ -29,7 +29,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
if
{
{}
==
$ticket
_ids
}
{
set ticket_ids
$tid
}
...
...
www/action-reassign-2.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
www/action-reassign-2.tcl
View file @
b748d456
...
...
@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Title_Reassign_Ticket
"Reassign Ticket"
]
if
{
""
==
$ticket
_assignee_id
}
{
...
...
www/action-reassign.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
www/action-reassign.tcl
View file @
b748d456
...
...
@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
ticket_ids
[
list
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Title_Reassign
"Reassign Tickets"
]
if
{
1 ==
[
llength
$tid
]}
{
set tid
[
lindex
$tid
0
]
}
...
...
@@ -78,5 +78,5 @@ foreach assig $ticket_assignee_options {
}
append
select_box
"</select>
\n
"
# set form_action
"action-reassign-2?
[
export_vars -url
{
tid return_url
}]
"
# set form_action
[
export_vars -base action-reassign-2
{
tid return_url
}]
set
form_action
"action-reassign-2"
www/action.tcl
View file @
b748d456
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
return_url
}
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
set
user_name
[
im_name_from_user_id
[
ad_conn user_id
]]
...
...
@@ -146,7 +146,7 @@ switch $action_id {
where t.ticket_id = p.project_id and
t.ticket_id = :ticket_id
"
set customer_p
[
expr
$ticket
_customer_contact_id ==
$user
_id ||
$customer
_company_member_p > 0
]
set customer_p
[
expr
{
$ticket
_customer_contact_id ==
$user
_id ||
$customer
_company_member_p > 0
}
]
if
{
!$customer_p && !$visible_explicite_permission_p
}
{
im_ticket::check_permissions -ticket_id
$ticket
_id -operation
"write"
...
...
www/admin/index.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
www/admin/index.tcl
View file @
b748d456
...
...
@@ -17,7 +17,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Admin_Helpdesk
"Helpdesk Administration"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
www/index.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
<property name="sub_navbar">@ticket_navbar_html;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="sub_navbar">@ticket_navbar_html;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<SCRIPT Language=JavaScript src=/resources/diagram/diagram/diagram.js></SCRIPT>
<table cellspacing=
0 cellpadding=0 border=0
width="100%">
<table cellspacing=
"0" cellpadding="0" border="0"
width="100%">
<form action=/intranet-helpdesk/action method=POST>
<%= [export_vars -form {return_url}] %>
<tr valign=
top
>
<tr valign=
"top"
>
<td>
<table class="table_list_page">
...
...
www/index.tcl
View file @
b748d456
...
...
@@ -37,7 +37,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Tickets
"Tickets"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
@@ -56,10 +56,10 @@ if {"all" == $mine_p && !$view_tickets_all_p} {
set mine_p
"queue"
}
if
{
[
empty_string_p
$how
_many
]
||
$how
_many < 1
}
{
if
{
$how
_many eq
""
||
$how
_many < 1
}
{
set how_many
[
im_parameter -package_id
[
im_package_core_id
]
NumberResultsPerPage
""
50
]
}
set
end_idx
[
expr
$start
_idx +
$how
_many
]
set
end_idx
[
expr
{
$start
_idx +
$how
_many
}
]
if
{
""
==
$start
_date
}
{
set start_date
[
parameter::get_from_package_key -package_key
"intranet-cost"
-parameter DefaultStartDate -default
"2000-01-01"
]
}
if
{
""
==
$end
_date
}
{
set end_date
[
parameter::get_from_package_key -package_key
"intranet-cost"
-parameter DefaultEndDate -default
"2100-01-01"
]
}
...
...
@@ -152,7 +152,7 @@ db_foreach column_list_sql $column_sql {
if
{
!$user_is_admin_p
}
{
set admin_link
""
}
set checkbox_p
[
regexp
{
<input
}
$column
_name match
]
if
{
[
string
compare
$order
_by
$column
_name
]
== 0
||
$checkbox
_p
}
{
if
{
$order
_by eq
$column
_name
||
$checkbox
_p
}
{
append table_header_html
"<td class=rowtitle>
$col
_txt
$admin
_link</td>
\n
"
}
else
{
append table_header_html
"<td class=rowtitle><a href=
\"
$col
_url
\"
>
$col
_txt</a>
$admin
_link</td>
\n
"
...
...
@@ -169,7 +169,7 @@ set table_header_html "
# Set up colspan to be the number of headers + 1 for the # column
set
colspan
[
expr
[
llength
$column
_headers
]
+ 1
]
set
colspan
[
expr
{[
llength
$column
_headers
]
+ 1
}
]
# ---------------------------------------------------------------
...
...
@@ -223,7 +223,7 @@ if {[llength $ticket_sla_options] < 2 && !$view_tickets_all_p} { set sla_exists_
# If there's only one SLA (usually when user is customer
)
set default SLA
if
{[
llength
$ticket
_sla_options
]
== 2 && !$view_tickets_all_p
}
{
set ticket_sla_options
[
im_helpdesk_ticket_sla_options -include_create_sla_p 1 -include_empty_p 0
]
set ticket_sla_id
[
lindex
[
lindex
$ticket
_sla_options 0
]
1
]
set ticket_sla_id
[
lindex
$ticket
_sla_options 0
1
]
}
set
ticket_creator_options
[
list
]
...
...
@@ -321,13 +321,13 @@ array set extra_sql_array [im_dynfield::search_sql_criteria_from_form \
# ---------------------------------------------------------------
set
criteria
[
list
]
if
{
!
[
empty_string_p
$ticket
_status_id
]
&&
$ticket
_status_id > 0
}
{
if
{
$ticket
_status_id ne
""
&&
$ticket
_status_id > 0
}
{
lappend criteria
"t.ticket_status_id in (select * from im_sub_categories(
$ticket
_status_id))"
}
if
{
!
[
empty_string_p
$ticket
_type_id
]
&&
$ticket
_type_id != 0
}
{
if
{
$ticket
_type_id ne
""
&&
$ticket
_type_id != 0
}
{
lappend criteria
"t.ticket_type_id in (
[
join
[
im_sub_categories
$ticket
_type_id
]
","
]
)"
}
if
{
!
[
empty_string_p
$ticket
_queue_id
]
&&
$ticket
_queue_id != 0
}
{
if
{
$ticket
_queue_id ne
""
&&
$ticket
_queue_id != 0
}
{
if
{
"null"
==
$ticket
_queue_id
}
{
lappend criteria
"t.ticket_queue_id is null"
}
else
{
...
...
@@ -335,11 +335,11 @@ if {![empty_string_p $ticket_queue_id] && $ticket_queue_id != 0 } {
}
}
if
{
[
empty_string_p
$ticket
_sla_id
]
== 0 &&
$ticket
_sla_id != 0
}
{
if
{
$ticket
_sla_id eq
""
== 0 &&
$ticket
_sla_id != 0
}
{
lappend criteria
"p.parent_id = :ticket_sla_id"
}
if
{
[
empty_string_p
$ticket
_creator_id
]
== 0 &&
$ticket
_creator_id != 0
}
{
if
{
$ticket
_creator_id eq
""
== 0 &&
$ticket
_creator_id != 0
}
{
lappend criteria
"t.ticket_id in (select object_id from acs_objects where creation_user = :ticket_creator_id)"
}
...
...
@@ -389,20 +389,20 @@ if {"" != $customer_contact_dept_code} {
if
{
!
[
empty_string_p
$customer
_id
]
&&
$customer
_id != 0
}
{
if
{
$customer
_id ne
""
&&
$customer
_id != 0
}
{
lappend criteria
"p.company_id = :customer_id"
}
if
{
!
[
empty_string_p
$customer
_contact_id
]
&&
$customer
_contact_id != 0
}
{
if
{
$customer
_contact_id ne
""
&&
$customer
_contact_id != 0
}
{
lappend criteria
"t.ticket_customer_contact_id = :customer_contact_id"
}
if
{
!
[
empty_string_p
$start
_date
]
&&
$start
_date !=
""
}
{
if
{
$start
_date ne
""
&&
$start
_date ne
""
}
{
lappend criteria
"o.creation_date >= :start_date::timestamptz"
}
if
{
!
[
empty_string_p
$end
_date
]
&&
$end
_date !=
""
}
{
if
{
$end
_date ne
""
&&
$end
_date ne
""
}
{
lappend criteria
"o.creation_date < :end_date::timestamptz"
}
if
{
!
[
empty_string_p
$ticket
_name
]
&&
$ticket
_name !=
""
}
{
if
{
$ticket
_name ne
""
&&
$ticket
_name ne
""
}
{
if
{
0 && !
[
string
isalphanum
$ticket
_name
]}
{
ad_return_complaint 1
[
lang::message::lookup
""
intranet-helpdesk.Only_alphanum_allowed
"
Only alphanumerical characters are allowed for searching for security reasons.
...
...
@@ -415,7 +415,7 @@ if {![empty_string_p $ticket_name] && $ticket_name != "" } {
set
letter
[
string
toupper
$letter
]
if
{
!
[
empty_string_p
$letter
]
&&
[
string
compare
$letter
"ALL"
]
!= 0 &&
[
string
compare
$letter
"SCROLL"
]
!= 0
}
{
if
{
$letter
ne
""
&&
$letter
ne
"ALL"
&&
$letter
ne
"SCROLL"
}
{
lappend criteria
"im_first_letter_default_to_a(p.project_name) = upper(:letter)"
}
...
...
@@ -548,10 +548,10 @@ set extra_select [join $extra_selects ",\n\t"]
set
extra_from
[
join
$extra
_froms
",
\n\t
"
]
set
extra_where
[
join
$extra
_wheres
"and
\n\t
"
]
if
{
!
[
empty_string_p
$where
_clause
]
}
{
set where_clause
" and
$where
_clause"
}
if
{
!
[
empty_string_p
$extra
_select
]
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
!
[
empty_string_p
$extra
_from
]
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
!
[
empty_string_p
$extra
_where
]
}
{
set extra_where
",
\n\t
$extra
_where"
}
if
{
$where
_clause ne
""
}
{
set where_clause
" and
$where
_clause"
}
if
{
$extra
_select ne
""
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
$extra
_from ne
""
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
$extra
_where ne
""
}
{
set extra_where
",
\n\t
$extra
_where"
}
# ---------------------------------------------------------------
...
...
@@ -649,7 +649,7 @@ eval "set sql \"$sql\""
# ad_return_complaint 1 "<pre>$sql</pre>"
if
{
[
string
equal
$letter
"ALL"
]
}
{
if
{
$letter
eq
"ALL"
}
{
# Set these limits to negative values to deactivate them
set total_in_limited -1
set how_many -1
...
...
@@ -771,7 +771,7 @@ db_foreach tickets_info_query $selection -bind $form_vars {
set ticket_status_l10n
[
lang::message::lookup
""
intranet-core.$ticket_status_key
$ticket
_status
]
# Append together a line of data based on the
"column_vars"
parameter list
set row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
set row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
foreach column_var
$column
_vars
{
append row_html
"
\t
<td valign=top>"
set cmd
"append row_html
$column
_var"
...
...
@@ -789,7 +789,7 @@ db_foreach tickets_info_query $selection -bind $form_vars {
}
# Show a reasonable message when there are no result rows:
if
{
[
empty_string_p
$table
_body_html
]
}
{
if
{
$table
_body_html eq
""
}
{
set table_body_html
"
<tr><td colspan=
$colspan
><ul><li><b>
[
lang::message::lookup
""
intranet-core.lt_There_are_currently_n
"There are currently no entries matching the selected criteria"
]
...
...
@@ -800,7 +800,7 @@ if { [empty_string_p $table_body_html] } {
if
{
$end
_idx <
$total
_in_limited
}
{
# This means that there are rows that we decided not to return
# Include a link to go to the next page
set next_start_idx
[
expr
$end
_idx + 0
]
set next_start_idx
[
expr
{
$end
_idx + 0
}
]
set next_page_url
"index?start_idx=
$next
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
"
}
else
{
set next_page_url
""
...
...
@@ -809,7 +809,7 @@ if { $end_idx < $total_in_limited } {
if
{
$start
_idx > 0
}
{
# This means we didn't start with the first row - there is
# at least 1 previous row. add a previous page link
set previous_start_idx
[
expr
$start
_idx -
$how
_many
]
set previous_start_idx
[
expr
{
$start
_idx -
$how
_many
}
]
if
{
$previous
_start_idx < 0
}
{
set previous_start_idx 0
}
set previous_page_url
"index?start_idx=
$previous
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
"
}
else
{
...
...
@@ -825,7 +825,7 @@ if { $start_idx > 0 } {
# => include a link to go to the next page
#
if
{
$total
_in_limited > 0 &&
$end
_idx <
$total
_in_limited
}
{
set next_start_idx
[
expr
$end
_idx + 0
]
set next_start_idx
[
expr
{
$end
_idx + 0
}
]
set next_page
"<a href=index?start_idx=
$next
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
>Next Page</a>"
}
else
{
set next_page
""
...
...
@@ -836,7 +836,7 @@ if {$total_in_limited > 0 && $end_idx < $total_in_limited} {
# => add a previous page link
#
if
{
$start
_idx > 0
}
{
set previous_start_idx
[
expr
$start
_idx -
$how
_many
]
set previous_start_idx
[
expr
{
$start
_idx -
$how
_many
}
]
if
{
$previous
_start_idx < 0
}
{
set previous_start_idx 0
}
set previous_page
"<a href=index?start_idx=
$previous
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
>Previous Page</a>"
}
else
{
...
...
@@ -845,8 +845,8 @@ if { $start_idx > 0 } {
# Showing "next page" and the number of tickets shown
set
start_idxpp
[
expr
$start
_idx+1
]
set
end_idx
[
expr
$start
_idx +
$how
_many
]
set
start_idxpp
[
expr
{
$start
_idx+1
}
]
set
end_idx
[
expr
{
$start
_idx +
$how
_many
}
]
if
{
$end
_idx >
$total
_in_limited
}
{
set end_idx
$total
_in_limited
}
set
viewing_msg
[
lang::message::lookup
""
intranet-helpdesk.Viewing_start_end_from_total_in_limited
"
Viewing tickets %start_idxpp% to %end_idx% from %total_in_limited%"
]
...
...
@@ -869,7 +869,7 @@ if {!$user_is_admin_p} { set ticket_action_customize_html "" }
set
table_submit_html
"
<tfoot>
<tr valign=top>
<td align=left colspan=
[
expr
$colspan-1
]
valign=top>
<td align=left colspan=
[
expr
{
$colspan-1
}
]
valign=top>
<!--
[
im_gif cleardot
]
-->
<table cellspacing=1 cellpadding=1 border=0>
<tr valign=top>
...
...
www/new-typeselect.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label"></property>
<%= [im_box_header $page_title] %>
...
...
@@ -7,7 +7,7 @@
<form action='@return_url;noquote@' method=POST>
<%= [export_vars -form {return_url ticket_id ticket_nr ticket_name}] %>
<table cellspacing=
2 cellpadding=2
>
<table cellspacing=
"2" cellpadding="2"
>
<!-- ticket sla -->
...
...
@@ -43,7 +43,7 @@
<tr class=roweven>
<td></td>
<td><input type=
submit
value='<%= [lang::message::lookup "" intranet-core.Continue "Continue"] %>'></td>
<td><input type=
"submit"
value='<%= [lang::message::lookup "" intranet-core.Continue "Continue"] %>'></td>
</tr>
</table>
...
...
www/new-typeselect.tcl
View file @
b748d456
...
...
@@ -21,13 +21,13 @@ ad_page_contract {
# No permissions necessary, that's handled by the object's new page
# Here we just select an object_type_id for the given object.
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Please_Select_Ticket_Properties
"Please select ticket properties"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
add_tickets_p
[
im_permission
$current
_user_id
"add_tickets"
]
set
ticket_sla_options
[
im_select_flatten_list
[
im_helpdesk_ticket_sla_options -customer_id
$ticket
_customer_id -include_create_sla_p 1 -include_empty_p 0
]]
set
len_ticket_sla_options
[
expr
[
llength
$ticket
_sla_options
]
/ 2
]
set
len_ticket_sla_options
[
expr
{[
llength
$ticket
_sla_options
]
/ 2
}
]
if
{
!$add_tickets_p
}
{
...
...
www/new.adp
View file @
b748d456
<if @enable_master_p@><master></if>
<property name="
title">@page_title
@</property>
<property name="context">@context;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context;
literal
@</property>
<property name="main_navbar_label">helpdesk</property>
<property name="focus">@focus;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="focus">@focus;
literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<SCRIPT Language=JavaScript src=/resources/diagram/diagram/diagram.js></SCRIPT>
@message_html;noquote@
...
...
www/new.tcl
View file @
b748d456
...
...
@@ -74,7 +74,7 @@ if {![info exists task]} {
# Security
# ------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
user_id
$current
_user_id
set
current_url
[
im_url_with_query
]
set
action_url
"/intranet-helpdesk/new"
...
...
@@ -180,7 +180,7 @@ if {0 != $escalate_from_ticket_id} {
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.New_Ticket
"New Ticket"
]
if
{
[
exists_and_not_null ticket_id
]
}
{
if
{
([
info
exists ticket_id
]
&&
$ticket
_id ne
""
)
}
{
set page_title
[
db_string title
"select project_name from im_projects where project_id = :ticket_id"
-default
""
]
}
if
{
0 !=
$escalate
_from_ticket_id
}
{
...
...
@@ -200,7 +200,7 @@ set context [list $page_title]
# We need the ticket_type_id for page title, dynfields etc.
# Check if we can deduce the ticket_type_id from ticket_id
if
{
0 ==
$ticket
_type_id ||
""
==
$ticket
_type_id
}
{
if
{
[
exists_and_not_null ticket_id
]
}
{
if
{
([
info
exists ticket_id
]
&&
$ticket
_id ne
""
)
}
{
set ticket_type_id
[
db_string ttype_id
"select ticket_type_id from im_tickets where ticket_id = :ticket_id"
-default 0
]
}
}
...
...
@@ -234,7 +234,7 @@ if {"edit" == $form_mode && ![info exists ticket_id]} {
if
{
"edit"
==
$form
_mode
}
{
set show_components_p 0
}
set
ticket_exists_p 0
if
{
[
exists_and_not_null ticket_id
]
}
{
if
{
([
info
exists ticket_id
]
&&
$ticket
_id ne
""
)
}
{
# Check if the ticket exists
set ticket_exists_p
[
db_string ticket_exists_p
"select count(*) from im_tickets where ticket_id = :ticket_id"
]
...
...
@@ -349,7 +349,7 @@ $ticket_action_customize_html
if
{
"edit"
==
$form
_mode
}
{
set redirect_p 0
# redirect if ticket_type_id is not defined
if
{(
""
==
$ticket
_type_id || 0 ==
$ticket
_type_id
)
&&
!
[
exists_and_not_null ticket_id
]
}
{
if
{(
""
==
$ticket
_type_id || 0 ==
$ticket
_type_id
)
&&
(
!
[
info
exists ticket_id
]
||
$ticket
_id eq
""
)
}
{
set all_same_p
[
im_dynfield::subtype_have_same_attributes_p -object_type
"im_ticket"
]
set all_same_p 0
if
{
!$all_same_p
}
{
...
...
@@ -358,7 +358,7 @@ if {"edit" == $form_mode} {
}
# Redirect if the SLA hasn't been defined yet
if
{(
""
==
$ticket
_sla_id || 0 ==
$ticket
_sla_id
)
&&
!
[
exists_and_not_null ticket_id
]
}
{
if
{(
""
==
$ticket
_sla_id || 0 ==
$ticket
_sla_id
)
&&
(
!
[
info
exists ticket_id
]
||
$ticket
_id eq
""
)
}
{
set redirect_p 1
}
...
...
@@ -394,7 +394,7 @@ if {$ticket_exists_p} {
# Check if we can get the ticket_customer_id.
# We need this field in order to limit the customer contacts to show.
if
{
!
[
exists_and_not_null ticket_customer_id
]
&&
[
exists_and_not_null ticket_sla_id
]
&&
"new"
!=
$ticket
_sla_id
}
{
if
{
(
!
[
info
exists ticket_customer_id
]
||
$ticket
_customer_id eq
""
)
&&
([
info
exists ticket_sla_id
]
&&
$ticket
_sla_id ne
""
)
&&
"new"
!=
$ticket
_sla_id
}
{
set ticket_customer_id
[
db_string cid
"select company_id from im_projects where project_id = :ticket_sla_id"
-default
""
]
}
...
...
@@ -496,7 +496,7 @@ if {"new" == $ticket_customer_contact_id && $user_can_create_new_customer_contac
# Form options
# ------------------------------------------------------------------
if
{
[
exists_and_not_null ticket_customer_id
]
}
{
if
{
([
info
exists ticket_customer_id
]
&&
$ticket
_customer_id ne
""
)
}
{
set customer_sla_options
[
im_helpdesk_ticket_sla_options -customer_id
$ticket
_customer_id -include_create_sla_p
$add
_projects_p
]
set customer_contact_options
[
db_list_of_lists customer_contact_options
"
select im_name_from_user_id(u.user_id) as name,
...
...
@@ -691,7 +691,7 @@ ad_form -extend -name helpdesk_ticket -on_request {
set message
""
if
{[
info
exists ticket_note
]}
{
append message
$ticket
_note
}
else
{
set ticket_note
""
}
if
{[
info
exists ticket_description
]}
{
append message
$ticket
_description
}
else
{
set ticket_description
""
}
if
{
!
[
exists_and_not_null project_name
]
}
{
set project_name
$ticket
_name
}
if
{
(
!
[
info
exists project_name
]
||
$project
_name eq
""
)
}
{
set project_name
$ticket
_name
}
set ticket_id
[
im_ticket::new
\
-ticket_sla_id
$ticket
_sla_id
\
...
...
@@ -844,7 +844,7 @@ ad_form -extend -name helpdesk_ticket -on_request {
set ticket_nr
[
string
trim
[
string
tolower
$ticket
_nr
]]
if
{
""
==
$ticket
_nr
}
{
set ticket_nr
[
im_ticket::next_ticket_nr
]
}
if
{
!
[
exists_and_not_null project_name
]
}
{
set project_name
$ticket
_name
}
if
{
(
!
[
info
exists project_name
]
||
$project
_name eq
""
)
}
{
set project_name
$ticket
_name
}
set start_date_sql
[
template::util::date get_property sql_date
$start
_date
]
set end_date_sql
[
template::util::date get_property sql_timestamp
$end
_date
]
...
...
@@ -939,7 +939,7 @@ if {$show_components_p} {
-object_id
$notification
_object_id
\
-user_id
$user
_id
]
set notification_subscribed_p
[
expr
!
[
empty_string_p
$notification
_request_id
]]
set notification_subscribed_p
[
expr
{
$notification
_request_id ne
""
}]
if
{
$notification
_subscribed_p
}
{
set notification_url
[
notification::display::unsubscribe_url -request_id
$notification
_request_id -url
$notification
_current_url
]
...
...
www/notify-stakeholders.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
...
...
@@ -16,7 +16,7 @@
<td>
<table>
<tr class=rowtitle>
<th align=
center
>
<th align=
"center"
>
<input type="checkbox" name="_dummy" onclick="acs_ListCheckAll('alerts', this.checked)" title="<%= [lang::message::lookup "" intranet-helpdesk.Check_Uncheck_all_rows "Check/Uncheck all rows"] %>" checked>
</th>
<th><%= [lang::message::lookup "" intranet-helpdesk.Name Name] %></th>
...
...
@@ -31,7 +31,7 @@
</else>
<td class="list-narrow">
<input type=
checkbox name=user_id_from_search
value="@stakeholders.user_id@" id="alerts,@user_id@" @stakeholders.checked@>
<input type=
"checkbox" name="user_id_from_search"
value="@stakeholders.user_id@" id="alerts,@user_id@" @stakeholders.checked@>
</td>
<td class="list-narrow">
<a href="@stakeholders.stakeholder_url@">@stakeholders.user_name@</a>
...
...
@@ -50,7 +50,7 @@
<td>
<%= [lang::message::lookup "" intranet-helpdesk.Subject Subject] %>
<td>
<input type=
text size=70 name=subject
value='@subject@'>
<input type=
"text" size="70" name="subject"
value='@subject@'>
</td>
</tr>
...
...
@@ -65,7 +65,7 @@
<tr>
<td> </td>
<td>
<input type=
submit name=submit
value="@send_msg@">
<input type=
"submit" name="submit"
value="@send_msg@">
</td>
</tr>
</table>
...
...
www/notify-stakeholders.tcl
View file @
b748d456
...
...
@@ -24,16 +24,16 @@ ad_page_contract {
# Defaults & Permission
# --------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Notify_Stakeholders
"Notify Stakeholders"
]
set
context_bar
[
im_context_bar
$page
_title
]
# Get the SystemUrl without trailing "/"
set
system_url
[
im_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
last_char
[
string
range
$system
_url
$sysurl
_len-1
$sysurl
_len
]
if
{
"/"
eq
$last
_char
}
{
set system_url
"
[
string
range
$system
_url 0
$sysurl
_len-2
]
"
}
set
action_name
[
im_category_from_id
$action
_id
]
...
...
www/nuke-2.adp
View file @
b748d456
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master>
<property
name=
"
title"
>
@page_title
@
</property>
<property
name=
"context"
>
@context_bar@
</property>
<property
name=
"
doc(title)"
>
@page_title;literal
@
</property>
<property
name=
"context"
>
@context_bar
;literal
@
</property>
<property
name=
"main_navbar_label"
>
projects
</property>
...
...
www/nuke-2.tcl
View file @
b748d456
...
...
@@ -17,7 +17,7 @@ ad_page_contract {
set
page_title
[
_ intranet-core.Done
]
set
context_bar
[
im_context_bar
[
list
/intranet/projects/
"
[
lang::message::lookup
""
intranet-helpdesk.Helpdesk
"Helpdesk"
]
"
]
$page
_title
]
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
im_ticket_permissions
$current
_user_id
$ticket
_id view read write admin
if
{
!$admin
}
{
...
...
www/nuke.adp
View file @
b748d456
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master>
<property
name=
"
title"
>
@page_title
@
</property>
<property
name=
"context"
>
@context_bar@
</property>
<property
name=
"
doc(title)"
>
@page_title;literal
@
</property>
<property
name=
"context"
>
@context_bar
;literal
@
</property>
<property
name=
"main_navbar_label"
>
tickets
</property>
...
...
@@ -27,7 +27,7 @@ who've flooded a site with fake crud.
<center>
<form
method=
get
action=
nuke-2
>
<input
type=
hidden
name=
ticket_id
value=
"@ticket_id@"
>
<input
type=
submit
value=
"Yes I am sure that I want to delete this @object_type@"
>
<input
type=
"hidden"
name=
"ticket_id"
value=
"@ticket_id@"
>
<input
type=
"submit"
value=
"Yes I am sure that I want to delete this @object_type@"
>
</form>
</center>
www/quote.adp
View file @
b748d456
...
...
@@ -2,11 +2,11 @@
<master src="../../intranet-core/www/master">
</if>
<property name="
title">@page_title
@</property>
<property name="context">@context;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context;
literal
@</property>
<property name="main_navbar_label">helpdesk</property>
<property name="focus">@focus;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="focus">@focus;
literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<if @message@ not nil>
<div class="general-message">@message@</div>
...
...
www/quote.tcl
View file @
b748d456
...
...
@@ -71,7 +71,7 @@ if {![info exists task]} {
# Default & Security
# ------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
current_url
[
im_url_with_query
]
set
action_url
"/intranet-helpdesk/new"
set
focus
"ticket.var_name"
...
...
www/reporting/ticket-by-customer-dept.tcl
View file @
b748d456
...
...
@@ -28,7 +28,7 @@ ad_page_contract {
# ------------------------------------------------------------
set
menu_label
"reporting_helpdesk_ticket_by_customer_dept"
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
read_p
[
db_string report_perms
"
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
...
...
@@ -36,7 +36,7 @@ set read_p [db_string report_perms "
"
-default 'f'
]
set
read_p
"t"
if
{
!
[
string
equal
"t"
$read
_p
]
}
{
if
{
"t"
ne
$read
_p
}
{
ad_return_complaint 1
"<li>
[
lang::message::lookup
""
intranet-reporting.You_dont_have_permissions
"You don't have the necessary permissions to view this page"
]
"
return
...
...
@@ -121,7 +121,7 @@ if {"" != $report_assignee_dept_id} {
)"
}
set
where_clause
[
join
$criteria
" and
\n
"
]
if
{
!
[
empty_string_p
$where
_clause
]
}
{
if
{
$where
_clause ne
""
}
{
set where_clause
" and
$where
_clause"
}
...
...
www/request-sla-2.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
<property name="sub_navbar">@ticket_navbar_html;
noquote
@</property>
<property name="sub_navbar">@ticket_navbar_html;
literal
@</property>
<h1>@page_title@</h1>
...
...
www/request-sla-2.tcl
View file @
b748d456
...
...
@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Successfully_Requested_SLA
"Successfully Requested a new SLA"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
www/request-sla.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
<property name="sub_navbar">@ticket_navbar_html;
noquote
@</property>
<property name="sub_navbar">@ticket_navbar_html;
literal
@</property>
<h1>@page_title@</h1>
...
...
@@ -22,14 +22,14 @@
<tr>
<td class="form-label"><%= [lang::message::lookup "" intranet-helpdesk.Your_Company "Your Company"] %></td>
<td class="form-widget">
<input type=
text size=40 name=company_name
>
<input type=
"text" size="40" name="company_name"
>
</td>
</tr>
<tr>
<td class="form-label"><%= [lang::message::lookup "" intranet-helpdesk.Contact_Email_Tel "Contact (Email or Tel)"] %></td>
<td class="form-widget">
<input type=
text size=40 name=contact
>
<input type=
"text" size="40" name="contact"
>
</td>
</tr>
...
...
@@ -43,7 +43,7 @@
<tr>
<td class="form-label"> </td>
<td class="form-widget">
<input type=
submit
value='<%= [lang::message::lookup "" intranet-helpdesk.Submit "Submit"] %>'>
<input type=
"submit"
value='<%= [lang::message::lookup "" intranet-helpdesk.Submit "Submit"] %>'>
</td>
</tr>
...
...
www/request-sla.tcl
View file @
b748d456
...
...
@@ -17,7 +17,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Request_SLA
"Request a Service Contract"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
www/ticket-select.adp
View file @
b748d456
<master>
<property name="
title">@page_title
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">#intranet-core.context#</property>
<property name="main_navbar_label">helpdesk</property>
<property name="sub_navbar">@ticket_navbar_html;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="sub_navbar">@ticket_navbar_html;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<SCRIPT Language=JavaScript src=/resources/diagram/diagram/diagram.js></SCRIPT>
<table cellspacing=
0 cellpadding=0 border=0
width="100%">
<table cellspacing=
"0" cellpadding="0" border="0"
width="100%">
<form action="@return_url;noquote@" method=GET>
<%= [export_vars -form {action_id return_url}] %>
<tr valign=
top
>
<tr valign=
"top"
>
<td>
<%= [im_box_header $page_title] %>
<table class=\"list\">
...
...
www/ticket-select.tcl
View file @
b748d456
...
...
@@ -33,7 +33,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-helpdesk.Select_a_base_for_the_Duplicated_Ticket
"Please Select a Base for the Duplicated Ticket"
]
set
context_bar
[
im_context_bar
$page
_title
]
set
page_focus
"im_header_form.keywords"
...
...
@@ -52,10 +52,10 @@ if {"all" == $mine_p && !$view_tickets_all_p} {
set mine_p
"queue"
}
if
{
[
empty_string_p
$how
_many
]
||
$how
_many < 1
}
{
if
{
$how
_many eq
""
||
$how
_many < 1
}
{
set how_many
[
im_parameter -package_id
[
im_package_core_id
]
NumberResultsPerPage
""
50
]
}
set
end_idx
[
expr
$start
_idx +
$how
_many
]
set
end_idx
[
expr
{
$start
_idx +
$how
_many
}
]
# ---------------------------------------------------------------
# Defined Table Fields
...
...
@@ -112,7 +112,7 @@ db_foreach column_list_sql $column_sql {
if
{
!$user_is_admin_p
}
{
set admin_link
""
}
if
{
[
string
compare
$order
_by
$column
_name
]
== 0
}
{
if
{
$order
_by eq
$column
_name
}
{
append table_header_html
"<td class=rowtitle>
$col
_txt
$admin
_link</td>
\n
"
}
else
{
append table_header_html
"<td class=rowtitle><a href=
\"
$col
_url
\"
>
$col
_txt</a>
$admin
_link</td>
\n
"
...
...
@@ -123,7 +123,7 @@ append table_header_html "</tr>\n"
# Set up colspan to be the number of headers + 1 for the # column
set
colspan
[
expr
[
llength
$column
_headers
]
+ 1
]
set
colspan
[
expr
{[
llength
$column
_headers
]
+ 1
}
]
# ---------------------------------------------------------------
# Filter with Dynamic Fields
...
...
@@ -202,25 +202,25 @@ array set extra_sql_array [im_dynfield::search_sql_criteria_from_form \
# ---------------------------------------------------------------
set
criteria
[
list
]
if
{
!
[
empty_string_p
$ticket
_status_id
]
&&
$ticket
_status_id > 0
}
{
if
{
$ticket
_status_id ne
""
&&
$ticket
_status_id > 0
}
{
lappend criteria
"t.ticket_status_id in (
[
join
[
im_sub_categories
$ticket
_status_id
]
","
]
)"
}
if
{
!
[
empty_string_p
$ticket
_type_id
]
&&
$ticket
_type_id != 0
}
{
if
{
$ticket
_type_id ne
""
&&
$ticket
_type_id != 0
}
{
lappend criteria
"t.ticket_type_id in (
[
join
[
im_sub_categories
$ticket
_type_id
]
","
]
)"
}
if
{
!
[
empty_string_p
$ticket
_queue_id
]
&&
$ticket
_queue_id != 0
}
{
if
{
$ticket
_queue_id ne
""
&&
$ticket
_queue_id != 0
}
{
lappend criteria
"t.ticket_queue_id = :ticket_queue_id"
}
if
{
0 !=
$assignee
_id &&
""
!=
$assignee
_id
}
{
lappend criteria
"t.ticket_assignee_id = :assignee_id"
}
if
{
!
[
empty_string_p
$customer
_id
]
&&
$customer
_id != 0
}
{
if
{
$customer
_id ne
""
&&
$customer
_id != 0
}
{
lappend criteria
"p.company_id = :customer_id"
}
if
{
!
[
empty_string_p
$customer
_contact_id
]
&&
$customer
_contact_id != 0
}
{
if
{
$customer
_contact_id ne
""
&&
$customer
_contact_id != 0
}
{
lappend criteria
"t.ticket_customer_contact_id = :customer_contact_id"
}
if
{
!
[
empty_string_p
$letter
]
&&
[
string
compare
$letter
"ALL"
]
!= 0 &&
[
string
compare
$letter
"SCROLL"
]
!= 0
}
{
if
{
$letter
ne
""
&&
$letter
ne
"ALL"
&&
$letter
ne
"SCROLL"
}
{
lappend criteria
"im_first_letter_default_to_a(t.ticket_name)=:letter"
}
...
...
@@ -298,10 +298,10 @@ set extra_select [join $extra_selects ",\n\t"]
set
extra_from
[
join
$extra
_froms
",
\n\t
"
]
set
extra_where
[
join
$extra
_wheres
"and
\n\t
"
]
if
{
!
[
empty_string_p
$where
_clause
]
}
{
set where_clause
" and
$where
_clause"
}
if
{
!
[
empty_string_p
$extra
_select
]
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
!
[
empty_string_p
$extra
_from
]
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
!
[
empty_string_p
$extra
_where
]
}
{
set extra_where
",
\n\t
$extra
_where"
}
if
{
$where
_clause ne
""
}
{
set where_clause
" and
$where
_clause"
}
if
{
$extra
_select ne
""
}
{
set extra_select
",
\n\t
$extra
_select"
}
if
{
$extra
_from ne
""
}
{
set extra_from
",
\n\t
$extra
_from"
}
if
{
$extra
_where ne
""
}
{
set extra_where
",
\n\t
$extra
_where"
}
# ---------------------------------------------------------------
...
...
@@ -386,7 +386,7 @@ set sql "
# 5a. Limit the SQL query to MAX rows and provide << and >>
# ---------------------------------------------------------------
if
{
[
string
equal
$letter
"ALL"
]
}
{
if
{
$letter
eq
"ALL"
}
{
# Set these limits to negative values to deactivate them
set total_in_limited -1
set how_many -1
...
...
@@ -414,7 +414,7 @@ set idx $start_idx
db_foreach tickets_info_query
$selection
-bind
$form
_vars
{
# Append together a line of data based on the
"column_vars"
parameter list
set row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
set row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
foreach column_var
$column
_vars
{
append row_html
"
\t
<td valign=top>"
set cmd
"append row_html
$column
_var"
...
...
@@ -430,7 +430,7 @@ db_foreach tickets_info_query $selection -bind $form_vars {
}
# Show a reasonable message when there are no result rows:
if
{
[
empty_string_p
$table
_body_html
]
}
{
if
{
$table
_body_html eq
""
}
{
set table_body_html
"
<tr><td colspan=
$colspan
><ul><li><b>
[
lang::message::lookup
""
intranet-core.lt_There_are_currently_n
"There are currently no entries matching the selected criteria"
]
...
...
@@ -441,7 +441,7 @@ if { [empty_string_p $table_body_html] } {
if
{
$end
_idx <
$total
_in_limited
}
{
# This means that there are rows that we decided not to return
# Include a link to go to the next page
set next_start_idx
[
expr
$end
_idx + 0
]
set next_start_idx
[
expr
{
$end
_idx + 0
}
]
set next_page_url
"index?start_idx=
$next
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
"
}
else
{
set next_page_url
""
...
...
@@ -450,7 +450,7 @@ if { $end_idx < $total_in_limited } {
if
{
$start
_idx > 0
}
{
# This means we didn't start with the first row - there is
# at least 1 previous row. add a previous page link
set previous_start_idx
[
expr
$start
_idx -
$how
_many
]
set previous_start_idx
[
expr
{
$start
_idx -
$how
_many
}
]
if
{
$previous
_start_idx < 0
}
{
set previous_start_idx 0
}
set previous_page_url
"index?start_idx=
$previous
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
"
}
else
{
...
...
@@ -466,7 +466,7 @@ if { $start_idx > 0 } {
# => include a link to go to the next page
#
if
{
$total
_in_limited > 0 &&
$end
_idx <
$total
_in_limited
}
{
set next_start_idx
[
expr
$end
_idx + 0
]
set next_start_idx
[
expr
{
$end
_idx + 0
}
]
set next_page
"<a href=index?start_idx=
$next
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
>Next Page</a>"
}
else
{
set next_page
""
...
...
@@ -477,7 +477,7 @@ if {$total_in_limited > 0 && $end_idx < $total_in_limited} {
# => add a previous page link
#
if
{
$start
_idx > 0
}
{
set previous_start_idx
[
expr
$start
_idx -
$how
_many
]
set previous_start_idx
[
expr
{
$start
_idx -
$how
_many
}
]
if
{
$previous
_start_idx < 0
}
{
set previous_start_idx 0
}
set previous_page
"<a href=index?start_idx=
$previous
_start_idx&
[
export_ns_set_vars url
[
list
start_idx
]]
>Previous Page</a>"
}
else
{
...
...
@@ -590,4 +590,4 @@ set left_navbar_html "
</div>
<hr/>
"
\ No newline at end of file
"
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