[Rt-commit] r17076 - in rtir/2.4/trunk/html/RTIR: Search/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Tue Dec 2 23:53:20 EST 2008
Author: ruz
Date: Tue Dec 2 23:53:19 2008
New Revision: 17076
Modified:
rtir/2.4/trunk/html/RTIR/Incident/LinkToIncident.html
rtir/2.4/trunk/html/RTIR/Search/Elements/RefineTabs
Log:
* add 'Results' subtab to appendable tabs like Link Incident, Link Children...
* allow to add subtabs next to Results and Refine
* add subtab 'New Incident' for 'Link to an Incident from a child' action
so people can jump away if they can not find suitable incident
Modified: rtir/2.4/trunk/html/RTIR/Incident/LinkToIncident.html
==============================================================================
--- rtir/2.4/trunk/html/RTIR/Incident/LinkToIncident.html (original)
+++ rtir/2.4/trunk/html/RTIR/Incident/LinkToIncident.html Tue Dec 2 23:53:19 2008
@@ -36,6 +36,12 @@
current_tab => $current_tab,
current_subtab => "RTIR/Search/Refine.html",
+ subtabs => {
+ _z => {
+ title => loc('New Incident'),
+ path => "RTIR/Create.html?Child=$id&Queue=Incidents",
+ },
+ },
&>
% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $ChildObj);
Modified: rtir/2.4/trunk/html/RTIR/Search/Elements/RefineTabs
==============================================================================
--- rtir/2.4/trunk/html/RTIR/Search/Elements/RefineTabs (original)
+++ rtir/2.4/trunk/html/RTIR/Search/Elements/RefineTabs Tue Dec 2 23:53:19 2008
@@ -2,9 +2,8 @@
%ARGS,
current_tab => $current_tab,
appendtabs => $appendtabs,
- subtabs => $subtabs,
+ subtabs => $subtabs_in_parent,
current_subtab => $current_subtab,
-
&>
<%INIT>
@@ -73,7 +72,7 @@
my ($current_tab_base, $current_tab_args) = split /\?/, $current_tab, 2;
-my ($appendtabs, $subtabs);
+my ($appendtabs, $subtabs_in_parent);
if ( $appendable_tab{ $current_tab_base } ) {
# append tab and add refine subtab if needed
my $path = $current_tab;
@@ -88,12 +87,18 @@
};
if ( $current_subtab ) {
- $appendtabs->{'_I'}->{'current_subtab'} = $refine_path if $current_subtab_active;
+ $appendtabs->{'_I'}->{'current_subtab'}
+ = $current_subtab_active? $refine_path : $path;
$appendtabs->{'_I'}->{'subtabs'} = {
+ %$subtabs,
_a => {
- path => $refine_path,
+ path => $path,
+ title => loc('Results'),
+ },
+ _b => {
+ path => $refine_path,
title => loc('Refine'),
- }
+ },
};
}
$current_subtab = $path;
@@ -107,12 +112,14 @@
}
if ( $current_subtab ) {
# XXX: there is no way to mark refine subtab active
-# $subtabs->{'current_subtab'} = $refine_path if $current_subtab_active;
- $subtabs->{'_a'} = {
+# $subtabs_in_parent->{'current_subtab'} = $refine_path
+# if $current_subtab_active;
+
+ $subtabs_in_parent->{'_a'} = {
path => $path,
title => loc('Results'),
};
- $subtabs->{'_b'} = {
+ $subtabs_in_parent->{'_b'} = {
path => $refine_path,
title => loc('Refine'),
};
@@ -142,5 +149,6 @@
$current_tab => undef
$current_subtab => undef
+$subtabs => {}
$current_subtab_active => 0
</%ARGS>
More information about the Rt-commit
mailing list