[Rt-commit] rt branch, 4.6/include-article-theme, created. rt-4.4.4-372-g994c57ea9
? sunnavy
sunnavy at bestpractical.com
Mon Sep 9 17:48:22 EDT 2019
The branch, 4.6/include-article-theme has been created
at 994c57ea9c523359e3cd7f3e825783a57076584e (commit)
- Log -----------------------------------------------------------------
commit 994c57ea9c523359e3cd7f3e825783a57076584e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Sep 10 04:23:08 2019 +0800
Migrate article include UI to elevator themes
diff --git a/share/html/Articles/Elements/BeforeMessageBox b/share/html/Articles/Elements/BeforeMessageBox
index 23d3547e5..6f52d81e4 100644
--- a/share/html/Articles/Elements/BeforeMessageBox
+++ b/share/html/Articles/Elements/BeforeMessageBox
@@ -49,51 +49,54 @@
<input type="hidden" name="<%$ARGS{'id'}%>-RefersTo" value="<% join(' ',grep {$_} sort keys %uri) %>" />
% }
-<table class="articles-select-article">
+<div class="articles-select-article">
% unless (RT->Config->Get('HideArticleSearchOnReplyCreate')) {
-<tr>
-<td><&|/l&>Include Article:</&></td>
-<td><& /Elements/SelectArticle, QueueObj => $QueueObj, AutoSubmit => 1 &></td>
-</tr>
+ <div class="form-row">
+ <div class="col-auto label"><&|/l&>Include Article:</&></div>
+ <div class="col-auto value"><& /Elements/SelectArticle, QueueObj => $QueueObj, AutoSubmit => 1 &></div>
+ </div>
% }
% if ( @$topics ) {
-<tr>
-<td>
-<&|/l, $QueueObj->Name &>Choose from Topics for [_1]</&>
-</td>
-<td>
-<select name="<% $name_prefix %>Articles-Include-Topic" onchange="this.form.submit()">
-<option value="" selected>-</option>
+ <div class="form-row">
+ <div class="col-auto label">
+ <&|/l, $QueueObj->Name &>Choose from Topics for [_1]</&>:
+ </div>
+ <div class="col-auto value">
+ <select name="<% $name_prefix %>Articles-Include-Topic" onchange="this.form.submit()" class="form-control selectpicker">
+ <option value="" selected>-</option>
% for ( @$topics ) {
-<option value="<% $_->{id} %>"><%' ' x $_->{depth} . ($_->{name}|| loc('(no name)')) |n%>
-</option>
+ <option value="<% $_->{id} %>"><%' ' x $_->{depth} . ($_->{name}|| loc('(no name)')) |n%>
+ </option>
% }
-</select>
-</td>
-<td><input type="submit" name="Go" value="Go" /></td>
-</tr>
+ </select>
+ </div>
+ <div class="col-auto value">
+ <input type="submit" name="Go" value="Go" class="btn btn-primary form-control" />
+ </div>
+ </div>
% if ( $ARGS{$name_prefix .'Articles-Include-Topic'} ) {
-<tr>
-<td>
-<&|/l, $included_topic->Name &>Select an Article from [_1]</&>
-</td>
-<td>
-<select name="IncludeArticleId" onchange="this.form.submit()">
-<option value="" selected>-</option>
+ <div class="form-row">
+ <div class="col-auto label">
+ <&|/l, $included_topic->Name &>Select an Article from [_1]</&>:
+ </div>
+ <div>
+ <select name="IncludeArticleId" onchange="this.form.submit()" class="form-control selectpicker">
+ <option value="" selected>-</option>
% while ( my $art = $topic_articles->Next ) {
-<option value="<% $art->id %>"><%$art->Name||loc('(no name)')%>: <%$art->Summary%></option>
+ <option value="<% $art->id %>"><%$art->Name||loc('(no name)')%>: <%$art->Summary%></option>
% }
-</select>
-</td>
-<td><input type="submit" value="Go" name="Go" /></td>
-</tr>
-
+ </select>
+ </div>
+ <div class="col-auto value">
+ <input type="submit" name="Go" value="Go" class="btn btn-primary form-control" />
+ </div>
+ </div>
% }
% }
-</table>
+</div>
<%init>
my $QueueObj = $ARGS{QueueObj};
diff --git a/share/html/Elements/SelectArticle b/share/html/Elements/SelectArticle
index c143ddc1b..302ec7732 100644
--- a/share/html/Elements/SelectArticle
+++ b/share/html/Elements/SelectArticle
@@ -49,7 +49,7 @@
% if ( $autocomplete ) {
<& "SelectArticleAutocomplete", QueueObj => $QueueObj, Default => $Default, Name => $Name &>
% } else {
-<select name="<% $Name %>" <% $AutoSubmit ? 'onchange="this.form.submit()"' : '' |n%>>
+<select name="<% $Name %>" <% $AutoSubmit ? 'onchange="this.form.submit()"' : '' |n%> class="form-control selectpicker">
<option value="">-</option>
% while (my $article = $articles->Next) {
<option <% ( $article->Name eq $Default) ? qq[ selected="selected"] : '' |n %>
diff --git a/share/html/Elements/SelectArticleAutocomplete b/share/html/Elements/SelectArticleAutocomplete
index 7ecd11348..20a3cf09a 100644
--- a/share/html/Elements/SelectArticleAutocomplete
+++ b/share/html/Elements/SelectArticleAutocomplete
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<input data-autocomplete="Articles" <% $QueueObj && $QueueObj->id ? q{data-autocomplete-queue="} . $QueueObj->id . q{"} : '' |n %> data-autocomplete-return="id" name="<% $Name %>" value="<% $Default %>"
-<% $AutoSubmit ? 'data-autocomplete-autosubmit=1' : '' %>>
+<% $AutoSubmit ? 'data-autocomplete-autosubmit=1' : '' %> class="form-control">
<%ARGS>
$QueueObj => undef
diff --git a/share/static/css/elevator-light/ticket-forms.css b/share/static/css/elevator-light/ticket-forms.css
index 4229500b8..aa528e6ed 100644
--- a/share/static/css/elevator-light/ticket-forms.css
+++ b/share/static/css/elevator-light/ticket-forms.css
@@ -8,3 +8,7 @@
.sidebyside #ticket-update-message .button[name="AddMoreAttach"] {
margin-right: -0.25em;
}
+
+div.articles-select-article {
+ margin-bottom: 0.25em;
+}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list