[Rt-commit] rt branch, 4.6-theme/articles-pages, created. rt-4.4.4-275-g4fe309c65
Craig Kaiser
craig at bestpractical.com
Fri May 31 13:20:25 EDT 2019
The branch, 4.6-theme/articles-pages has been created
at 4fe309c65a841d7fb42e249e227eda192d0a87f2 (commit)
- Log -----------------------------------------------------------------
commit 7cd33f045973a58d9abacd62c1cecb2ebe0e10e4
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 08:50:53 2019 -0400
Migrate articles index page and components to elevator theme
diff --git a/share/html/Articles/Elements/CreateArticle b/share/html/Articles/Elements/CreateArticle
index d9120b687..36b0d5842 100644
--- a/share/html/Articles/Elements/CreateArticle
+++ b/share/html/Articles/Elements/CreateArticle
@@ -46,9 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Widgets/TitleBoxStart, title => loc('Create an article') &>
-<ul>
+<ul class="list-group list-group-compact">
% while (my $Class = $Classes->Next) {
-<li><a href="Article/Edit.html?Class=<%$Class->Id%>"><%$Class->Name%></a></li>
+<li class="list-group-item"><a href="Article/Edit.html?Class=<%$Class->Id%>"><%$Class->Name%></a></li>
% }
</ul>
<& /Widgets/TitleBoxEnd &>
diff --git a/share/html/Articles/Elements/NewestArticles b/share/html/Articles/Elements/NewestArticles
index 35c84d5de..5264091d1 100644
--- a/share/html/Articles/Elements/NewestArticles
+++ b/share/html/Articles/Elements/NewestArticles
@@ -46,27 +46,43 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Widgets/TitleBoxStart, title => loc("[_1] newest articles", $rows), bodyclass=> '' &>
-<table border="0" cellspacing="0" cellpadding="1" width="100%">
-<tr>
-<th align="right"><&|/l&>#</&></th>
-<th align="left"><&|/l&>Name</&></th>
-<th align="left" width="20%"><&|/l&>Created by</&></th>
-<th align="left"> </th>
-</tr>
+
+<div class="form-row">
+ <div class="col-md-auto label text-right">
+ <&|/l&>#</&>
+ </div>
+ <div class="col-md-4 label text-left">
+ <&|/l&>Name</&>
+ </div>
+ <div class="col-md-4 label text-left">
+ <&|/l&>Created by</&>
+ </div>
+ <div class="col-md-3 label text-left">
+
+ </div>
+</div>
% while (my $Article = $MyArticles->Next) {
% $i++;
-<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">
-<td align="right"><%$Article->Id%></td>
-<td><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></td>
-<td><%$Article->CreatorObj->Name%></td>
-<td align="right">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</td>
-</tr>
-<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">
-<td> </td>
-<td colspan="3"><small><%$Article->Summary || loc('(no Summary)')%></small></td>
-</tr>
+<div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="col-md-auto value text-right">
+ <span class="current-value form-control"><%$Article->Id%></span>
+ </div>
+ <div class="col-md-4 value text-left">
+ <span class="current-value form-control"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
+ </div>
+ <div class="col-md-4 value text-left">
+ <span class="current-value form-control"><%$Article->CreatorObj->Name%></span>
+ </div>
+ <div class="col-md-3 value text-left">
+ <span class="current-value form-control">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</span>
+ </div>
+</div>
+<div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="col-md-11 col-md-offset-1">
+ <span class="current-value form-control"><small><%$Article->Summary || loc('(no Summary)')%></small></span>
+ </div>
+</div>
% }
-</table>
<& /Widgets/TitleBoxEnd &>
<%INIT>
my $rows = 10;
diff --git a/share/html/Articles/Elements/QuickSearch b/share/html/Articles/Elements/QuickSearch
index 25c6cdff0..c9e75e4fe 100644
--- a/share/html/Articles/Elements/QuickSearch
+++ b/share/html/Articles/Elements/QuickSearch
@@ -46,9 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Widgets/TitleBoxStart, title => loc('Quick search') &>
-<ul>
+<ul class="list-group list-group-compact">
% while (my $class = $classes->Next) {
-<li><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?Class=<%$class->id%>&Parent=0&HideOptions=1"><%$class->Name%></a></li>
+<li class="list-group-item"><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?Class=<%$class->id%>&Parent=0&HideOptions=1"><%$class->Name%></a></li>
% }
</ul>
<& /Widgets/TitleBoxEnd &>
diff --git a/share/html/Articles/Elements/UpdatedArticles b/share/html/Articles/Elements/UpdatedArticles
index ec5ba1a03..e11dde957 100644
--- a/share/html/Articles/Elements/UpdatedArticles
+++ b/share/html/Articles/Elements/UpdatedArticles
@@ -46,28 +46,46 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Widgets/TitleBoxStart, title => loc("[_1] most recently updated articles", $rows), bodyclass=> '' &>
-<table border="0" cellspacing="0" cellpadding="1" width="100%">
-<tr>
-<th align="right"><&|/l&>#</&></th>
-<th align="left"><&|/l&>Name</&></th>
-<th align="left" width="20%"><&|/l&>Created by</&></th>
-<th> </th>
-</tr>
+
+<div class="form-row">
+ <div class="col-md-auto label text-right">
+ <&|/l&>#</&>
+ </div>
+ <div class="col-md-4 label text-left">
+ <&|/l&>Name</&>
+ </div>
+ <div class="col-md-4 label text-left">
+ <&|/l&>Created by</&>
+ </div>
+ <div class="col-md-3 label text-left">
+
+ </div>
+</div>
% while (my $Article = $MyArticles->Next) {
% $i++;
-<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">
-<td align="right"><%$Article->Id%></td>
-<td><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></td>
-<td><%$Article->CreatorObj->Name%></td>
-<td align="right">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</td>
-</tr>
-<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">
-<td> </td>
-<td colspan="3"><small><%$Article->Summary || loc('(no Summary)')%></small></td>
-</tr>
+<div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="col-md-auto value text-right">
+ <span class="current-value form-control"><%$Article->Id%></span>
+ </div>
+ <div class="col-md-4 value text-left">
+ <span class="current-value form-control"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
+ </div>
+ <div class="col-md-4 value text-left">
+ <span class="current-value form-control"><%$Article->CreatorObj->Name%></span>
+ </div>
+ <div class="col-md-3 value text-left">
+ <span class="current-value form-control">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</span>
+ </div>
+</div>
+
+<div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="col-md-11 col-md-offset-1">
+ <span class="current-value form-control"><small><%$Article->Summary || loc('(no Summary)')%></small></span>
+ </div>
+</div>
% }
-</table>
+
<& /Widgets/TitleBoxEnd &>
<%INIT>
my $rows = 10;
diff --git a/share/html/Articles/index.html b/share/html/Articles/index.html
index 587c4c807..c899ffdad 100644
--- a/share/html/Articles/index.html
+++ b/share/html/Articles/index.html
@@ -47,18 +47,25 @@
%# END BPS TAGGED BLOCK }}}
<& /Elements/Header, Title => loc('Articles') &>
<& /Elements/Tabs &>
-<& /Articles/Elements/MaybeNeedsSetup &>
-<table width="100%">
-<tr>
-<td valign="top" width="70%">
-<& /Articles/Elements/NewestArticles &>
-<br />
-<& /Articles/Elements/UpdatedArticles &>
-</td>
-<td valign="top">
-<& /Articles/Elements/QuickSearch &>
-<br />
-<& /Articles/Elements/CreateArticle &>
-</td>
-</tr>
-</table>
+
+<div class="form-row">
+ <div class="col-md-9">
+ <div class="col-md-12">
+ <& /Articles/Elements/MaybeNeedsSetup &>
+ </div>
+ <div class="col-md-12">
+ <& /Articles/Elements/UpdatedArticles &>
+ </div>
+ <div class="col-md-12">
+ <& /Articles/Elements/NewestArticles &>
+ </div>
+ </div>
+ <div class="col-md-3">
+ <div class="col-md-12">
+ <& /Articles/Elements/QuickSearch &>
+ </div>
+ <div class="col-md-12">
+ <& /Articles/Elements/CreateArticle &>
+ </div>
+ </div>
+</div>
commit b165bd93e07371ced339ada1c6fe3618c74a9a35
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 10:02:58 2019 -0400
Migrate articles search pages to elevator theme
diff --git a/share/html/Articles/Article/Elements/SearchByCustomField b/share/html/Articles/Article/Elements/SearchByCustomField
index 3b0df4d62..99db87517 100644
--- a/share/html/Articles/Article/Elements/SearchByCustomField
+++ b/share/html/Articles/Article/Elements/SearchByCustomField
@@ -48,7 +48,7 @@
%# if the custom field is a select, enumerate the options
% if ($Field->Type =~ /^Select/) {
% my $CustomFieldValues = $Field->ValuesObj();
-<select name="<%$Name%>" class="tall" size="5" multiple>
+<select name="<%$Name%>" class="tall form-control selectpicker" size="5" multiple>
% while (my $value = $CustomFieldValues->Next) {
% my $name = $value->Name || '';
<option value="<% $name %>" <% grep($_ eq $name, @Values)? 'SELECTED' : ''%>><% $name %></option>
@@ -58,7 +58,7 @@
% }
%# otherwise, put in a textedity field
% else {
-<input type="text" name="<%$Name%>" value="<%$Values[0]||''%>" />
+<input class="form-control" type="text" name="<%$Name%>" value="<%$Values[0]||''%>" />
% }
<%init>
my @Values =ref( $Values ) ? @{ $Values } : ( $Values );
diff --git a/share/html/Articles/Article/Elements/SelectSavedSearches b/share/html/Articles/Article/Elements/SelectSavedSearches
index c922ad537..1015743e0 100644
--- a/share/html/Articles/Article/Elements/SelectSavedSearches
+++ b/share/html/Articles/Article/Elements/SelectSavedSearches
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
+<select class="form-control selectpicker" name="<%$Name%>">
% foreach my $privacy (reverse sort keys %privacies) {
% my $searches = RT::SavedSearches->new($session{'CurrentUser'});
% $searches->LimitToPrivacy($privacy, 'Article');
diff --git a/share/html/Articles/Article/Elements/SelectSearchPrivacy b/share/html/Articles/Article/Elements/SelectSearchPrivacy
index 4f39b8e7a..5d9d2c96d 100644
--- a/share/html/Articles/Article/Elements/SelectSearchPrivacy
+++ b/share/html/Articles/Article/Elements/SelectSearchPrivacy
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
+<select class="form-control selectpicker" name="<%$Name%>">
<option value="RT::User-<% $user->Id %>" <% $Default eq 'RT::User-'.$user->Id ? 'selected' : '' %>>My searches</option>
% while (my $group = $groups->Next) {
<option value="RT::Group-<% $group->Id %>" <% $Default eq 'RT::Group-'.$group->Id ? 'selected' : '' %>><% $group->Label %>'s searches</option>
diff --git a/share/html/Articles/Article/Elements/ShowSavedSearches b/share/html/Articles/Article/Elements/ShowSavedSearches
index 2e6e222aa..8e82cddd4 100644
--- a/share/html/Articles/Article/Elements/ShowSavedSearches
+++ b/share/html/Articles/Article/Elements/ShowSavedSearches
@@ -52,21 +52,43 @@
% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
% Object=> $RT::System )) {
<h2><&|/l&>Save this search</&></h2>
-<&|/l&>Name:</&> <input type="text" name="NewSearchName" value="<%$Name||''%>">
-<&|/l&>Privacy:</&> <& SelectSearchPrivacy, Name => 'SearchPrivacy', Default => $Privacy &><br />
+
+<div class="form-row">
+ <div class="col-md-auto label">
+ <&|/l&>Name:</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="NewSearchName" value="<%$Name||''%>">
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>Privacy:</&>
+ </div>
+ <div class="col-md-auto value">
+ <& SelectSearchPrivacy, Name => 'SearchPrivacy', Default => $Privacy &>
+ </div>
+
+ <div class="col-md-auto">
% if ($CurrentSearch && $CurrentSearch ne 'new') {
-<input value="<%loc('Update')%>" name="Update" type="submit" />
-<input value="<%loc('Save new')%>" name="Save" type="submit" />
-<input value="<%loc('Delete')%>" name="Delete" type="submit" />
+<input class="form-control btn btn-primary" value="<%loc('Update')%>" name="Update" type="submit" />
+<input class="form-control btn btn-primary" value="<%loc('Save new')%>" name="Save" type="submit" />
+<input class="form-control btn btn-primary" value="<%loc('Delete')%>" name="Delete" type="submit" />
% } else {
-<input value="<%loc('Save')%>" name="Save" type="submit" />
+<input class="form-control btn btn-primary" value="<%loc('Save')%>" name="Save" type="submit" />
% }
+ </div>
+</div>
<hr />
% } # if HasRight 'CreateSavedSearch'
<h2><&|/l&>Load a saved search</&></h2>
-<& SelectSavedSearches, Name => 'LoadSavedSearch', Default => $CurrentSearch &>
-<input value="<%loc('Load')%>" name="Load" type="submit">
+<div class="form-row">
+ <div class="col-md-auto value">
+ <& SelectSavedSearches, Name => 'LoadSavedSearch', Default => $CurrentSearch &>
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary" value="<%loc('Load')%>" name="Load" type="submit">
+ </div>
+</div>
<& /Widgets/TitleBoxEnd &>
<%INIT>
diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index fd2adcad0..01a698468 100644
--- a/share/html/Articles/Article/Elements/ShowSearchCriteria
+++ b/share/html/Articles/Article/Elements/ShowSearchCriteria
@@ -50,98 +50,200 @@
% } else {
<& /Widgets/TitleBoxStart, title => loc('Advanced search') &>
% }
-<table>
-<tr>
-<td class="label" colspan="2"><h2><&|/l&>Basics</&></h2></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Class</&></td><td class="value">is <& /Articles/Elements/SelectClass, Name => 'Class', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class'} &>
-<&|/l&>and not</&>
-<& /Articles/Elements/SelectClass, Name => 'Class!', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class!'} &></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Name</&></td>
-<td class="value"><&|/l&>matches</&> <input type="text" name="Name~" value="<%$ARGS{'Name~'}%>" /> <&|/l&>and not</&> <input type="text" name="Name!~" value="<%$ARGS{'Name!~'}%>" /></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Summary</&></td>
-<td class="value"><&|/l&>matches</&> <input type="text" name="Summary~" value="<%$ARGS{'Summary~'}%>" /> <&|/l&>and not</&> <input type="text" name="Summary!~" value="<%$ARGS{'Summary!~'}%>" /></td>
-</tr>
-<tr>
-<td class="label" colspan="2"><h2><&|/l&>Content</&></h2></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Any field</&></td><td class="value"> <&|/l&>matches</&> <input type="text" name="Article~" value="<%$ARGS{'Article~'}%>" /> <&|/l&>and not</&> <input type="text" name="Article!~" value="<%$ARGS{'Article!~'}%>" /></td>
-</tr>
+<div class="form-row">
+
+ <div class="col-md-12">
+ <h2><&|/l&>Basics</&></h2>
+ </div>
+
+ <div class="col-md-12">
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Class</&></b> is
+ </div>
+ <div class="col-md-auto value">
+ <& /Articles/Elements/SelectClass, Name => 'Class', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class'} &>
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto value">
+ <& /Articles/Elements/SelectClass, Name => 'Class!', Multiple =>1, Size => 5 , ShowNullOption => undef, Default => $ARGS{'Class!'} &>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Name</&></b> <&|/l&>matches</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Name~" value="<%$ARGS{'Name~'}%>" />
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Name!~" value="<%$ARGS{'Name!~'}%>" />
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Summary</&></b> <&|/l&>matches</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Summary~" value="<%$ARGS{'Summary~'}%>" />
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Summary!~" value="<%$ARGS{'Summary!~'}%>" />
+ </div>
+ </div>
+
+ </div>
+
+ <div class="col-md-12 label">
+ <h2><&|/l&>Content</&></h2>
+ </div>
+
+ <div class="col-md-12">
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Any field</&></b> <&|/l&>matches</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Article~" value="<%$ARGS{'Article~'}%>" />
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="Article!~" value="<%$ARGS{'Article!~'}%>" />
+ </div>
+ </div>
+
% while (my $field = $customfields->Next ) {
-<tr>
-<td class="label"><% $field->Name %></td>
-<td class="value"><&|/l&>matches</&>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><% $field->Name %></b> <&|/l&>matches</&>
+ </div>
+ <div class="col-md-auto value">
% my $matches = $field->Name."~";
% my $nomatches = $field->Name."!~";
<& /Articles/Article/Elements/SearchByCustomField,
Field => $field,
Name => $matches,
Values => $ARGS{$matches} &>
- <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and not</&>
+ </div>
+ <div class="col-md-auto value">
<& /Articles/Article/Elements/SearchByCustomField,
Field => $field,
Name => $nomatches,
Values => $ARGS{$nomatches}
&>
-</td>
-</tr>
+ </div>
+ </div>
% }
-<tr>
-<td class="label" colspan="2"><h2><&|/l&>Dates</&></h2></td>
-</tr>
-<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>
-<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>
-<tr>
-<td class="label" colspan="2"><h2><&|/l&>Links</&></h2></td>
-</tr>
-<tr>
-<td class="label"></td>
-<td><& LinkEntryInstructions &></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Refer to</&></td>
-<td class="value"><input type=text size=50 name="RefersTo" value="<%$RefersTo%>" /></td>
-</tr>
-<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" colspan="2"><h2><&|/l&>Topics</&></h2></td>
-</tr>
-<tr>
-<td class="label"></td>
-<td>
-<& /Articles/Article/Elements/EditTopics, %ARGS, Classes => \@Classes, OnlyThisClass => 1 &>
-<br />
-<input type="checkbox" id="ExpandTopics" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
-<label for="ExpandTopics"><&|/l&>Include subtopics</&></label>
-</td>
-</tr>
-</table>
-<& /Elements/Submit, Label => loc('Search') &>
+ </div>
+
+ <div class="col-md-12 label">
+ <h2><&|/l&>Dates</&></h2>
+ </div>
+
+ <div class="col-md-12">
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Created</&></b> <&|/l&>after</&>
+ </div>
+ <div class="col-md-auto value">
+ <& /Elements/SelectDate, Name=>"Created>", Default => ($dates->{'Created>'} ? $dates->{'Created>'}->ISO : '') &>
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and before</&>
+ </div>
+ <div class="col-md-auto value">
+ <& /Elements/SelectDate, Name=>"Created<", Default => ($dates->{'Created<'} ? $dates->{'Created<'}->ISO:'')&>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Last updated</&></b> <&|/l&>after</&>
+ </div>
+ <div class="col-md-auto value">
+ <& /Elements/SelectDate, Name=>"LastUpdated>", Default =>
+ ($dates->{'LastUpdated>'} ? $dates->{'LastUpdated>'}->AsString:'')&>
+ </div>
+ <div class="col-md-auto label">
+ <&|/l&>and before</&>
+ </div>
+ <div class="col-md-auto value">
+ <& /Elements/SelectDate, Name=>"LastUpdated<", Default =>
+ ($dates->{'LastUpdated<'} ? $dates->{'LastUpdated<'}->AsString:'')&>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-md-12 label">
+ <h2><&|/l&>Links</&></h2>
+ </div>
+
+ <div class="col-md-3 label"></div>
+ <div class="col-md-9 label text-left">
+ <& LinkEntryInstructions &>
+ </div>
+
+ <div class="col-md-12">
+
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Refer to</&></b>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type=text size=50 name="RefersTo" value="<%$RefersTo%>" />
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <b><&|/l&>Referred to by</&></b>
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type=text size=50 name="ReferredToBy" value="<%$ReferredToBy%>" />
+ </div>
+ </div>
+ </div>
+
+ <div class="col-md-12 label">
+ <h2><&|/l&>Topics</&></h2>
+ </div>
+
+ <div class="col-md-3"></div>
+ <div class="col-md-9">
+ <& /Articles/Article/Elements/EditTopics, %ARGS, Classes => \@Classes, OnlyThisClass => 1 &>
+ </div>
+
+ <div class="col-md-3 label"></div>
+ <div class="col-md-9 value">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" id="ExpandTopics" name="ExpandTopics" class="custom-control-input" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
+ <label class="custom-control-label" for="ExpandTopics"><&|/l&>Include subtopics</&></label>
+ </div>
+ </div>
+
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Search') &>
+ </div>
+
+</div>
+
<& /Widgets/TitleBoxEnd &>
<%init>
my @Classes =
diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 9ac7d62f7..227310899 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -49,32 +49,36 @@
<& /Elements/Tabs &>
% unless ( keys %ARGS ) {
-<table width="100%" border="0">
-<tr>
-<td valign="top" width="50%">
+<div class="form-row">
+ <div class="col-md-6">
% if (not $classes_configured) {
<& /Articles/Elements/NeedsSetup &>
% } elsif (not @classes) {
<i><&|/l&>You don't have permission to view Articles in any Class</&></i>
% } else {
-<ul>
+<ul class="list-group list-group-compact">
% for my $class (@classes) {
-<li><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?<% $m->comp('/Elements/QueryString', %filtered, Class => $class->id) %>"><&|/l, $class->Name&>in class [_1]</&></a></li>
+<li class="list-group-item"><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?<% $m->comp('/Elements/QueryString', %filtered, Class => $class->id) %>"><&|/l, $class->Name&>in class [_1]</&></a></li>
% }
</ul>
% }
-</td>
-<td valign="top" width="50%">
+ </div>
+ <div class="col-md-6">
<form action="Search.html" method="get">
<& /Widgets/TitleBoxStart, title => loc('Saved searches') &>
<&|/l&>Load saved search:</&><br />
-<& Elements/SelectSavedSearches, Name => 'LoadSavedSearch', Default => $CurrentSearch &>
-<input value="<%loc('Load')%>" name="Load" type="submit" />
+<div class="form-row">
+ <div class="col-md-auto value">
+ <& Elements/SelectSavedSearches, Name => 'LoadSavedSearch', Default => $CurrentSearch &>
+ </div>
+ <div class="col-md-auto">
+ <input class="btn btn-primary form-control" value="<%loc('Load')%>" name="Load" type="submit" />
+ </div>
+</div>
<& /Widgets/TitleBoxEnd &>
</form>
-</td>
-</tr>
-</table>
+ </div>
+</div>
% return;
% }
diff --git a/share/html/Articles/Elements/SelectClass b/share/html/Articles/Elements/SelectClass
index 1ae108edc..8a95b9f09 100644
--- a/share/html/Articles/Elements/SelectClass
+++ b/share/html/Articles/Elements/SelectClass
@@ -46,9 +46,9 @@
%#
%# END BPS TAGGED BLOCK }}}
% if ($Lite) {
-<input type="text" name="<%$Name%>" size="25" default="<%$d->Name%>" />
+<input class="form-control" type="text" name="<%$Name%>" size="25" default="<%$d->Name%>" />
% } else {
-<select NAME ="<%$Name%>"
+<select class="form-control selectpicker" NAME ="<%$Name%>"
% if ($Multiple) {
MULTIPLE
% }
commit 1f93f7ca3eaa43620a181ee407bf0c487abb99a2
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 10:57:26 2019 -0400
Migrate articles modify pages to elevator theme
diff --git a/share/html/Articles/Article/Edit.html b/share/html/Articles/Article/Edit.html
index ec5c55194..83e5220c2 100644
--- a/share/html/Articles/Article/Edit.html
+++ b/share/html/Articles/Article/Edit.html
@@ -80,15 +80,24 @@
</&>
<&| /Widgets/TitleBox, title => 'Topics', class => 'article-topics', &>
-<& Elements/EditTopics, ArticleObj => $ArticleObj,
+<div class="form-row">
+ <div class="col-md-3"></div>
+ <div class="col-md-9">
+ <& Elements/EditTopics, ArticleObj => $ArticleObj,
Classes => [$ArticleObj->Id ? $ArticleObj->ClassObj : $ClassObj],
OnlyThisClass => 1,
%ARGS,
id => $id
&>
+ </div>
+</div>
</&>
-<& /Elements/Submit, Label => ($id eq 'new' ? loc('Create') : loc('Save Changes')), color => "#993333" &>
+<div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => ($id eq 'new' ? loc('Create') : loc('Save Changes')), color => "#993333" &>
+ </div>
+</div>
</form>
<%INIT>
diff --git a/share/html/Articles/Article/Elements/EditBasics b/share/html/Articles/Article/Elements/EditBasics
index b1ea32a8e..12ad1f1f4 100644
--- a/share/html/Articles/Article/Elements/EditBasics
+++ b/share/html/Articles/Article/Elements/EditBasics
@@ -45,51 +45,62 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
-<tr>
-<td class="label"><&|/l&>Name</&>:</td>
-<td><input type="text" name="Name" value="<%($ARGS{'id'} eq 'new' ? '' : $ArticleObj->Name) || $ARGS{'Name'} || ''|h%>" size="50" /></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Summary</&>:</td>
-<td><input type="text" name="Summary" value="<%($ARGS{'id'} eq 'new' ? '' : $ArticleObj->Summary) || $ARGS{'Summary'} ||'' |h%>" size="50" /></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Class</&>:</td>
-<td>
+<div class="form-row">
+
+ <div class="col-md-3 label">
+ <&|/l&>Name</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input class="form-control" type="text" name="Name" value="<%($ARGS{'id'} eq 'new' ? '' : $ArticleObj->Name) || $ARGS{'Name'} || ''|h%>" size="50" />
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Summary</&>:
+ </div>
+ <div class="col-md-9 value">
+ <input class="form-control" type="text" name="Summary" value="<%($ARGS{'id'} eq 'new' ? '' : $ArticleObj->Summary) || $ARGS{'Summary'} ||'' |h%>" size="50" />
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Class</&>:
+ </div>
+ <div class="col-md-9 value">
% if ($EditClass) {
<& /Articles/Elements/SelectClass, Name => 'Class', Default =>$ArticleObj->ClassObj->Id&>
% } else {
-<%$ClassObj->Name%>
+<span class="current-value form-control"><%$ClassObj->Name%></span>
<input type="hidden" name="Class" value="<%$ClassObj->Id%>" />
% }
-</td>
-</tr>
+ </div>
+
+ <div class="col-md-3 label">
% if ($ARGS{'id'} ne 'new') {
-<tr>
-<td class="label"><&|/l&>Creator</&>:</td>
-<td><& /Elements/ShowUser, User => $ArticleObj->CreatorObj &></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Created</&>:</td>
-<td><span class="value"><%$ArticleObj->CreatedObj->AsString%></span></td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Updated</&>:</td>
-<td><span class="value"><%$ArticleObj->LastUpdatedObj->AsString%></span></td>
-</tr>
+ <&|/l&>Creator</&>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $ArticleObj->CreatorObj &></span>
+ </div>
+ <div class="col-md-3 label">
+ <&|/l&>Created</&>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><%$ArticleObj->CreatedObj->AsString%></span>
+ </div>
+ <div class="col-md-3 label">
+ <&|/l&>Updated</&>:
+ </div>
+ <div class="col-md-9 value">
+ <span class="current-value form-control"><%$ArticleObj->LastUpdatedObj->AsString%></span>
+ </div>
% }
% if ($ARGS{'id'} eq 'new' || $ArticleObj->CurrentUserHasRight('DisableArticle')) {
-<tr>
-<td class="label"></td>
-<td>
+ <div class="col-md-9 value">
<input type="hidden" class="hidden" name="SetEnabled" value="1" />
<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <% ( $ArticleObj->id && $ArticleObj->Disabled || $ARGS{'Disabled'} ) ? '' : 'checked="checked"' |n %> />
<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this article)</&></label>
-</td>
-</tr>
-</table>
+ </div>
% }
+</div>
<%INIT>
</%INIT>
<%ARGS>
diff --git a/share/html/Articles/Article/Elements/EditCustomFields b/share/html/Articles/Article/Elements/EditCustomFields
index 58668b0ae..a3d152cab 100644
--- a/share/html/Articles/Article/Elements/EditCustomFields
+++ b/share/html/Articles/Article/Elements/EditCustomFields
@@ -45,23 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
% while (my $CustomField = $CustomFields->Next()) {
-<tr>
- <td class="cflabel">
- <span class="name"><%$CustomField->Name%>:</span><br />
+<div class="form-row">
+ <div class="cflabel label col-md-3">
+ <span class="name"><%$CustomField->Name%>:</span>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="cflabel label col-md-9">
<span class="type"><%$CustomField->EntryHint // ''%></span>
- </td>
- <td class="entry"><& /Elements/EditCustomField,
- Object => $ArticleObj,
- CustomField => $CustomField,
- Default => $CFContent->{$CustomField->Id},
- Rows => 15,
- Cols => 70
- &></td>
-</tr>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-9 value entry">
+ <& /Elements/EditCustomField,
+ Object => $ArticleObj,
+ CustomField => $CustomField,
+ Default => $CFContent->{$CustomField->Id},
+ Rows => 15,
+ Cols => 70
+ &>
+ </div>
+</div>
% }
-</table>
<%INIT>
my $CustomFields;
diff --git a/share/html/Articles/Article/Elements/EditLinks b/share/html/Articles/Article/Elements/EditLinks
index 66abac344..6362680a3 100644
--- a/share/html/Articles/Article/Elements/EditLinks
+++ b/share/html/Articles/Article/Elements/EditLinks
@@ -45,26 +45,36 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
-<tr>
-<td class="label"></td>
-<td class="value"><i><&|/l&>Enter articles, tickets, or other URLs related to this article.</&>
-<& LinkEntryInstructions &></i>
+<div class="form-row">
+
+ <div class="col-md-3 label"></div>
+ <div class="col-md-9 value">
+ <i><&|/l&>Enter articles, tickets, or other URLs related to this article.</&></i>
+ </div>
+ <div class="col-md-3 label"></div>
+ <div class="col-md-9 label text-left">
+ <& LinkEntryInstructions &>
+ </div>
% unless ($id eq 'new') {
-<i><&|/l&>(Check boxes to delete)</&></i><br />
+<i><&|/l&>(Check boxes to delete)</&></i>
% }
-</td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Refers to</&>:</td>
-<td><input type="text" name="<%$id%>-RefersTo" value="<%$ARGS{$id.'-RefersTo'}||''%>" /><br />
-<ul>
+ <div class="col-md-12">
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Refers to</&>:
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="<%$id%>-RefersTo" value="<%$ARGS{$id.'-RefersTo'}||''%>" />
+ </div>
+ <ul class="list-group list-group-compact">
% if ($id ne 'new') {
% my $refersto = $ArticleObj->RefersTo;
% while (my $link = $refersto->Next) {
% my $member = $link->TargetURI;
-<li>
-<input type="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" />
+<li class="list-group-item">
+<div class="custom-control custom-checkbox">
+ <input type="checkbox" id="DeleteLink--<%$link->Type%>-<%$link->Target%>" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" class="custom-control-input">
+ <label class="custom-control-label" for="DeleteLink--<%$link->Type%>-<%$link->Target%>">
% if ($link->TargetURI->IsLocal) {
<a href="<%$member->AsHREF%>"><% loc($member->Object->RecordType) %> <%$member->Object->Id%></a>:
% if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
@@ -76,22 +86,31 @@
% } else {
<a href="<%$member->AsHREF%>"><%$link->Target%></a>
% }
+ </label>
+ </div>
% }
% }
-</ul>
-</td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Referred to by</&>:</td>
-<td><input type="text" name="RefersTo-<%$id%>" value="<%$ARGS{'RefersTo-'.$id}||''%>" />
-<br />
-<ul>
+ </ul>
+ </div>
+ </div>
+
+ <div class="col-md-12">
+ <div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Referred to by</&>:
+ </div>
+ <div class="col-md-auto value">
+ <input class="form-control" type="text" name="RefersTo-<%$id%>" value="<%$ARGS{'RefersTo-'.$id}||''%>" />
+ </div>
+ <ul class="list-group list-group-compact">
% if ($id ne 'new') {
% my $referredtoby = $ArticleObj->ReferredToBy;
% while (my $link = $referredtoby->Next) {
% my $member = $link->BaseURI;
-<li>
-<input type="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" />
+<li class="list-group-item">
+<div class="custom-control custom-checkbox">
+ <input type="checkbox" id="DeleteLink-<%$link->Base%>-<%$link->Type%>-" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" class="custom-control-input" />
+ <label class="custom-control-label" for="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
% if ($link->BaseURI->IsLocal) {
<a href="<%$member->AsHREF%>"><% loc($member->Object->RecordType) %> <%$member->Object->Id%>:
% if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
@@ -103,12 +122,15 @@
% } else {
<a href="<%$member->AsHREF%>"><%$link->Base%></a>
% }
+ </label>
+ </div>
% }
% }
-</ul>
-</td>
-</tr>
-</table>
+ </ul>
+ </div>
+ </div>
+
+</div>
<%ARGS>
$ArticleObj => undef
$id => undef
commit c930e9b3dac84c5796612eedfcf96c7a43f86c85
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 12:25:42 2019 -0400
Migrate articles display pages to elevator theme
diff --git a/share/html/Articles/Article/Display.html b/share/html/Articles/Article/Display.html
index 1bf35b868..6b29aff27 100644
--- a/share/html/Articles/Article/Display.html
+++ b/share/html/Articles/Article/Display.html
@@ -49,28 +49,43 @@
<& /Elements/Tabs &>
<&| /Widgets/TitleBox, title => loc('The Basics'), class => 'article-basics', &>
-<table>
- <tr>
- <td class="label"><&|/l&>Summary</&>:</td>
- <td class="value"><%$article->Summary%></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Class</&>:</td>
- <td class="value"><%$article->ClassObj->Name%></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Creator</&>:</td>
- <td class="value"><& /Elements/ShowUser, User => $article->CreatorObj &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Created</&>:</td>
- <td class="value"><%$article->CreatedObj->AsString%></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Updated</&>:</td>
- <td class="value"><%$article->LastUpdatedObj->AsString%></td>
- </tr>
-</table>
+ <div class="form-row">
+
+ <div class="col-md-3 label">
+ <&|/l&>Summary</&>:
+ </div>
+ <div class="col-md-9 value">
+ <%$article->Summary%>
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Class</&>:
+ </div>
+ <div class="col-md-9 value">
+ <%$article->ClassObj->Name%>
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Creator</&>:
+ </div>
+ <div class="col-md-9 value">
+ <& /Elements/ShowUser, User => $article->CreatorObj &>
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Created</&>:
+ </div>
+ <div class="col-md-9 value">
+ <%$article->CreatedObj->AsString%>
+ </div>
+
+ <div class="col-md-3 label">
+ <&|/l&>Updated</&>:
+ </div>
+ <div class="col-md-9 value">
+ <%$article->LastUpdatedObj->AsString%>
+ </div>
+ </div>
</&>
% $m->callback( %ARGS, CallbackName => 'AfterBasics' );
diff --git a/share/html/Articles/Article/Elements/ShowLinks b/share/html/Articles/Article/Elements/ShowLinks
index bb6e703ea..5dcca7422 100644
--- a/share/html/Articles/Article/Elements/ShowLinks
+++ b/share/html/Articles/Article/Elements/ShowLinks
@@ -45,15 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
-<tr>
-<td class="label"><&|/l&>Refers to</&>:</td>
-<td class="value">
+<div class="form-row">
+ <div class="col-md-3 label">
+ <&|/l&>Refers to</&>:
+ </div>
+ <div class="col-md-9 value">
% my $refersto = $article->RefersTo;
-
+<ul class="list-group list-group-compact">
% while (my $link = $refersto->Next) {
% my $member = $link->TargetURI;
-<li>
+<li class="list-group-item">
+<span class="current-value form-control">
% if ($link->TargetURI->IsLocal) {
<a href="<%$member->AsHREF%>"><% loc($member->Object->RecordType) %> <%$member->Object->Id%>:
% if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
@@ -65,17 +67,22 @@
% } else {
<a href="<%$member->AsHREF%>"><%$link->Target%></a>
% }
+</span>
</li>
% }
-</td>
-</tr>
+</ul>
+ </div>
-<td class="label"><&|/l&>Referred to by</&>:</td>
-<td class="value">
+ <div class="col-md-3 label">
+ <&|/l&>Referred to by</&>:
+ </div>
+ <div class="col-md-9 value">
+<ul class="list-group list-group-compact">
% my $referredtoby = $article->ReferredToBy;
% while (my $link = $referredtoby->Next) {
% my $member = $link->BaseURI;
-<li>
+<li class="list-group-item">
+<span class="current-value form-control">
% if ($member->IsLocal) {
<a href="<%$member->AsHREF%>"><% loc($member->Object->RecordType) %> <%$member->Object->Id%>:
% if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
@@ -87,11 +94,12 @@
% } else {
<a href="<%$member->AsHREF%>"><%$link->Base%></a>
% }
+</span>
</li>
% }
-</td>
-</tr>
-</table>
+</ul>
+</div>
+</div>
<%args>
$article => undef
</%args>
commit 5b62f40902c72c4cdd9330e07f9fdeb87b29a53a
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 12:26:01 2019 -0400
Migrate articles extract pages to elevator theme
diff --git a/share/html/Articles/Article/ExtractFromTicket.html b/share/html/Articles/Article/ExtractFromTicket.html
index 5c263d2cd..f93d86513 100644
--- a/share/html/Articles/Article/ExtractFromTicket.html
+++ b/share/html/Articles/Article/ExtractFromTicket.html
@@ -54,33 +54,40 @@
<input type="hidden" name="Topics" value="<% $_ %>" />
% }
<input type="hidden" name="new-RefersTo" value="t:<% $ticket->id%>" />
-<table width="100%" valign="top" border=0 cellspacing=0>
<p><&|/l&>Use the dropdown menus to select which ticket updates you want to extract into a new article.</&>
<&|/l&>You can insert ticket content into any freeform, text or wiki field.</&>
</p>
-<tr>
-<th><&|/l&>Field</&></th>
-<th><&|/l&>Ticket update</&></th>
-</tr>
+<div class="form-row">
+ <div class="col-md-2 label text-left">
+ <&|/l&>Field</&>
+ </div>
+ <div class="col-md-auto label text-left">
+ <&|/l&>Ticket update</&>
+ </div>
+</div>
% my $i;
% while ( my $trans = $transactions->Next ) {
% next unless $trans->HasContent && $trans->Content;
-<tr class="<% ($i++)%2 ? 'oddline' : 'evenline'%>" >
-<td valign="top">
-<select name="Transaction-<%$trans->Id%>">
-<option value="">-</option>
+<div class="<% ($i++)%2 ? 'oddline' : 'evenline'%> form-row" >
+ <div class="col-md-2 value">
+ <select class="form-control selectpicker" name="Transaction-<%$trans->Id%>">
+ <option value="">-</option>
% while (my $cf = $CustomFields->Next) {
-<option value="<%$cf->Id%>"><%$cf->Name%></option>
+ <option value="<%$cf->Id%>"><%$cf->Name%></option>
% }
-</select>
-</td>
-<td><b><%$trans->CreatedObj->AsString%>: <%$trans->Description%></b><br />
-<pre><%$trans->Content%></pre>
-</td>
-</tr>
+ </select>
+ </div>
+ <div class="col-md-auto value">
+ <b><%$trans->CreatedObj->AsString%>: <%$trans->Description%></b>
+ <pre><%$trans->Content%></pre>
+ </div>
+</div>
% }
-</table>
-<& /Elements/Submit, Label => loc('Create'), color => "#993333" &>
+<div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Create'), color => "#993333" &>
+ </div>
+</div>
</form>
<%INIT>
diff --git a/share/html/Articles/Article/ExtractIntoClass.html b/share/html/Articles/Article/ExtractIntoClass.html
index 3e3292743..a6e32c76b 100644
--- a/share/html/Articles/Article/ExtractIntoClass.html
+++ b/share/html/Articles/Article/ExtractIntoClass.html
@@ -50,11 +50,11 @@
<h2><&|/l&>Create a new article in</&>:</h2>
-<ul>
+<ul class="list-group list-group-compact">
% my $Classes = RT::Classes->new($session{'CurrentUser'});
% $Classes->LimitToEnabled();
% while (my $Class = $Classes->Next) {
-<li><a href="ExtractIntoTopic.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>" onclick="document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display = (document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display == 'block') ? 'none' : 'block'; return false;"><%$Class->Name%></a>:
+<li class="list-group-item"><a href="ExtractIntoTopic.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>" onclick="document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display = (document.getElementById('topics-'+<% $Class->Id |n,j%>).style.display == 'block') ? 'none' : 'block'; return false;"><%$Class->Name%></a>:
<%$Class->Description || ''%>
<div id="topics-<%$Class->Id%>" style="display: none">
<form action="ExtractFromTicket.html">
@@ -64,8 +64,12 @@
<& Elements/EditTopics, Classes => [$Class],
OnlyThisClass => 1,
id => 'new',
- &><br />
-<input type="submit" value="<%loc('Create')%>" />
+ &>
+<div class="form-row">
+ <div class="col-md-12">
+ <input class="form-control btn btn-primary" type="submit" value="<%loc('Create')%>" />
+ </div>
+</div>
</form>
<br /></div>
</li>
diff --git a/share/html/Articles/Article/ExtractIntoTopic.html b/share/html/Articles/Article/ExtractIntoTopic.html
index 3b63a0910..a7323ff52 100644
--- a/share/html/Articles/Article/ExtractIntoTopic.html
+++ b/share/html/Articles/Article/ExtractIntoTopic.html
@@ -56,8 +56,12 @@
<& Elements/EditTopics, Classes => [$ClassObj],
OnlyThisClass => 1,
id => 'new',
- &><br />
-<input type="submit" value="<%loc('Create')%>" />
+ &>
+<div class="form-row">
+ <div class="col-md-12">
+ <input class="form-control btn btn-primary" type="submit" value="<%loc('Create')%>" />
+ </div>
+</div>
</form>
<%args>
$Ticket => undef
commit 4fe309c65a841d7fb42e249e227eda192d0a87f2
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 31 12:41:14 2019 -0400
Migrate articles topics page to elevator theme
diff --git a/share/html/Articles/Topics.html b/share/html/Articles/Topics.html
index a3451af83..c5a8913ec 100644
--- a/share/html/Articles/Topics.html
+++ b/share/html/Articles/Topics.html
@@ -76,7 +76,7 @@
% }
% # List the topics.
% for my $t ( @showtopics ) {
-<ul><li><& /Articles/Elements/ShowTopicLink, Topic => $t, Class => $currclass_id &>
+<ul class="list-group list-group-compact"><li class="list-group-item"><& /Articles/Elements/ShowTopicLink, Topic => $t, Class => $currclass_id &>
% $ProduceTree->( $id ) if $t->Id == $id;
% }
% for ( @showtopics ) {
@@ -84,11 +84,11 @@
% }
% }
% } else {
-<ul>
+<ul class="list-group list-group-compact">
% while (my $c = $Classes->Next) {
-<li><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=<% $c->Id %>"><% $c->Name %></a></h2></li>
+<li class="list-group-item"><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=<% $c->Id %>"><% $c->Name %></a></h2></li>
% }
-<li><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=0"><&|/l&>Global Topics</&></a></h2></li>
+<li class="list-group-item"><h2><a href="<% RT->Config->Get('WebPath') %>/Articles/Topics.html?class=0"><&|/l&>Global Topics</&></a></h2></li>
</ul>
% }
@@ -100,9 +100,9 @@
% } elsif ($class) {
<h2><&|/l&>Articles with no topics</&></h2>
% }
-<ul>
+<ul class="list-group list-group-compact">
% for my $a (@articles) {
-<li><a href="Article/Display.html?id=<% $a->Id %>"><% $a->Name || loc("(no name)") %></a></li>
+<li class="list-group-item"><a href="Article/Display.html?id=<% $a->Id %>"><% $a->Name || loc("(no name)") %></a></li>
% }
</ul>
% }
-----------------------------------------------------------------------
More information about the rt-commit
mailing list