Commit 26a337fc authored by Frank Bergmann's avatar Frank Bergmann

- removed backup files from CVS

parent e1c358ab
<if @sla_read@>
<form action="/intranet-sla-management/indicator-save" method=POST>
<table cellspacing=1 cellpadding=1>
<tr class=rowtitle>
<td class=rowtitle><%= [lang::message::lookup "" intranet-sla-management.Day "Day"] %></td>
<multiple name=hours>
<td class=rowtitle align=center>@hours.hour@</td>
</multiple>
</tr>
@body_html;noquote@
<tr>
<td colspan=25>
<input type=submit value=#intranet-core.Submit#>
</td>
</tr>
</table>
</form>
</if>
# /packages/intranet-sla-management/www/service-hours-component.tcl
#
# Copyright (c) 2010 ]project-open[
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
#
# Shows business hours for the specified SLA.
# ---------------------------------------------------------------
# Variables
# ---------------------------------------------------------------
# { project_id:integer "" }
# return_url
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
if {"" == $return_url} { set return_url [ad_conn url] }
set page_title [lang::message::lookup "" intranet-sla-management.Service_Hours "Service Hours"]
set context_bar [im_context_bar $page_title]
set context ""
im_project_permissions $current_user_id $project_id sla_view sla_read sla_write sla_admin
# sla_read checked in the .adp file
# ---------------------------------------------------------------
# List of weekdays
set dow_list [list]
lappend dow_list [lang::message::lookup "" intranet-core.Sunday Sunday]
lappend dow_list [lang::message::lookup "" intranet-core.Monday Monday]
lappend dow_list [lang::message::lookup "" intranet-core.Tuesday Tuesday]
lappend dow_list [lang::message::lookup "" intranet-core.Wednesday Wednesday]
lappend dow_list [lang::message::lookup "" intranet-core.Thursday Thursday]
lappend dow_list [lang::message::lookup "" intranet-core.Friday Friday]
lappend dow_list [lang::message::lookup "" intranet-core.Saturday Saturday]
# Create the header for the table
multirow create hours hour
for {set h 0} {$h < 24} {incr h} {
set h_string $h
if {[string length $h_string] < 2} { set h_string "0$h_string" }
multirow append hours $h_string
}
# Create the table body
set body_html ""
for {set day 0} {$day < 7} {incr day} {
set line_html "<tr>\n"
append line_html "<td>[lindex $dow_list $day]</td>\n"
for {set h 0} {$h < 24} {incr h} {
append line_html "<td align=center><input type=checkbox checked></td>\n"
}
append line_html "</tr>\n"
append body_html $line_html
}
# /packages/intranet-sla-management/www/associate-2.tcl
#
# Copyright (C) 2010 ]project-open[
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
ad_page_contract {
Associate the ticket_ids in "tid" with one of the specified objects.
target_object_type specifies the type of object to associate with and
determines which parameters are used.
@author frank.bergmann@project-open.com
} {
{ tid ""}
{ target_object_type "" }
{ action_name "" }
{ indicator_id "" }
{ return_url "/intranet-sla-management/index" }
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set page_title [lang::message::lookup "" intranet-sla-management.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"
set action_forbidden_msg [lang::message::lookup "" intranet-sla-management.Action_Forbidden "<b>Unable to execute action</b>:<br>You don't have the permissions to execute the action '%action_name%' on this ticket."]
# Check that the user has write permissions on all select tickets
set first_param_id [lindex $tid 0]
set sla_id [db_string param_sla "select param_sla_id from im_sla_parameters where param_id = :first_param_id" -default ""]
im_project_permissions $current_user_id $sla_id view read write admin
if {!$write} { ad_return_complaint 1 $action_forbidden_msg }
foreach t $tid {
# Check that t is an integer
im_security_alert_check_integer -location "Helpdesk: Associate" -value $t
}
# ---------------------------------------------------------------
#
# ---------------------------------------------------------------
switch $target_object_type {
indicator {
foreach t $tid {
# Create a new relationship connecting the indicator with the parameter
set rel_id [db_string new_rel "select im_sla_param_indicator_rel__new(null, 'im_sla_param_indicator_rel', :t, :indicator_id, null, :current_user_id, '[ns_conn peeraddr]', 0)"]
}
}
default {
ad_return_complaint 1 [lang::message::lookup "" intranet-sla-management.Unknown_target_object_type "Unknown object type %target_object_type%"]
}
}
ad_returnredirect $return_url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment