[Rt-commit] r4608 - in rtfm/branches/2.1-TESTING: .
html/RTFM/Article
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Mar 1 05:03:34 EST 2006
Author: alexmv
Date: Wed Mar 1 05:03:30 2006
New Revision: 4608
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchCriteria
rtfm/branches/2.1-TESTING/html/RTFM/Article/PreCreate.html
rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
Log:
r9381 at zoq-fot-pik: chmrr | 2006-03-01 05:03:16 -0500
* Fix table and HTML layout in search
* Article creation can have a next= to redirect after creation
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html Wed Mar 1 05:03:30 2006
@@ -29,6 +29,7 @@
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="Edit.html" name="EditArticle" id="EditArticle" enctype="multipart/form-data">
+<input type="hidden" name="next" value="<%$ARGS{next}%>" />
<input type="hidden" name="id" value="<%$id%>"/>
<table width="100%">
<tr><td><h2><&|/l&>Basics</&></h2>
@@ -131,14 +132,15 @@
);
push( @results, $msg );
if ($id) {
- my @cf_results = ProcessObjectCustomFieldUpdates(
- Object => $ArticleObj,
- ARGSRef => \%ARGS
- );
- @results = ( @results, @cf_results );
+ my @cf_results = ProcessObjectCustomFieldUpdates(
+ Object => $ArticleObj,
+ ARGSRef => \%ARGS
+ );
+ @results = ( @results, @cf_results );
$title = loc( 'Modify article #[_1]', $ArticleObj->Id );
delete $ARGS{id};
+ $m->redirect($ARGS{next}) if $ARGS{next};
}
else {
$ClassObj->Load($Class);
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchCriteria
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchCriteria (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchCriteria Wed Mar 1 05:03:30 2006
@@ -16,40 +16,40 @@
%#
%# END LICENSE BLOCK
-% if ($ARGS{'HideOptions'} == 1) {
-% my $qs = $ENV{'QUERY_STRING'};
-% $qs =~ s/HideOptions=1//gi;
-<a href="Search.html?<%$qs%>"><&|/l&>Show advanced search options...</&></a>
-% } else {
-<& /Elements/TitleBoxStart, title => loc('Advanced search')&>
+% if ($ARGS{'HideOptions') {
+<& /Elements/TitleBoxStart, title => loc('Advanced search'), class => "rolled-up", bodyclass => "hidden" &>
+% } else {
+<& /Elements/TitleBoxStart, title => loc('Advanced search') &>
+% }
<table>
-<tr><td class="label">
+<tr><td class="label" colspan="2">
<h2><&|/l&>Basics</&></h2>
</td></tr>
-<td class="label"><&|/l&>Class</&></td><td class="value">
+<tr><td class="label"><&|/l&>Class</&></td><td class="value">
is <& /RTFM/Elements/SelectClass, Name => 'Class', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class'} &>
<&|/l&>and not</&>
<& /RTFM/Elements/SelectClass, Name => 'Class!', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class!'} &>
</td></tr>
-<td class="label"><&|/l&>Name</&></td><td class="value">
+<tr><td class="label"><&|/l&>Name</&></td><td class="value">
<&|/l&>matches</&> <input name="Name~" value="<%$ARGS{'Name~'}%>">
<&|/l&>and not</&>
<input name="Name!~" value="<%$ARGS{'Name!~'}%>">
</td></tr>
-<td class="label">
+
+<tr><td class="label">
<&|/l&>Summary</&></td><td class="value">
<&|/l&>matches</&>
<input name="Summary~" value="<%$ARGS{'Summary~'}%>">
<&|/l&>and not</&>
<input name="Summary!~" value="<%$ARGS{'Summary!~'}%>">
</td></tr>
-<tr><td class="label">
+<tr><td class="label" colspan="2">
<h2><&|/l&>Content</&></h2>
</td></tr>
-<td class="label"><&|/l&>Any field</&></td><td class="value">
+<tr><td class="label"><&|/l&>Any field</&></td><td class="value">
<&|/l&>matches</&>
<input name="Article~" value="<%$ARGS{'Article~'}%>">
<&|/l&>and not</&>
@@ -57,8 +57,7 @@
</td></tr>
% while (my $field = $customfields->Next ) {
-
-<td class="label">
+<tr><td class="label">
<% $field->Name %>
</td><td class="value">
<&|/l&>matches</&>
@@ -76,17 +75,17 @@
&>
</td></tr>
% }
-<tr><td class="label">
+<tr><td class="label" colspan="2">
<h2><&|/l&>Dates</&></h2>
</td></tr>
-<td class="label"><&|/l&>Created</&></td><td class="value"><&|/l&>after</&>
+<tr><td class="label"><&|/l&>Created</&></td><td class="value"><&|/l&>after</&>
<& /Elements/SelectDate, Name=>"Created>", Default => ($dates->{'Created>'} ? $dates->{'Created>'}->ISO : '') &>
<&|/l&>and before</&>
<& /Elements/SelectDate, Name=>"Created<", Default => ($dates->{'Created<'} ? $dates->{'Created<'}->ISO:'')&>
-
</td></tr>
-<td class="label"><&|/l&>Last updated</&></td><td class="value"><&|/l&>after</&>
+
+<tr><td class="label"><&|/l&>Last updated</&></td><td class="value"><&|/l&>after</&>
<& /Elements/SelectDate, Name=>"LastUpdated>", Default =>
($dates->{'LastUpdated>'} ? $dates->{'LastUpdated>'}->AsString:'')&>
<&|/l&>and before</&>
@@ -94,20 +93,20 @@
($dates->{'LastUpdated<'} ? $dates->{'LastUpdated<'}->AsString:'')&>
</td></tr>
-<tr><td class="label">
+<tr><td class="label" colspan="2">
<h2><&|/l&>Links</&></h2>
</td></tr>
<tr><td class="label"></td><td>
<& LinkEntryInstructions &>
</td></tr>
-<td class="label"><&|/l&>Refer to</&></td><td class="value">
+<tr><td class="label"><&|/l&>Refer to</&></td><td class="value">
<input type=text size=50 name="RefersTo" value="<%$RefersTo%>">
</td></tr>
<td class="label"><&|/l&>Referred to by</&></td><td class="value">
<input type=text size=50 name="ReferredToBy" value="<%$ReferredToBy%>">
</td></tr>
-<tr><td class="label">
+<tr><td class="label" colspan="2">
<h2><&|/l&>Topics</&></h2>
</td></tr>
<tr><td class="label"></td><td>
@@ -115,9 +114,10 @@
<br /><input type="checkbox" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
<&|/l&>Include subtopics</&>
</td></tr>
+</table>
+
<& /Elements/Submit, Label => loc('Search') &>
<&/Elements/TitleBoxEnd&>
-% }
<%init>
my @Classes =
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/PreCreate.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/PreCreate.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/PreCreate.html Wed Mar 1 05:03:30 2006
@@ -22,7 +22,8 @@
% my $Classes = RT::FM::ClassCollection->new($session{'CurrentUser'});
% $Classes->LimitToEnabled();
% while (my $Class = $Classes->Next) {
-<li><a href="Edit.html?Class=<%$Class->Id%>"><&|/l, $Class->Name&>in class [_1]</&></a></li>
+% my $qs = $m->comp("/Elements/QueryString", %ARGS, Class=> $Class->Id);
+<li><a href="Edit.html?<% $qs|n %>"><&|/l, $Class->Name&>in class [_1]</&></a></li>
% }
</ul>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html Wed Mar 1 05:03:30 2006
@@ -52,7 +52,7 @@
<br />
<br />
<br />
-<a name="criteria" />
+<a name="criteria"></a>
<form action="Search.html" method="GET">
<& Elements/ShowSearchCriteria, dates => \%dates, RefersTo => $RefersTo, customfields => $customfields, ReferredToBy => $ReferredToBy, %ARGS &>
<br />
@@ -458,8 +458,6 @@
my $QueryString = "?".$m->comp('/Elements/QueryString', %filtered);
</%init>
-
-</%init>
<%ARGS>
$CreatedBefore => ''
$CreatedAfter => ''
More information about the Rt-commit
mailing list