Commit acb2356e authored by Frank Bergmann's avatar Frank Bergmann

- Gustaf changes

parent 95a1568f
This diff is collapsed.
<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>
......
......@@ -25,7 +25,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set page_title [lang::message::lookup "" intranet-sla-management.SLA_Parameter "SLA Parameter"]
if {[info exists param_id]} { set page_title [lang::message::lookup "" intranet-sla-management.SLA_parameter SLA_parameter] }
set context_bar [im_context_bar $page_title]
......
<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>
......
......@@ -22,7 +22,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
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"
......
<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>
......@@ -14,13 +14,13 @@
<%= [export_vars -form {tid return_url}] %>
<table>
<tr>
<th colspan=2><%= [lang::message::lookup "" intranet-sla-management.Associate_With "Associate With"] %></th>
<th colspan="2"><%= [lang::message::lookup "" intranet-sla-management.Associate_With "Associate With"] %></th>
<th> <%= [lang::message::lookup "" intranet-sla-management.Object Object] %></th>
<th> <%= [lang::message::lookup "" intranet-sla-management.Comment Comment] %></th>
</tr>
<tr>
<td> <input type=radio name=target_object_type value=indicator checked></td>
<td> <input type="radio" name="target_object_type" value="indicator" checked></td>
<td> <%= [lang::message::lookup "" intranet-sla-management.Object_Type_Indicator "Indicator"] %></td>
<td> <%= [im_report_select -report_type_id [im_report_type_indicator] -indicator_object_type "im_sla_parameter" indicator_id] %><br>
</td>
......@@ -31,7 +31,7 @@
<tr>
<td>&nbsp;</td>
<td><input type=submit name=submit value="<%= [lang::message::lookup "" intranet-sla-management.Associate_Assoc_Action Associate] %>"></td>
<td><input type="submit" name="submit" value="<%= [lang::message::lookup "" intranet-sla-management.Associate_Assoc_Action Associate] %>"></td>
<td>&nbsp;</td>
</tr>
......
......@@ -19,7 +19,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set page_title [lang::message::lookup "" intranet-helpdesk.Associate_Param_With_Other_Object "Associate SLA Parameter With Another Object"]
set context_bar [im_context_bar $page_title]
set page_focus "im_header_form.keywords"
......
......@@ -35,7 +35,7 @@ ad_page_contract {
set menu_label "reporting-sla-resolution-time-per-support-group"
# Get the current user and make sure that he or she is logged in.
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
# Determine whether the current_user has read permissions.
set read_p [db_string report_perms "
......@@ -45,7 +45,7 @@ set read_p [db_string report_perms "
" -default 'f']
# Write out an error message if the current user doesn't have read permissions
if {![string equal "t" $read_p]} {
if {"t" ne $read_p } {
set message "You don't have the necessary permissions to view this page"
ad_return_complaint 1 "<li>$message"
ad_script_abort
......@@ -557,7 +557,7 @@ db_foreach sql $report_sql {
# a "hash", depending on the value of "counter".
# You need explicite evaluation ("expre") in TCL
# to calculate arithmetic expressions.
set class $rowclass([expr $counter % 2])
set class $rowclass([expr {$counter % 2}])
# Restrict the length of the project_name to max.
# 40 characters. (New!)
......@@ -575,11 +575,11 @@ db_foreach sql $report_sql {
# Calculated Variables (New!)
set po_per_quote_perc "undef"
if {[expr $quote_subtotal+0] != 0} {
set po_per_quote_perc [expr int(10000.0 * $po_subtotal / $quote_subtotal) / 100.0]
if {[expr {$quote_subtotal+0}] != 0} {
set po_per_quote_perc [expr {int(10000.0 * $po_subtotal / $quote_subtotal) / 100.0}]
set po_per_quote_perc "$po_per_quote_perc %"
}
set gross_profit [expr $invoice_subtotal - $bill_subtotal]
set gross_profit [expr {$invoice_subtotal - $bill_subtotal}]
set last_value_list [im_report_render_header \
-group_def $report_def \
......
......@@ -23,7 +23,7 @@ ad_page_contract {
# Security
#
set menu_label "reporting-helpdesk-sla-reaction-time"
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set read_p [db_string report_perms "
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
......@@ -33,7 +33,7 @@ set read_p [db_string report_perms "
# For testing - set manually
set read_p "t"
if {![string equal "t" $read_p]} {
if {"t" ne $read_p } {
set message "You don't have the necessary permissions to view this page"
ad_return_complaint 1 "<li>$message"
ad_script_abort
......@@ -315,7 +315,7 @@ if {0 != $ticket_type_id && "" != $ticket_type_id} {
}
set where_clause [join $criteria " and\n\t\t"]
if { ![empty_string_p $where_clause] } { set where_clause " and $where_clause" }
if { $where_clause ne "" } { set where_clause " and $where_clause" }
set report_sql "
......@@ -524,7 +524,7 @@ db_foreach sql $report_sql {
# a "hash", depending on the value of "counter".
# You need explicite evaluation ("expre") in TCL
# to calculate arithmetic expressions.
set class $rowclass([expr $counter % 2])
set class $rowclass([expr {$counter % 2}])
im_report_display_footer \
-output_format $output_format \
......@@ -584,7 +584,7 @@ im_report_display_footer \
# Calculate fields for totoal (footer0)
# which can be undefined.
set ticket_reaction_time_total_median 0.00
catch { set ticket_reaction_time_total_median [expr $ticket_reaction_time_total_sum / $ticket_reaction_time_total_count] }
catch { set ticket_reaction_time_total_median [expr {$ticket_reaction_time_total_sum / $ticket_reaction_time_total_count}] }
im_report_render_row \
-output_format $output_format \
......
......@@ -23,7 +23,7 @@ ad_page_contract {
# Security
#
set menu_label "reporting-helpdesk-sla-resolution-time"
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set read_p [db_string report_perms "
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
......@@ -33,7 +33,7 @@ set read_p [db_string report_perms "
# For testing - set manually
set read_p "t"
if {![string equal "t" $read_p]} {
if {"t" ne $read_p } {
set message "You don't have the necessary permissions to view this page"
ad_return_complaint 1 "<li>$message"
ad_script_abort
......@@ -163,7 +163,7 @@ set footer0 {
""
""
""
"\#align=right \[lc_numeric \[expr round(100.0 * \$ticket_resolution_time_total_median) / 100.0\] {} \$locale\]"
"\#align=right \[lc_numeric \[expr {round(100.0 * \$ticket_resolution_time_total_median) / 100.0}\] {} \$locale\]"
}
......@@ -183,7 +183,7 @@ set sla_footer {
""
""
""
"\#align=right [lc_numeric [expr round(100.0 * $ticket_resolution_time_sla_sum / $ticket_resolution_time_sla_count) / 100.0] {} $locale]"
"\#align=right [lc_numeric [expr {round(100.0 * $ticket_resolution_time_sla_sum / $ticket_resolution_time_sla_count) / 100.0}] {} $locale]"
}
set ticket_header {
......@@ -368,7 +368,7 @@ if {0 != $ticket_type_id && "" != $ticket_type_id} {
}
set where_clause [join $criteria " and\n\t\t"]
if { ![empty_string_p $where_clause] } { set where_clause " and $where_clause" }
if { $where_clause ne "" } { set where_clause " and $where_clause" }
set report_sql "
......@@ -576,7 +576,7 @@ db_foreach sql $report_sql {
# a "hash", depending on the value of "counter".
# You need explicite evaluation ("expre") in TCL
# to calculate arithmetic expressions.
set class $rowclass([expr $counter % 2])
set class $rowclass([expr {$counter % 2}])
im_report_display_footer \
-output_format $output_format \
......@@ -636,7 +636,7 @@ im_report_display_footer \
# Calculate fields for totoal (footer0)
# which can be undefined.
set ticket_resolution_time_total_median 0.00
catch { set ticket_resolution_time_total_median [expr $ticket_resolution_time_total_sum / $ticket_resolution_time_total_count] }
catch { set ticket_resolution_time_total_median [expr {$ticket_resolution_time_total_sum / $ticket_resolution_time_total_count}] }
im_report_render_row \
-output_format $output_format \
......
......@@ -2,17 +2,17 @@
<form action="/intranet-sla-management/service-hours-save" method=POST>
<%= [export_vars -form {return_url sla_id}] %>
<table cellspacing=0 cellpadding=0>
<table cellspacing="0" cellpadding="0">
<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>
<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 colspan="25">
<input type="submit" value="#intranet-core.Submit#">
</td>
</tr>
</table>
......
......@@ -18,7 +18,7 @@
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
if {"" == $return_url} { set return_url [im_url_with_query] }
set page_title [lang::message::lookup "" intranet-sla-management.Service_Hours "Service Hours"]
set context_bar [im_context_bar $page_title]
......@@ -61,7 +61,7 @@ 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} {
set idx [expr $day*100 + $h]
set idx [expr {$day*100 + $h}]
set hh $h
if {[string length $hh] < 2} { set hh "0$hh" }
set hh "$hh:01"
......
......@@ -20,7 +20,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set page_title [lang::message::lookup "" intranet-sla-management.Save_Service_Hours "Save Service Hours"]
set context_bar [im_context_bar $page_title]
set page_focus "im_header_form.keywords"
......@@ -64,7 +64,7 @@ foreach dow {0 1 2 3 4 5 6} {
set start_pretty $start
if {[string length $start_pretty] < 2} { set start_pretty "0$start" }
# The end time is the start of the next hour, so we have to add +1 to end
set end_pretty [expr $end + 1]
set end_pretty [expr {$end + 1}]
if {[string length $end_pretty] < 2} { set end_pretty "0$end_pretty" }
lappend service_hours [list "$start_pretty:00" "$end_pretty:00"]
......
......@@ -21,7 +21,7 @@ ad_page_contract {
# ---------------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration]
set user_id [auth::require_login]
if {"" == $param} { ad_returnredirect $return_url }
switch $action {
......
......@@ -23,7 +23,7 @@
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set add_reports_p [im_permission $current_user_id "add_reports"]
set view_reports_all_p [im_permission $current_user_id "view_reports_all"]
......@@ -149,7 +149,7 @@ set body_html ""
set old_param_id ""
set param_cnt 0
set indicator_cnt 0
set colspan [expr [llength $dynfield_attributes] + 2]
set colspan [expr {[llength $dynfield_attributes] + 2}]
# Read the results into a multirow because
# the "evaluate" needs to alloc an additional DB connection
......@@ -190,7 +190,7 @@ template::multirow foreach param_indicators {
}
# if {[regexp {^([0-9]*)\.([0-9][0-9])} $result match body fraction]} { set result "$body.$fraction" }
if {[string is double $result]} { set result [expr round(100.0 * $result) / 100.0] }
if {[string is double $result]} { set result [expr {round(100.0 * $result) / 100.0}] }
set diagram_html [im_indicator_horizontal_bar \
-name $report_name \
......@@ -220,7 +220,7 @@ template::multirow foreach param_indicators {
if {!$add_reports_p} { set edit_html "" }
set row_html ""
append row_html "<tr $bgcolor([expr $indicator_cnt % 2])>\n"
append row_html "<tr $bgcolor([expr {$indicator_cnt % 2}])>\n"
append row_html "<td>&nbsp;</td>\n"
# append row_html "<td><input type=checkbox name=indicator value=$indicator_id></input></td>\n"
set indicator_url [export_vars -base "/intranet-reporting-indicators/view" {indicator_id}]
......
......@@ -23,7 +23,7 @@ if {![info exists object_id]} {
# This portlet only makes sense in SLAs...
if {![info exists return_url] || "" == $return_url} { set return_url [im_url_with_query] }
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set new_sla_parameter_url [export_vars -base "/intranet-sla-management/new" {object_id return_url}]
# Check the permissions
......
......@@ -23,7 +23,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set sla_id $project_id
im_project_permissions $current_user_id $project_id sla_view sla_read sla_write sla_admin
......
......@@ -18,7 +18,7 @@
<td><%= [im_category_select "Intranet Ticket Status" ticket_severity_id ""] %></td>
<td><%= [im_category_select "Intranet Ticket Priority" ticket_prio_id ""] %></td>
</tr>
<tr><td colspan=3><input type=submit value='@create_new_entry_msg@'></td></tr>
<tr><td colspan="3"><input type="submit" value='@create_new_entry_msg@'></td></tr>
</table>
</form>
......
......@@ -18,7 +18,7 @@
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
if {"" == $return_url} { set return_url [im_url_with_query] }
set page_title [lang::message::lookup "" intranet-sla-management.Ticket_Priority "Ticket Priority"]
set context_bar [im_context_bar $page_title]
......
......@@ -21,7 +21,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
set current_user_id [auth::require_login]
set sla_id $project_id
im_project_permissions $current_user_id $project_id sla_view sla_read sla_write sla_admin
......
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