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
c9b948f4
Commit
c9b948f4
authored
Nov 25, 2008
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added related tickets component
parent
a96e94b2
Pipeline
#294
failed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
69 deletions
+79
-69
intranet-helpdesk-create.sql
sql/postgresql/intranet-helpdesk-create.sql
+27
-0
intranet-helpdesk-procs.tcl
tcl/intranet-helpdesk-procs.tcl
+22
-0
index.adp
www/index.adp
+0
-58
related-tickets-component.tcl
www/related-tickets-component.tcl
+30
-11
No files found.
sql/postgresql/intranet-helpdesk-create.sql
View file @
c9b948f4
...
...
@@ -1079,6 +1079,33 @@ SELECT acs_permission__grant_permission(
-- ------------------------------------------------------
-- Show related tickets
--
SELECT
im_component_plugin__new
(
null
,
-- plugin_id
'acs_object'
,
-- object_type
now
(),
-- creation_date
null
,
-- creation_user
null
,
-- creation_ip
null
,
-- context_id
'Related Tickets'
,
-- plugin_name
'intranet-helpdesk'
,
-- package_name
'right'
,
-- location
'/intranet-helpdesk/new'
,
-- page_url
null
,
-- view_name
90
,
-- sort_order
'im_helpdesk_related_tickets_component -ticket_id $ticket_id'
,
'lang::message::lookup "" intranet-helpdesk.Related_Tickets "Related Tickets"'
);
SELECT
acs_permission__grant_permission
(
(
select
plugin_id
from
im_component_plugins
where
plugin_name
=
'Related Tickets'
and
package_name
=
'intranet-helpdesk'
),
(
select
group_id
from
groups
where
group_name
=
'Employees'
),
'read'
);
-----------------------------------------------------------
-- Menu for Helpdesk
--
...
...
tcl/intranet-helpdesk-procs.tcl
View file @
c9b948f4
...
...
@@ -661,3 +661,25 @@ ad_proc -public im_navbar_tree_helpdesk_incident_mgmt { } { Incident Management}
return
$html
}
# ---------------------------------------------------------------
# Component showing referenced tickets
# ---------------------------------------------------------------
ad_proc -public im_helpdesk_related_tickets_component
{
-ticket_id:required
}
{
Returns a HTML component with the list of related tickets.
}
{
set params
[
list
\
[
list
base_url
"/intranet-helpdesk/"
]
\
[
list
ticket_id
$ticket
_id
]
\
[
list
return_url
[
im_url_with_query
]]
\
]
set result
[
ad_parse_template -params
$params
"/packages/intranet-helpdesk/www/related-tickets-component"
]
return
[
string
trim
$result
]
}
www/index.adp
View file @
c9b948f4
...
...
@@ -64,63 +64,5 @@
</form>
</table>
</div>
<a id="sideBarTab" href="#"><img id="sideBarTabImage" border="0" title="sideBar" alt="sideBar" src="/intranet/images/navbar_saltnpepper/slide-button-active.gif"/></a>
<div class="filter" id="sidebar">
<div id="sideBarContentsInner">
<div class="filter-block">
<div class="filter-title">
<%= [lang::message::lookup "" intranet-core.Filter_Tickets "Filter Tickets"] %>
</div>
<formtemplate id="ticket_filter"></formtemplate>
</div>
<hr/>
<div class="filter-block">
<div class="filter-title">
<%= [lang::message::lookup "" intranet-core.New_Ticket "New Ticket"] %>
</div>
<formtemplate id="ticket_new"></formtemplate>
</div>
<hr/>
<div class="filter-block">
<div class="filter-title">
<%= [lang::message::lookup "" intranet-core.Admin_Tickets "Admin Tickets"] %>
</div>
@admin_html;noquote@
</div>
<hr/>
<%= [im_navbar_tree -label "main"] %>
</div>
</div>
<div class="fullwidth-list" id="fullwidth-list">
<table cellspacing=0 cellpadding=0 border=0 width="100%">
<tr valign=top>
<td>
<%= [im_box_header $page_title] %>
<table class=\"list\">
<%= $table_header_html %>
<%= $table_body_html %>
<%= $table_continuation_html %>
</table>
<%= [im_box_footer] %>
</td>
<td width="<%= $dashboard_column_width %>">
<%= $dashboard_column_html %>
</td>
</tr>
</table>
</div>
</div>
www/related-tickets-component.tcl
View file @
c9b948f4
...
...
@@ -27,7 +27,10 @@ set current_user_id [ad_maybe_redirect_for_registration]
set
bulk_action_list
{}
lappend
bulk_actions_list
"
[
lang::message::lookup
""
intranet-helpdesk.Delete
"Delete"
]
"
"ticket-ticket-rel-del"
"
[
lang::message::lookup
""
intranet-helpdesk.Remove_checked_items
"Remove Checked Items"
]
"
set
assoc_incident_ticket
[
lang::message::lookup
{}
intranet-helpdesk.Assoc_to_new_incident_ticket
{
Associate with a new incident ticket
}]
set
assoc_msg
[
lang::message::lookup
{}
intranet-helpdesk.Assoc_to_new_incident_ticket
{
Associate with a new incident ticket
}]
set
actions
[
list
$assoc
_msg
"/intranet-helpdesk/new?ticket_id=
$ticket
_id"
""
]
set
actions
[
list
]
list::create
\
-name tickets
\
...
...
@@ -37,11 +40,7 @@ list::create \
-has_checkboxes
\
-bulk_actions
$bulk
_actions_list
\
-bulk_action_export_vars
{
return_url
}
\
-actions
[
list
\
"
$assoc
_incident_ticket"
\
"/intranet-helpdesk/new?ticket_id=
$ticket
_id"
\
""
\
]
\
-actions
$actions
\
-elements
{
ticket_chk
{
label
"<input type=
\"
checkbox
\"
...
...
@@ -52,6 +51,9 @@ list::create \
@tickets_multirow.ticket_chk
;
noquote@
}
}
direction_pretty
{
label
"
[
lang::message::lookup
{}
intranet-helpdesk.Dir
{
}]
"
}
project_nr
{
label
"
[
lang::message::lookup
{}
intranet-helpdesk.Ticket_Nr
{
Nr
}]
"
link_url_eval
{[
export_vars -base
"/intranet-helpdesk/new"
{
ticket_id
}]}
...
...
@@ -60,15 +62,24 @@ list::create \
label
"
[
lang::message::lookup
{}
intranet-helpdesk.Ticket_Name
{
Ticket Name
}]
"
link_url_eval
{[
export_vars -base
"/intranet-helpdesk/new"
{
ticket_id
}]}
}
ticket_type
{
label
"
[
lang::message::lookup
{}
intranet-helpdesk.Type
{
Type
}]
"
}
}
set
tickets_sql
"
select
t.*,
im_category_from_id(t.ticket_type_id) as ticket_type,
p.*,
r.rel_id
from im_tickets t,
r.rel_id,
CASE WHEN r.object_id_one = :ticket_id THEN 'incoming'
WHEN r.object_id_two = :ticket_id THEN 'outgoing'
ELSE ''
END as direction
from
im_tickets t,
im_projects p,
acs_rels r
where
...
...
@@ -80,14 +91,22 @@ set tickets_sql "
r.object_id_one = t.ticket_id and
r.object_id_two = :ticket_id
)
order by
direction
"
db_multirow -extend
{
ticket_chk ticket_url
}
tickets_multirow tickets
$tickets
_sql
{
db_multirow -extend
{
ticket_chk ticket_url
direction_pretty
}
tickets_multirow tickets
$tickets
_sql
{
set ticket_url
""
set ticket_chk
"<input type=
\"
checkbox
\"
name=
\"
rel_id
\"
value=
\"
$rel
_id
\"
id=
\"
tickets_list,
$rel
_id
\"
>"
id=
\"
tickets_list,
$rel
_id
\"
>
"
switch
$direction
{
incoming
{
set direction_pretty
" -> "
}
outgoing
{
set direction_pretty
" <- "
}
default
{
set direction_pretty
""
}
}
}
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