[Rt-commit] r3151 - in rtfm/branches/2.1-TESTING: . html/RTFM
html/RTFM/Article html/RTFM/Article/Elements
jesse at bestpractical.com
jesse at bestpractical.com
Tue Jun 14 14:37:23 EDT 2005
Author: jesse
Date: Tue Jun 14 14:37:06 2005
New Revision: 3151
Removed:
rtfm/branches/2.1-TESTING/html/RTFM/Article/Create.html
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/html/RTFM/Article/Display.html
rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditBasics
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditCustomFields
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditLinks
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowLinks
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSavedSearches
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchCriteria
rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchResults
rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
Log:
r20061 at hualien: jesse | 2005-06-14 14:18:25 -0400
* Fairly extensive HTML tweak to the user-side view of RTFM
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Display.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Display.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Display.html Tue Jun 14 14:37:06 2005
@@ -20,14 +20,18 @@
id => $id,
Title => $title,
current_subtab => 'RTFM/Article/Display.html?id='.$id &>
-<& Elements/ShowTopics, article => $article &>
-
+<h2><&|/l&>Basics</&></h2>
+<&|/l&>Class</&>: <%$article->ClassObj->Name%><br/>
<emp><%$article->Summary%></emp>
-<br><br><br>
+<h2><&|/l&>Content</&></h2>
<& /Elements/ShowCustomFields, Object => $article &>
-<br>
-<br>
+
+
+<h2><&|/l&>Links</&></h2>
<& Elements/ShowLinks, article => $article &>
+
+<h2><&|/l&>Topics</&></h2>
+<& Elements/ShowTopics, article => $article &>
<%init>
my $article = RT::FM::Article->new( $session{'CurrentUser'} );
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 Tue Jun 14 14:37:06 2005
@@ -27,34 +27,45 @@
Title => loc('Create a new article') &>
% }
<& /Elements/ListActions, actions => \@results &>
-
+<table width="100%">
<FORM METHOD=POST ACTION="Edit.html" name="EditArticle" id="EditArticle" enctype="multipart/form-data">
<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id%>"/>
-
+<tr><td><&|/l&>Basics</&>
+</td><td></td></tr>
<& Elements/EditBasics, ArticleObj => $ArticleObj,
EditClass =>$EditClass,
ClassObj => $ClassObj,
- id => $id,
- %ARGS &>
+ %ARGS ,
+ id => $id
+ &>
+<tr><td><&|/l&>Content</&>
+</td><td></td></tr>
<& Elements/EditCustomFields, ArticleObj => $ArticleObj,
CFContent => \%CFContent,
ClassObj => $ClassObj,
+ %ARGS,
id =>$id,
- %ARGS &>
+ &>
+<tr><td><&|/l&>Links</&>
+</td><td></td></tr>
+<& Elements/EditLinks, ArticleObj => $ArticleObj,
+ %ARGS,
+ id => $id
+ &>
+<tr><td><&|/l&>Topics</&>
+</td><td></td></tr>
<& Elements/EditTopics, ArticleObj => $ArticleObj,
ClassObj => $ArticleObj->Id ? $ArticleObj->ClassObj : $ClassObj,
OnlyThisClass => 1,
- %ARGS &>
-<& Elements/EditLinks, ArticleObj => $ArticleObj,
- id => $id,
- %ARGS &>
+ %ARGS,
+ id =>$id
+ &>
-<& /Elements/Submit, Label => loc('Save Changes'),
- Caption => loc("If you've updated anything above, be sure to"),
- color => "#993333" &>
+<& /Elements/Submit, Label => ($id eq 'new' ? loc('Create') : loc('Save Changes')), color => "#993333" &>
</form>
+</table>
<%INIT>
if ( exists $ARGS{'Topics'} ) {
@@ -110,14 +121,14 @@
Topics => $ARGS{'Topics'},
%create_args
);
+ push( @results, $msg );
+ if ($id) {
my @cf_results = ProcessObjectCustomFieldUpdates(
Object => $ArticleObj,
ARGSRef => \%ARGS
);
@results = ( @results, @cf_results );
- push( @results, $msg );
- if ($id) {
$title = loc( 'Modify article #[_1]', $ArticleObj->Id );
delete $ARGS{id};
}
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditBasics
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditBasics (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditBasics Tue Jun 14 14:37:06 2005
@@ -16,9 +16,8 @@
%#
%# END LICENSE BLOCK
-<TABLE>
<TR>
-<TD>
+<TD class="label">
<&|/l&>Name</&>
</td>
<td>
@@ -26,7 +25,7 @@
</TD>
</TR>
<TR>
-<TD>
+<TD class="label">
<&|/l&>Summary</&>
</td>
<td>
@@ -34,7 +33,7 @@
</TD>
</TR>
<TR>
-<TD>
+<TD class="label">
<&|/l&>Class</&>
</TD>
<TD>
@@ -46,7 +45,6 @@
% }
</TD>
</TR>
-</TABLE>
<%INIT>
</%INIT>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditCustomFields
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditCustomFields (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditCustomFields Tue Jun 14 14:37:06 2005
@@ -16,7 +16,6 @@
%#
%# END LICENSE BLOCK
-<table>
% while (my $CustomField = $CustomFields->Next()) {
<tr>
<td class="labeltop">
@@ -27,13 +26,16 @@
Object => $ArticleObj,
CustomField => $CustomField,
NamePrefix => $NamePrefix,
- Default => $CFContent->{$CustomField->Id},
+ Default =>
+ ($CFContent->{$CustomField->Id} ||
+ $ARGS{$NamePrefix .$CustomField->id .'-Values'} ||
+ $ARGS{$NamePrefix .$CustomField->id .'-Value'})
+ ,
Rows => 15,
Cols => 70
&></td>
</tr>
% }
-</table>
<%INIT>
my $CustomFields;
my $NamePrefix;
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditLinks
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditLinks (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditLinks Tue Jun 14 14:37:06 2005
@@ -15,13 +15,16 @@
%# GNU General Public License for more details.
%#
%# END LICENSE BLOCK
-
-<TABLE>
-<TD VALIGN=TOP>
-<i><&|/l&>Enter articles, tickets, or other URIs to link this article to. Articles may be specified as "a:###" and tickets may be specified as "t:###", where ### represents the ID of the article or ticket. Separate multiple entries with spaces.</&></i><br>
+<tr><td class="label"></td>
+<td class="value">
+<i><&|/l&>Enter articles, tickets, or other URLs related to this article.</&>
+<& LinkEntryInstructions &>
+% unless ($id eq 'new') {
<i><&|/l&>(Check boxes to delete)</&></i><br>
-<TABLE>
-<TR><TD><&|/l&>Refers to</&>:</TD><TD><input name="<%$id%>-RefersTo" value="<%$ARGS{$id.'-RefersTo'}%>"><br>
+% }
+</td>
+</tr>
+<TR><TD class="label"><&|/l&>Refers to</&>:</TD><TD><input name="<%$id%>-RefersTo" value="<%$ARGS{$id.'-RefersTo'}%>"><br>
<UL>
% if ($id ne 'new') {
% my $refersto = $ArticleObj->RefersTo;
@@ -44,7 +47,7 @@
% }
</UL>
</TD></TR>
-<TR><TD><&|/l&>Referred to by</&>:</TD><TD> <input name="RefersTo-<%$id%>" value="<%$ARGS{'RefersTo-'.$id}%>">
+<TR><TD class="label"><&|/l&>Referred to by</&>:</TD><TD> <input name="RefersTo-<%$id%>" value="<%$ARGS{'RefersTo-'.$id}%>">
<br>
<UL>
% if ($id ne 'new') {
@@ -67,13 +70,7 @@
% }
% }
</UL>
-
-
</TD></TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics Tue Jun 14 14:37:06 2005
@@ -17,41 +17,40 @@
%# END LICENSE BLOCK
% if ($ClassObj->Id) {
-<table>
<tr>
-<td>Topics in this class:</td>
+<td class="label"><&|/l&>Topics</&></td>
<td>
% }
<input type="hidden" name="EditTopics" value="1" />
<select multiple size="<% $rows > 10 ? 10 : $rows %>" name="Topics">
-% if ($ClassObj->Id) {
-% $m->print("<optgroup label=\"Current class (".$ClassObj->Name.")\">")
-% unless $OnlyThisClass;
-% $inTree->traverse(sub {
-% my $tree = shift;
-% my $topic = $tree->getNodeValue;
-% $m->print("<option value=\"".$topic->Id."\""
-% .(exists $topics{$topic->Id} ? " selected" : "").">"
-% .(" " x ($tree->getDepth*5)).$topic->Name."</option>\n");
-% });
-% }
-% unless ($OnlyThisClass) {
-% my $class = $ClassObj->Id;
-% $otherTree->traverse(sub {
-% my $tree = shift;
-% my $topic = $tree->getNodeValue;
-% if ($topic->ObjectId != $class) {
-% $class = $topic->ObjectId;
-% $m->print("</optgroup>\n");
-% my $c = new RT::FM::Class($session{'CurrentUser'});
-% $c->Load($topic->ObjectId);
-% $m->print("<optgroup label=\"".$c->Name."\">\n");
-% }
-% $m->print("<option value=\"".$topic->Id."\""
-% .(exists $topics{$topic->Id} ? " selected" : "").">"
-% .(" " x ($tree->getDepth*5)).$topic->Name."</option>\n");
-% });
+<%perl>
+if ($ClassObj->Id) {
+ $m->print("<optgroup label=\"Current class (".$ClassObj->Name.")\">");
+ $inTree->traverse(sub {
+ my $tree = shift;
+ my $topic = $tree->getNodeValue;
+ $m->print("<option value=\"".$topic->Id."\""
+ .(exists $topics{$topic->Id} ? " selected" : "").">"
+ .(" " x ($tree->getDepth*5)).$topic->Name."</option>\n");
+ });
+ }
+ my $class = $ClassObj->Id;
+ $otherTree->traverse(sub {
+ my $tree = shift;
+ my $topic = $tree->getNodeValue;
+ if ($topic->ObjectId != $class) {
+ $class = $topic->ObjectId;
+ $m->print("</optgroup>\n");
+ my $c = new RT::FM::Class($session{'CurrentUser'});
+ $c->Load($topic->ObjectId);
+ $m->print("<optgroup label=\"".$c->Name."\">\n");
+ }
+ $m->print("<option value=\"".$topic->Id."\""
+ .(exists $topics{$topic->Id} ? " selected" : "").">"
+ .(" " x ($tree->getDepth*5)).$topic->Name."</option>\n");
+ });
+</%perl>
</optgroup>
% }
</select>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowLinks
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowLinks (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowLinks Tue Jun 14 14:37:06 2005
@@ -16,9 +16,6 @@
%#
%# END LICENSE BLOCK
- <table width="100%">
- <tr>
- <td valign="top">
<&|/l&>Refers to</&>:<BR>
<UL>
@@ -40,8 +37,7 @@
% }
%}
</UL>
-</td>
-<td valign="top">
+
<&|/l&>Referred to by</&>:<BR>
<UL>
% my $referredtoby = $article->ReferredToBy;
@@ -61,8 +57,6 @@
%}
% }
</UL>
-</tr>
-</table>
<%args>
$article => undef
</%args>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSavedSearches
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSavedSearches (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSavedSearches Tue Jun 14 14:37:06 2005
@@ -49,10 +49,10 @@
%# Hide all the save functionality if the user shouldn't see it.
% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
% Object=> $RT::System )) {
-<&|/l&>Save the current search:</&><br>
+<h2><&|/l&>Save this search</&></h2>
<&|/l&>Name:</&> <input name="NewSearchName" value="<%$Name%>">
<&|/l&>Privacy:</&> <& SelectSearchPrivacy, Name => 'SearchPrivacy',
- Default => $Privacy &><br>
+ Default => $Privacy &><br />
% if ($CurrentSearch && $CurrentSearch ne 'new') {
<input value="<%loc('Update')%>" name="Update" type="submit">
<input value="<%loc('Save new')%>" name="Save" type="submit">
@@ -63,7 +63,7 @@
<hr>
% } # if HasRight 'CreateSavedSearch'
-<&|/l&>Load saved search:</&><br>
+<h2><&|/l&>Load a saved search</&></h2>
<& SelectSavedSearches, Name => 'LoadSavedSearch', Default => $CurrentSearch &>
<input value="<%loc('Load')%>" name="Load" type="submit">
<& /Elements/TitleBoxEnd &>
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 Tue Jun 14 14:37:06 2005
@@ -21,85 +21,101 @@
% $qs =~ s/HideOptions=1//gi;
<a href="Search.html?<%$qs%>"><&|/l&>Show advanced search options...</&></a>
% } else {
-<& /Elements/TitleBoxStart, title => loc('Advanced Search Criteria')&>
-<br>
+<& /Elements/TitleBoxStart, title => loc('Advanced search')&>
<table>
-<tr valign="middle">
-<td>
-<&|/l&>Class is</&>
-</td>
-<td>
-<& /RTFM/Elements/SelectClass, Name => 'Class', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class'} &>
-</td>
-<td>
-<&|/l&>and is not</&>
-</td>
-<td>
+<tr><td class="label">
+<h2><&|/l&>Basics</&></h2>
+</td></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>
-</table>
-<br><&|/l&>Has topic</&><& /RTFM/Article/Elements/EditTopics, %ARGS &>
-<br /><&|/l&>Include subtopics of selected topics</&> <input type="checkbox" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
-<br><&|/l&>Name matches</&>
-<input name="Name~" value="<%$ARGS{'Name~'}%>">
+</td></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!~'}%>">
-<br><&|/l&>Summary matches</&>
+</td></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">
+<h2><&|/l&>Content</&></h2>
+</td></tr>
-<br><&|/l&>Created during</&>
-<& /Elements/SelectDate, Name=>"Created>", Default => ($dates->{'Created>'} ? $dates->{'Created>'}->ISO : '') &>
-<&|/l&>till</&>
-<& /Elements/SelectDate, Name=>"Created<", Default => ($dates->{'Created<'} ? $dates->{'Created<'}->ISO:'')&>
-
-<br><&|/l&>Created during</&>
-<& /Elements/SelectDate, Name=>"LastUpdated>", Default =>
-($dates->{'LastUpdated>'} ? $dates->{'LastUpdated>'}->AsString:'')&>
-<&|/l&>till</&>
-<& /Elements/SelectDate, Name=>"LastUpdated<", Default =>
-($dates->{'LastUpdated<'} ? $dates->{'LastUpdated<'}->AsString:'')&>
-<br>
-<&|/l&>Which refer to</&> <input type=text size=50 name="RefersTo" value="<%$RefersTo%>">
-<i><&|/l&>Separate multiple URLs with spaces</&></i>
-<br>
-<&|/l&>Which are referred to by </&> <input type=text size=50 name="ReferredToBy" value="<%$ReferredToBy%>">
-<i><&|/l&>Separate multiple URLs with spaces</&></i>
-
-<br><&|/l&>Article text matches</&>
+<td class="label"><&|/l&>Any field</&></td><td class="value">
+<&|/l&>matches</&>
<input name="Article~" value="<%$ARGS{'Article~'}%>">
<&|/l&>and not</&>
<input name="Article!~" value="<%$ARGS{'Article!~'}%>">
+</td></tr>
-<table>
-%# for each custom field
% while (my $field = $customfields->Next ) {
-<tr>
-<td><&|/l, $field->Name &>[_1] matches</&></td><td valign=top>
+<td class="label">
+<% $field->Name %>
+</td><td class="value">
+<&|/l&>matches</&>
% my $matches = $field->Name."~";
% my $nomatches = $field->Name."!~";
<& /RTFM/Article/Elements/SearchByCustomField,
Field => $field,
Name => $matches,
Values => $ARGS{$matches} &>
- </td>
- <td><&|/l&>and not</&></td>
- <td valign="top">
+ <&|/l&>and not</&>
<& /RTFM/Article/Elements/SearchByCustomField,
Field => $field,
Name => $nomatches,
Values => $ARGS{$nomatches}
&>
- </td>
- </tr>
-
+</td></tr>
% }
-</table>
+<tr><td class="label">
+<h2><&|/l&>Dates</&></h2>
+</td></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</&>
+<& /Elements/SelectDate, Name=>"LastUpdated>", Default =>
+($dates->{'LastUpdated>'} ? $dates->{'LastUpdated>'}->AsString:'')&>
+<&|/l&>and before</&>
+<& /Elements/SelectDate, Name=>"LastUpdated<", Default =>
+($dates->{'LastUpdated<'} ? $dates->{'LastUpdated<'}->AsString:'')&>
+</td></tr>
-<div align="right"><input type="submit"></div>
+<tr><td class="label">
+<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">
+<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">
+<h2><&|/l&>Topics</&></h2>
+</td></tr>
+<tr><td class="label"></td><td>
+<& /RTFM/Article/Elements/EditTopics, %ARGS &>
+<br /><input type="checkbox" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
+<&|/l&>Include subtopics</&>
+</td></tr>
+<& /Elements/Submit, Label => loc('Search') &>
<&/Elements/TitleBoxEnd&>
% }
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchResults
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchResults (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/ShowSearchResults Tue Jun 14 14:37:06 2005
@@ -16,6 +16,11 @@
%#
%# END LICENSE BLOCK
+% # THIS IS A HORRIBLE HACK TO SEE IF WE TRIED TO SEARCH
+% # IT CAN GO AWAY WHEN SEARCHBUILDER'S _isLimited IS
+% # PROMOTED TO A PUBLIC API XXX TODO
+% if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
+<h2><&|/l&>Search results</&></h2>
% if ($articles->Count){
<TABLE WIDTH=100% border=0 cellpadding=2 CELLSPACING=0>
@@ -77,9 +82,14 @@
% }
</table>
% }
+% else {
+<i><&|/l&>No articles found.</&></i>
+% }
+% }
<%init>
my $i;
</%init>
<%args>
$articles => undef
+$did_search => 1
</%args>
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 Tue Jun 14 14:37:06 2005
@@ -19,12 +19,18 @@
<& /RTFM/Article/Elements/Tabs, current_tab => "RTFM/Article/Search.html", Title => loc("Search for articles") &>
<& /Elements/ListActions, actions => \@results &>
<form action="Search.html" method="GET">
+<& Elements/ShowSearchCriteria, dates => \%dates, RefersTo => $RefersTo, customfields => $customfields, ReferredToBy => $ReferredToBy, %ARGS &>
+<br />
+<br />
<& Elements/ShowSavedSearches, CurrentSearch => $CurrentSearch,
Name => ($search ? $search->Name : undef),
Privacy => ($search ? $search->Privacy : undef) &>
-<& Elements/ShowSearchCriteria, dates => \%dates, RefersTo => $RefersTo, customfields => $customfields, ReferredToBy => $ReferredToBy, %ARGS &>
-</form>
+</form>
+<br />
+<br />
+<hr />
+<br />
<& Elements/ShowSearchResults, articles => $articles &>
<div align=right>
<a href="<%$RT::WebPath%>/RTFM/Article/Search.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Topics.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Topics.html Tue Jun 14 14:37:06 2005
@@ -16,10 +16,10 @@
%#
%# END LICENSE BLOCK
-<& /RTFM/Elements/Tabs, current_toptab => "RTFM/Topics.html", Title => loc('Topic hierarchy'), class => $class, topic => $id &>
+<& /RTFM/Elements/Tabs, current_toptab => "RTFM/Topics.html", Title => loc('Browse by topic'), class => $class, topic => $id &>
<& /Elements/ListActions, actions => \@Actions &>
-<a href="Topics.html">Root</a>
+<a href="Topics.html"><&|/l&>All topics</&></a>
% if (defined $class) {
> <a href="Topics.html?class=<%$currclass->Id%>"><% $currclass->Name %></a>
% }
@@ -28,27 +28,29 @@
> <& /RTFM/Elements/ShowTopic, topic => $currtopic &>
% }
<br />
-<& /Elements/TitleBoxStart, title => loc('Topics') &>
+<h1><&|/l&>Browse by topic</&></h1>
<ul>
<%perl>
-if ($class) {
- print MakeLinks(undef, $currclass);
+if (defined $class) {
+ $m->print('<li><h2>'.'<a href="'.
+ $RT::WebPath."/RTFM/Topics.html?class=" . $currclass->Id
+ .'">'.$currclass->Name.'</a></h2></li>');
ProduceTree(\@Actions, $currclass, 0, $id);
} else {
while (my $c = $Classes->Next) {
- print MakeLinks(undef, $c);
+ $m->print('<li><h2>'.'<a href="'.
+ $RT::WebPath."/RTFM/Topics.html?class=" . $c->Id
+ .'">'.$c->Name.'</a></h2></li>');
ProduceTree(\@Actions, $c, 0, $id);
}
}
</%perl>
</ul>
-<& /Elements/TitleBoxEnd &>
% if ($id || $showall) {
%# TODO: Eventually it would be nice to show all for classes too. Thus
%# the condition above.
<br/>
-<& /Elements/TitleBoxStart, title => loc('Articles') &>
<%perl>
my $Articles = RT::FM::ObjectTopicCollection->new($session{'CurrentUser'});
$Articles->Limit(FIELD => 'ObjectType', VALUE => 'RT::FM::Article');
@@ -62,8 +64,10 @@
}
}
}
-if ($Articles->Count) {
</%perl>
+
+% if ($Articles->Count) {
+<h2>Articles in this topic</h2>
<ul>
% while (my $obj = $Articles->Next) {
% my $a = RT::FM::Article->new($session{'CurrentUser'});
@@ -72,9 +76,8 @@
% }
</ul>
% } else {
-<i>No articles in this topic</i>
+<i><&|/l&>No articles found in this topic</&></i>
% }
-<& /Elements/TitleBoxEnd &>
% }
@@ -132,8 +135,8 @@
if ($t->Id == $restrictid) {
&ProduceTree($Actions, $c, $restrictid, undef);
}
+ print "</ul>";# x scalar(@showtopics);
}
- print "</ul>" x scalar(@showtopics);
}
} else {
# No restriction in place. Build the entire tree.
@@ -171,7 +174,9 @@
$output .= "</a>";
if ($haschild) {
- $output .= " [ <a href=\"$query&showall=1\">Show all articles</a> ]";
+ # Commented out by Jesse, since it seems confusing
+ #
+ # $output .= " [ <a href=\"$query&showall=1\">Show all articles</a> ]";
}
$output .= "</li>\n";
More information about the Rt-commit
mailing list