[Rt-commit] rt branch, 4.6-theme/assets-pages, created. rt-4.4.4-185-ga9104747b
Craig Kaiser
craig at bestpractical.com
Tue Apr 16 09:19:38 EDT 2019
The branch, 4.6-theme/assets-pages has been created
at a9104747bf9c39a851cf8d9ad0bb8359022534bf (commit)
- Log -----------------------------------------------------------------
commit 4dfa4fb64e7183fe4256fb565665b02421a65cda
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Apr 16 09:10:51 2019 -0400
Update asset CSS and JS files for elevator theme
diff --git a/share/static/css/base-responsive/assets.css b/share/static/css/base-responsive/assets.css
index 1bc0b0ca6..38e00be61 100644
--- a/share/static/css/base-responsive/assets.css
+++ b/share/static/css/base-responsive/assets.css
@@ -9,251 +9,3 @@
left: inherit;
padding: 0;
}
-
-.ticket-assets .add-asset {
- padding: 2em 0 0 0;
- text-align: right;
-}
-
-body#comp-Asset-Search .collection-as-table td {
- white-space: nowrap;
-}
-
-/* Colors */
-
-.asset-basics .titlebox .titlebox-title .left,
-.asset-info-cfs .titlebox .titlebox-title .left { background-color: #b32 }
-.asset-people .titlebox .titlebox-title .left { background-color: #48c }
-.asset-dates .titlebox .titlebox-title .left { background-color: #633063 }
-.asset-links .titlebox .titlebox-title .left { background-color: #316531 }
-.ticket-assets .titlebox .titlebox-title .left { background-color: #316531 }
-
-/* People display */
-
-#comp-Asset-Display .asset-people table {
- width: 100%;
-}
-
-#comp-Asset-Display .asset-people td.label {
- text-align: left;
-}
-
-#comp-Asset-Display .asset-people h3 {
- margin: 0;
- padding: 0;
- line-height: 1.3;
- font-size: 100%;
-}
-
-#comp-Asset-Display .asset-people .details {
- padding: 0;
-}
-
-/* People editing */
-
-.asset-people .edit ul.role-members {
- margin-top: 0;
- padding-left: 0;
- list-style: none;
-}
-
-.asset-people .edit td {
- vertical-align: top;
-}
-
-.asset-people .edit .note {
- font-size: 0.9em;
-}
-
-.asset-people .edit h3 {
- margin-top: 0;
- margin-bottom: 0;
-}
-
-.asset-people .edit .role h3 {
- margin-bottom: 0.5em;
-}
-
-.asset-people .edit .role,
-.asset-people .edit .add-group,
-.asset-people .edit .add-user {
- margin-bottom: 1em;
-}
-
-/* Asset summary */
-
-.ticket-assets form {
- display: inherit;
-}
-
-.ticket-assets .related-tickets {
- margin-top: 1em;
-}
-
-.ticket-assets .related-tickets .label a {
- font-weight: bold;
- color: black;
-}
-
-.asset-metadata>div {
- vertical-align: top;
- min-width: 30%;
- max-width: 30%;
- padding-right: 1.5em;
- display: inline-block;
-}
-
-.asset-metadata {
- padding-top: 2em; /* nav overflows this :( */
-}
-
- at media (max-width: 800px) {
- .asset-metadata>div {
- min-width: 45%;
- width: 45%;
- }
-}
-
-/* on a little screen, let's just use a single column */
- at media (max-width: 600px) {
- .asset-metadata {
- padding-top: 6em;
- /* nav overflows this: < */
- }
-
- .asset-metadata>div {
- min-width: 100%;
- width: 100%;
- }
-
- #Asset-Create-basics>table,
- #Asset-Create-basics>table>tbody>tr,
- #Asset-Create-basics>table>tbody>tr>td {
- display: block;
- }
-}
-
-/* On a reasonable-width screen, make better use of whitespace */
- at media (min-width: 601px) {
- .asset-info-cfs .edit-custom-fields {
- width: 100%;
- }
-
- .asset-info-cfs .edit-custom-fields tr td,
- #ModifyAsset .asset-basics tr td {
- display: inline-block;
- }
-
- .asset-info-cfs .edit-custom-fields tr,
- #ModifyAsset .asset-basics tr {
- display: inline-block;
- width: 49%;
- }
-
- .asset-info-cfs .edit-custom-fields tr td.cflabel,
- #ModifyAsset .asset-basics tr td.label,
- #ModifyAsset .asset-basics tr td.cflabel {
- width: 8em;
- }
-
- /* Asset creation */
- #Asset-Create-basics>table {
- width: 100%;
- align: left;
- }
-
- #Asset-Create-basics>table>tbody>tr>td {
- padding-right: 2em;
- }
-
- #Asset-Create-basics>table>tbody>tr {
- vertical-align: top;
- }
-}
-
-/* basic cleanups for the search UI's elements */
-.asset-search-grouping input.datepicker {
- width: 7em;
-}
-
-.asset-search-grouping td * {
- max-width: 11em;
-}
-
-.asset-search-grouping td.label.not {
- min-width: 3em;
- width: auto;
- padding-left: 1em;
-}
-
-/* On a wide screen, use two columns for search/bulk criteria */
- at media (min-width:1150px) {
- .asset-bulk-grouping.asset-bulk-cfs,
- .asset-search-grouping.asset-search-cfs {
- display: inline-block;
- width: 45%;
- padding-right: 1em;
- vertical-align: top;
- }
-
- .titlebox.asset-bulk-grouping.asset-bulk-cfs,
- .titlebox.asset-search-grouping.asset-search-cfs {
- display: block;
- width: auto;
- padding: inherit;
- }
-
- .asset-bulk-people tr.full-width,
- .asset-search-people tr.ful-width,
- .asset-bulk-basics tr.full-width,
- .asset-search-basics tr.full-width {
- width: 100%;
- }
-
- .asset-bulk-people table.core-fields tr,
- .asset-search-people tr,
- .asset-bulk-basics table.core-fields tr,
- .asset-search-basics tr {
- width: 49%;
- display: inline-block;
- white-space: nowrap;
- }
-
- .asset-bulk-people table.core-fields tr>td,
- .asset-search-people tr>td,
- .asset-bulk-basics table.core-fields tr>td,
- .asset-search-basics tr>td {
- display: inline-block;
- width: 10em;
- }
-}
-
-#assets-accordion ul.toplevel {
- position: absolute;
- top: 0;
- right: 20px;
- width: auto;
- font-size: .9em;
- z-index: 1;
-}
-
-#assets-accordion li.has-children {
- background: transparent;
-}
-
-#assets-accordion li.has-children ul {
- min-width: 12em;
-}
-
-#assets-accordion a {
- border: none;
- color: #000;
-}
-
-#assets-accordion a.sf-with-ul {
- padding-top: .3em;
-}
-
-#assets-accordion .sf-sub-indicator {
- top: .2em;
-}
diff --git a/share/static/js/assets.js b/share/static/js/assets.js
index 8d5aaa008..8691be134 100644
--- a/share/static/js/assets.js
+++ b/share/static/js/assets.js
@@ -4,6 +4,10 @@ jQuery(function() {
.append(html).appendTo("body")
.bind('modal:close', function(ev,modal) { modal.elm.remove(); })
.modal();
+
+ // We need to refresh the select picker plugin on AJAX calls
+ // since the plugin only runs on page load.
+ jQuery('.selectpicker').selectpicker('refresh');
};
var assets = jQuery("#assets-accordion");
commit d39193588cde1d6768347f31a6998675b5c0fc2b
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Apr 16 09:12:16 2019 -0400
Update CSS for asset display components for elevator theme
diff --git a/share/html/Asset/Display.html b/share/html/Asset/Display.html
index dfd5fdd47..b9ca663b1 100644
--- a/share/html/Asset/Display.html
+++ b/share/html/Asset/Display.html
@@ -53,17 +53,20 @@
<& /Elements/ListActions, actions => \@results &>
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
-<& Elements/ShowSummary, AssetObj => $asset &>
+ <div class="boxcontainer col-md-12">
+
+ <& Elements/ShowSummary, AssetObj => $asset &>
% $m->callback(CallbackName => 'AfterShowSummary', ARGSRef => \%ARGS, Asset => $asset);
-<& /Elements/ShowHistory,
+ <& /Elements/ShowHistory,
Object => $asset,
ShowDisplayModes => 0,
DisplayPath => 'History.html',
- &>
+ &>
% $m->callback(CallbackName => 'AfterShowHistory', ARGSRef => \%ARGS, Asset => $asset);
+ </div>
</span>
<%args>
diff --git a/share/html/Asset/Elements/ShowBasics b/share/html/Asset/Elements/ShowBasics
index 2fcd0bfb0..355dbdb1d 100644
--- a/share/html/Asset/Elements/ShowBasics
+++ b/share/html/Asset/Elements/ShowBasics
@@ -45,26 +45,49 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
- <tr class="asset-catalog">
- <td class="label"><&|/l&>Catalog</&>:</td>
- <td><& ShowCatalog, Asset => $AssetObj &></td>
- </tr>
- <tr class="asset-name">
- <td class="label"><&|/l&>Name</&>:</td>
- <td><% $AssetObj->Name || '' %></td>
- </tr>
- <tr class="asset-description">
- <td class="label"><&|/l&>Description</&>:</td>
- <td><% $AssetObj->Description || '' %></td>
- </tr>
- <tr class="asset-status">
- <td class="label"><&|/l&>Status</&>:</td>
- <td class="value"><% loc($AssetObj->Status) %></td>
- </tr>
- <& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'Basics', Table => 0 &>
-% $m->callback(%ARGS, CallbackName => "AfterFields");
-</table>
+<div class="boxcontainer">
+ <div class="col-md-12">
+ <span class="col-md-3 asset-catalog label">
+ <&|/l&>Catalog</&>:
+ </span>
+ <span class="col-md-9 value">
+ <& ShowCatalog, Asset => $AssetObj &>
+ </span>
+ </div>
+
+ <div class="col-md-12">
+ <span class="col-md-4 asset-name label">
+ <&|/l&>Name</&>:
+ </span>
+ <span class="col-md-9 value">
+ <% $AssetObj->Name || '' %>
+ </span>
+ </div>
+
+ <div class="col-md-12">
+ <span class="col-md-3 asset-description label">
+ <&|/l&>Description</&>:
+ </span>
+ <span class="col-md-9 value">
+ <% $AssetObj->Description || '' %>
+ </span>
+ </div>
+
+ <div class="col-md-12">
+ <span class="col-md-3 asset-status label">
+ <&|/l&>Status</&>:
+ </span>
+ <span class="col-md-9 value">
+ <% $AssetObj->Status || '' %>
+ </span>
+ </div>
+
+ <div class="col-md-12">
+ <div class="col-md-12">
+ <& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'Basics' &>
+ </div>
+ </div>
+</div>
<%args>
$AssetObj
</%args>
diff --git a/share/html/Asset/Elements/ShowDates b/share/html/Asset/Elements/ShowDates
index 4a76df150..57f977d1a 100644
--- a/share/html/Asset/Elements/ShowDates
+++ b/share/html/Asset/Elements/ShowDates
@@ -45,28 +45,26 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
- <tr>
- <td class="label"><&|/l&>Created</&>:</td>
- <td>
- <&|/l_unsafe,
- $m->interp->apply_escapes($AssetObj->CreatedAsString, 'h'),
- $m->scomp('/Elements/ShowUser', User => $AssetObj->CreatorObj)
- &>[_1] by [_2]</&>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Last Updated</&>:</td>
- <td>
- <&|/l_unsafe,
- $m->interp->apply_escapes($AssetObj->LastUpdatedAsString, 'h'),
- $m->scomp('/Elements/ShowUser', User => $AssetObj->LastUpdatedByObj)
- &>[_1] by [_2]</&>
- </td>
- </tr>
- <& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'Dates', Table => 0 &>
+<div class="boxcontainer">
+ <div class="col-md-12">
+ <span class="col-md-3 label"><&|/l&>Created</&>:</span>
+ <span class="col-md-9 value"><&|/l_unsafe,
+ $m->interp->apply_escapes($AssetObj->CreatedAsString, 'h'),
+ $m->scomp('/Elements/ShowUser', User => $AssetObj->CreatorObj)
+ &>[_1] by [_2]</&></span>
+ </div>
+ <div class="col-md-12">
+ <span class="col-md-3 label"><&|/l&>Last Updated</&>:</span>
+ <span class="col-md-9 value"><&|/l_unsafe,
+ $m->interp->apply_escapes($AssetObj->LastUpdatedAsString, 'h'),
+ $m->scomp('/Elements/ShowUser', User => $AssetObj->LastUpdatedByObj)
+ &>[_1] by [_2]</&></span>
+ </div>
+ <div class="col-md-12">
+ <& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'Dates' &>
+ </div>
% $m->callback(%ARGS, CallbackName => "AfterFields");
-</table>
+</div>
<%args>
$AssetObj
</%args>
diff --git a/share/html/Asset/Elements/ShowPeople b/share/html/Asset/Elements/ShowPeople
index 1fc9ef6a3..7ec281ebe 100644
--- a/share/html/Asset/Elements/ShowPeople
+++ b/share/html/Asset/Elements/ShowPeople
@@ -51,26 +51,31 @@ $AssetObj
<%init>
my $CatalogObj = $AssetObj->CatalogObj;
</%init>
-<table>
+<div class="boxcontainer">
% for my $role ($AssetObj->Roles) {
-<tr><td class="label"><% loc($role) %>:
+ <div class="col-md-12">
+ <span class="col-md-3 label"><% loc($role) %>:</span>
% if ($AssetObj->Role($role)->{Single}) {
% my $users = $AssetObj->RoleGroup($role)->UserMembersObj(Recursively => 0);
% $users->FindAllRows;
% my $user = $users->Next;
-<& /Elements/ShowUser, User => $user, Link => 1 &></td></tr>
+ <span class="col-md-9 value">
+ <& /Elements/ShowUser, User => $user, Link => 1 &>
+ </span>
% next if $user->id == RT->Nobody->id;
-<tr><td>
-<& ShowRoleMembers, Group => $AssetObj->RoleGroup($role), Title => 0 &>
-</div></td></tr>
+ <div>
+ <& ShowRoleMembers, Group => $AssetObj->RoleGroup($role), Title => 0 &>
+ </div>
% } else {
-</td></tr><tr><td class="user-accordion">
+ <div class="user-accordion col-md-12">
<& ShowRoleMembers, Group => $AssetObj->RoleGroup($role) &>
<& ShowRoleMembers, Group => $CatalogObj->RoleGroup($role), Skip => $AssetObj->RoleGroup($role), Note => loc("(via this asset's catalog)") &>
- </td></tr>
+ </div>
% }
+ </div>
% }
-<& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'People', Table => 0 &>
-
-</table>
+ <div class="col-md-12">
+ <& /Elements/ShowCustomFields, Object => $AssetObj, Grouping => 'People', Table => 0 &>
+ </div>
+</div>
% $m->callback( %ARGS, CallbackName => 'AfterPeople' );
diff --git a/share/html/Asset/Elements/ShowSummary b/share/html/Asset/Elements/ShowSummary
index d81d3f3dc..604b00a48 100644
--- a/share/html/Asset/Elements/ShowSummary
+++ b/share/html/Asset/Elements/ShowSummary
@@ -67,17 +67,29 @@ for my $section (@sections) {
. "/Asset/$page?id="
. $AssetObj->id;
}
+my $count = 0;
</%init>
-<div class="asset-metadata">
+<div class="boxcontainer asset-metadata">
+ <div class="col-md-12 row">
% for my $section (@sections) {
-<&| /Widgets/TitleBox, title => loc($section), title_href => $can_edit ? $link{$section} : "", title_class => "inverse", class => "asset-\L$section" &>
- <& "Show$section", AssetObj => $AssetObj &>
-</&>
+% if ( $count == 3 ) {
+ </div><div class="col-md-12 row">
+% $count = 0;
+% }
+ <div class="col-md-4">
+ <&| /Widgets/TitleBox, title => loc($section), title_href => $can_edit ? $link{$section} : "", title_class => "inverse", class => "asset-\L$section" &>
+ <& "Show$section", AssetObj => $AssetObj &>
+ </&>
+ </div>
+% $count = $count + 1;
% }
-
-<& /Elements/ShowCustomFieldCustomGroupings,
- Object => $AssetObj,
- title_href => $can_edit ? RT->Config->Get("WebPath") . "/Asset/ModifyCFs.html" : "",
- TitleBoxARGS => { title_class => "inverse" },
- &>
+<% $count == 3 ? qq[</div><div class="col-md-12 row">] : '' %>
+ <div class="col-md-4">
+ <& /Elements/ShowCustomFieldCustomGroupings,
+ Object => $AssetObj,
+ title_href => $can_edit ? RT->Config->Get("WebPath") . "/Asset/ModifyCFs.html" : "",
+ TitleBoxARGS => { title_class => "inverse" },
+ &>
+ </div>
+ </div>
</div>
diff --git a/share/html/Asset/History.html b/share/html/Asset/History.html
index 535af7e67..7ca7fd00f 100644
--- a/share/html/Asset/History.html
+++ b/share/html/Asset/History.html
@@ -49,11 +49,13 @@
<& /Elements/Tabs &>
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
-<& /Elements/ShowHistory,
- Object => $asset,
- ShowDisplayModes => 0,
- DisplayPath => 'History.html',
+ <div class="boxcontainer asset-metadata col-md-12">
+ <& /Elements/ShowHistory,
+ Object => $asset,
+ ShowDisplayModes => 0,
+ DisplayPath => 'History.html',
&>
+ </div>
</span>
<%args>
commit dc6693917d0e1b4848f549f6744ab656175a2b5c
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Apr 16 09:16:00 2019 -0400
Update asset create components for elevator theme
diff --git a/share/html/Asset/Create.html b/share/html/Asset/Create.html
index 39ae7e6c8..169c9a131 100644
--- a/share/html/Asset/Create.html
+++ b/share/html/Asset/Create.html
@@ -62,44 +62,46 @@
<input type="hidden" name="Catalog" value="<% $catalog->id %>">
<a name="basics"></a>
-<div id="Asset-Create-basics" class="asset-metadata">
- <table>
- <tbody>
- <tr>
- <td>
- <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
- <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog &>
- </&>
-
- <&| /Widgets/TitleBox, title => loc("People"), class => "asset-people", title_class => "inverse" &>
- <& Elements/EditPeople, %ARGS, AssetObj => $asset &>
- </&>
- </td><td>
- <&| /Widgets/TitleBox, title => loc("Links"), class => "asset-links", title_class => "inverse" &>
- <& /Elements/AddLinks,
- Object => $asset,
- CustomFields => $catalog->AssetCustomFields &>
- </&>
- </td>
-
- </tr>
- </tbody>
- </table>
-</div>
-
-<div id="Asset-Create-details">
-<a name="details"></a>
-
- <& /Elements/EditCustomFieldCustomGroupings,
+<div id="Asset-Create-basics" class="boxcontainer asset-metadata col-md-12">
+ <div class="row">
+ <div class="col-md-6">
+ <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
+ <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog &>
+ </&>
+ <div class="row">
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => loc("People"), class => "asset-people", title_class => "inverse" &>
+ <& Elements/EditPeople, %ARGS, AssetObj => $asset &>
+ </&>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-6">
+ <&| /Widgets/TitleBox, title => loc("Links"), class => "asset-links", title_class => "inverse" &>
+ <& /Elements/AddLinks,
+ Object => $asset,
+ CustomFields => $catalog->AssetCustomFields
+ &>
+ </&>
+ </div>
+ </div>
+ <div id="Asset-Create-details" class="row">
+ <div class="col-md-12">
+ <a name="details"></a>
+ <& /Elements/EditCustomFieldCustomGroupings,
Object => $asset,
TitleBoxARGS => { title_class => "inverse" },
KeepValue => 1,
CustomFieldGenerator => sub { $catalog->AssetCustomFields },
ForCreation => 1,
- &>
-</div>
-
- <& /Elements/Submit, Label => loc('Create asset') &>
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Create asset') &>
+ </div>
+ </div>
</form>
</span>
diff --git a/share/html/Asset/CreateInCatalog.html b/share/html/Asset/CreateInCatalog.html
index af0131843..aaff4b10d 100644
--- a/share/html/Asset/CreateInCatalog.html
+++ b/share/html/Asset/CreateInCatalog.html
@@ -48,4 +48,8 @@
<& /Elements/Header,
Title => loc("Create new asset") &>
<& /Elements/Tabs &>
+<div class="form-row">
+ <div class="col-md-12">
<& /Asset/Elements/CreateInCatalog &>
+ </div>
+</div>
\ No newline at end of file
diff --git a/share/html/Asset/Elements/CreateInCatalog b/share/html/Asset/Elements/CreateInCatalog
index 6ac611008..757d02f87 100644
--- a/share/html/Asset/Elements/CreateInCatalog
+++ b/share/html/Asset/Elements/CreateInCatalog
@@ -45,9 +45,17 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get("WebPath") %>/Asset/Create.html" id="AssetCreateInCatalog">
- <&|/l_unsafe,
- $m->scomp("/Asset/Elements/SelectCatalog"),
- &>Create a new asset in the catalog [_1].</&>
- <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled asset creation form.") &>
-</form>
+<div class="modal-body">
+ <form action="<% RT->Config->Get("WebPath") %>/Asset/Create.html" id="AssetCreateInCatalog">
+ <div class="form-group">
+ <div class="col-md-12">
+ <&|/l_unsafe,
+ $m->scomp("/Asset/Elements/SelectCatalog"),
+ &>Create a new asset in the catalog: [_1]</&>
+ </div>
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled asset creation form.") &>
+ </div>
+ </div>
+ </form>
+</div>
diff --git a/share/html/Asset/Elements/CreateLinkedTicket b/share/html/Asset/Elements/CreateLinkedTicket
index 193a2df1b..0f0ba7385 100644
--- a/share/html/Asset/Elements/CreateLinkedTicket
+++ b/share/html/Asset/Elements/CreateLinkedTicket
@@ -76,32 +76,45 @@ foreach my $asset (@asset_objs){
</%init>
<form action="<% RT->Config->Get("WebPath") %><% $session{CurrentUser}->Privileged ? "/Ticket" : "/SelfService" %>/Create.html" id="AssetCreateLinkedTicket">
- <input name="new-RefersTo" value="<% $refers_to %>" type="hidden">
- <input name="Subject" value="<% $asset_objs[0]->Name %>" type="hidden">
+ <div class="col-md-12">
+ <input name="new-RefersTo" value="<% $refers_to %>" type="hidden">
+ <input name="Subject" value="<% $asset_objs[0]->Name %>" type="hidden">
% if ( @asset_objs == 1 ){
- <&|/l_unsafe,
- $m->scomp("/Elements/SelectNewTicketQueue"),
- @description &>Create a new ticket in the [_1] queue about asset #[_2]: [_3].</&>
+ <div class="form-group">
+ <div class="col-md-12">
+ <&|/l_unsafe,
+ $m->scomp("/Elements/SelectNewTicketQueue"),
+ @description &>Create a new ticket in the [_1] queue about asset #[_2]: [_3].</&>
+ </div>
+ </div>
% }
% else {
-<&|/l_unsafe,
- $m->scomp("/Elements/SelectNewTicketQueue"),
- &>Create a new ticket in the [_1] queue about multiple assets.</&>
+ <div class="form-group">
+ <div class="col-md-12">
+ <&|/l_unsafe,
+ $m->scomp("/Elements/SelectNewTicketQueue"),
+ &>Create a new ticket in the [_1] queue about multiple assets.</&>
+ </div>
+ </div>
% }
% if ($Requestors) {
<input type="hidden" name="Requestors" value="<% $Requestors%>" />
% } else {
+ <div class="form-group">
% my $first = 1;
% for my $role ($asset_objs[0]->Roles) {
% my $addr = join ', ', keys %{$role_addresses{$role}};
% next unless defined $addr and length $addr;
- <br>
- <label>
- <input type="radio" name="Requestors" value="<% $addr %>" <% $first ? 'checked="checked"' : '' |n%>/>
- <&|/l, loc($role), $addr &>Use asset [_1] as ticket Requestor: [_2]</&>
- </label>
+ <input class="" type="radio" name="Requestors" value="<% $addr %>" <% $first ? 'checked="checked"' : '' |n%>/>
+ <&|/l, loc($role), $addr &>Use asset [_1] as ticket Requestor: [_2]</&>
% $first = 0;
% }
+ </div>
% }
- <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled ticket creation form.") &>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially filled ticket creation form.") &>
+ </div>
+ </div>
+ </div>
</form>
diff --git a/share/html/Asset/Elements/EditCatalogPeople b/share/html/Asset/Elements/EditCatalogPeople
index 4438c5b24..627f47174 100644
--- a/share/html/Asset/Elements/EditCatalogPeople
+++ b/share/html/Asset/Elements/EditCatalogPeople
@@ -50,10 +50,14 @@ $Object
</%args>
<%init>
</%init>
+<div class="col-md-12">
% for my $role ($Object->Roles( ACLOnly => 0 )) {
-<div class="role-<% CSSClass($role) %> role">
- <h3><% loc($role) %></h3>
- <& EditRoleMembers, Group => $Object->RoleGroup($role) &>
-</div>
+ <div class="role-<% CSSClass($role) %> role">
+ <h5><% loc($role) %></h5>
+ <& EditRoleMembers, Group => $Object->RoleGroup($role) &>
+ </div>
% }
-<em><&|/l&>(Check box to delete)</&></em>
+ <div class="form-row col-md-12">
+ <em><&|/l&>(Check box to delete)</&></em>
+ </div>
+</div>
diff --git a/share/html/Asset/Elements/EditDates b/share/html/Asset/Elements/EditDates
index 2c4bedefd..6a56a9147 100644
--- a/share/html/Asset/Elements/EditDates
+++ b/share/html/Asset/Elements/EditDates
@@ -45,28 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
- <tr>
- <td class="label"><&|/l&>Created</&>:</td>
- <td>
- <&|/l_unsafe,
- $m->interp->apply_escapes($AssetObj->CreatedAsString, 'h'),
- $m->scomp('/Elements/ShowUser', User => $AssetObj->CreatorObj)
- &>[_1] by [_2]</&>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Last Updated</&>:</td>
- <td>
- <&|/l_unsafe,
- $m->interp->apply_escapes($AssetObj->LastUpdatedAsString, 'h'),
- $m->scomp('/Elements/ShowUser', User => $AssetObj->LastUpdatedByObj)
- &>[_1] by [_2]</&>
- </td>
- </tr>
- <& /Elements/EditCustomFields, Object => $AssetObj, Grouping => 'Dates', InTable => 1 &>
+<div class="col-md-12">
+ <div class="row col-md-12">
+ <&|/l&>Created</&>:</td>
+ <&|/l_unsafe,
+ $m->interp->apply_escapes($AssetObj->CreatedAsString, 'h'),
+ $m->scomp('/Elements/ShowUser', User => $AssetObj->CreatorObj)
+ &>[_1] by [_2]</&>
+ </div>
+ <div class="row col-md-12">
+ <&|/l&>Last Updated</&>:
+ <&|/l_unsafe,
+ $m->interp->apply_escapes($AssetObj->LastUpdatedAsString, 'h'),
+ $m->scomp('/Elements/ShowUser', User => $AssetObj->LastUpdatedByObj)
+ &>[_1] by [_2]</&>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <& /Elements/EditCustomFields, Object => $AssetObj, Grouping => 'Dates' &>
+ </div>
+ </div>
% $m->callback(%ARGS, CallbackName => "AfterFields");
-</table>
+</div>
<%args>
$AssetObj
</%args>
diff --git a/share/html/Asset/Elements/EditRoleMembers b/share/html/Asset/Elements/EditRoleMembers
index dcbb5fa8f..54fc4d043 100644
--- a/share/html/Asset/Elements/EditRoleMembers
+++ b/share/html/Asset/Elements/EditRoleMembers
@@ -52,28 +52,24 @@ $Recursively => 0
<%init>
my $field_name = "RemoveRoleMember-" . $Group->Name;
</%init>
-<ul class="role-members">
+<div class="role-members">
% my $Users = $Group->UserMembersObj( Recursively => $Recursively );
% if ($Group->SingleMemberRoleGroup) {
-<input type="text" value="<% $Users->First->Name %>" name="SetRoleMember-<% $Group->Name %>" id="SetRoleMember-<% $Group->Name %>" data-autocomplete="Users" data-autocomplete-return="Name" /><br />
+ <input class="form-control selectpicker" type="text" value="<% $Users->First->Name %>" name="SetRoleMember-<% $Group->Name %>" id="SetRoleMember-<% $Group->Name %>" data-autocomplete="Users" data-autocomplete-return="Name" /><br />
% } else {
% while ( my $user = $Users->Next ) {
-<li>
- <label>
+ <div class="col-md-12">
<input type="checkbox" name="<% $field_name %>" value="<% $user->PrincipalId %>">
<& /Elements/ShowUser, User => $user &>
- </label>
-</li>
+ </div>
% }
% my $Groups = $Group->GroupMembersObj( Recursively => $Recursively );
% $Groups->LimitToUserDefinedGroups;
% while (my $group = $Groups->Next) {
-<li>
- <label>
+ <div class="col-md-12">
<input type="checkbox" name="<% $field_name %>" value="<% $group->PrincipalId %>">
<&|/l&>Group</&>: <% $group->Name %>
- </label>
-</li>
+ </div>
% }
% }
-</ul>
+</div>
diff --git a/share/html/Asset/Elements/SelectRoleType b/share/html/Asset/Elements/SelectRoleType
index 6abbc2d79..7f51901b7 100644
--- a/share/html/Asset/Elements/SelectRoleType
+++ b/share/html/Asset/Elements/SelectRoleType
@@ -50,7 +50,7 @@ $Object
$Name
$AllowNull => 0
</%args>
-<select name="<% $Name %>">
+<select name="<% $Name %>" class="selectpicker form-control">
% if ($AllowNull) {
<option value=""></option>
% }
diff --git a/share/html/Asset/Helpers/CreateInCatalog b/share/html/Asset/Helpers/CreateInCatalog
index 46e7072d5..f1c5aa707 100644
--- a/share/html/Asset/Helpers/CreateInCatalog
+++ b/share/html/Asset/Helpers/CreateInCatalog
@@ -45,5 +45,9 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Asset/Elements/CreateInCatalog &>
+<div class="modal-dialog modal-dialog-centered" role="document">
+ <div class="modal-content">
+ <& /Asset/Elements/CreateInCatalog &>
+ </div>
+</div>
% $m->abort;
diff --git a/share/html/Asset/Helpers/CreateLinkedTicket b/share/html/Asset/Helpers/CreateLinkedTicket
index 76631d606..b8f77555b 100644
--- a/share/html/Asset/Helpers/CreateLinkedTicket
+++ b/share/html/Asset/Helpers/CreateLinkedTicket
@@ -60,5 +60,9 @@ elsif ( $Asset ){
}
</%init>
-<& /Asset/Elements/CreateLinkedTicket, AssetObj => \@asset_objs, Requestors => $Requestors &>
+<div class="modal-dialog modal-dialog-centered" role="document">
+ <div class="modal-content">
+ <& /Asset/Elements/CreateLinkedTicket, AssetObj => \@asset_objs, Requestors => $Requestors &>
+ </div>
+</div>
% $m->abort;
commit a9104747bf9c39a851cf8d9ad0bb8359022534bf
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Apr 16 09:16:32 2019 -0400
Update asset modify components for elevator theme
diff --git a/share/html/Asset/Elements/AddCatalogPeople b/share/html/Asset/Elements/AddCatalogPeople
index 0d65328a6..5341ba0b9 100644
--- a/share/html/Asset/Elements/AddCatalogPeople
+++ b/share/html/Asset/Elements/AddCatalogPeople
@@ -48,20 +48,34 @@
<%args>
$Object
</%args>
-<div class="add-user">
-<h3><&|/l&>Add a person</&></h3>
-<& SelectRoleType, Object => $Object, Name => "AddUserRoleMember-Role" &>
-<input type="text" name="AddUserRoleMember"
- data-autocomplete="Users"
- data-autocomplete-return="Name"
- placeholder="<% loc("Find a user...") %>">
+<div class="add-user form-row">
+ <div class="col-md-4 label">
+ <h5><&|/l&>Add a person</&></h5>
+ </div>
+ <div class="col-md-4 value">
+ <& SelectRoleType, Object => $Object, Name => "AddUserRoleMember-Role" &>
+ </div>
+ <div class="col-md-4 value">
+ <input type="text" name="AddUserRoleMember"
+ data-autocomplete="Users"
+ data-autocomplete-return="Name"
+ placeholder="<% loc("Find a user...") %>"
+ >
+ </div>
</div>
-<div class="add-group">
-<h3><&|/l&>Add a group</&></h3>
-<& SelectRoleType, Object => $Object, Name => "AddGroupRoleMember-Role" &>
-<input type="text" name="AddGroupRoleMember"
- data-autocomplete="Groups"
- data-autocomplete-return="Name"
- placeholder="<% loc("Find a group...") %>">
+<div class="add-group form-row">
+ <div class="col-md-4 label">
+ <h5><&|/l&>Add a group</&></h5>
+ </div>
+ <div class="col-md-4 value">
+ <& SelectRoleType, Object => $Object, Name => "AddGroupRoleMember-Role" &>
+ </div>
+ <div class="col-md-4 value">
+ <input type="text" name="AddGroupRoleMember"
+ data-autocomplete="Groups"
+ data-autocomplete-return="Name"
+ placeholder="<% loc("Find a group...") %>"
+ >
+ </div>
</div>
diff --git a/share/html/Asset/Modify.html b/share/html/Asset/Modify.html
index e047b0ab5..be291cd37 100644
--- a/share/html/Asset/Modify.html
+++ b/share/html/Asset/Modify.html
@@ -55,15 +55,27 @@
<input type="hidden" name="id" value="<% $asset->id %>">
<input type="hidden" name="DisplayAfter" value="<% $DisplayAfter ? 1 : 0 %>">
- <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
- <& Elements/EditBasics, %ARGS, AssetObj => $asset &>
- </&>
-
- <&| /Widgets/TitleBox, title => loc("Custom Fields"), class => "asset-info-cfs", title_class => "inverse" &>
- <& /Elements/EditCustomFields, Object => $asset, Grouping => '' &>
- </&>
-
- <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
+ <div class="boxcontainer asset-metadata col-md-12">
+ <div class="row">
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
+ <& Elements/EditBasics, %ARGS, AssetObj => $asset &>
+ </&>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => loc("Custom Fields"), class => "asset-info-cfs", title_class => "inverse" &>
+ <& /Elements/EditCustomFields, Object => $asset, Grouping => '' &>
+ </&>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
+ </div>
+ </div>
+ </div>
</form>
</span>
diff --git a/share/html/Asset/ModifyCFs.html b/share/html/Asset/ModifyCFs.html
index 999cb150f..0abe744f8 100644
--- a/share/html/Asset/ModifyCFs.html
+++ b/share/html/Asset/ModifyCFs.html
@@ -52,15 +52,23 @@
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
<form method="post" enctype="multipart/form-data" id="ModifyAssetCFs" action="ModifyCFs.html">
- <input type="hidden" name="id" value="<% $asset->id %>">
- <input type="hidden" name="Grouping" value="<% $Grouping %>">
+ <div class="boxcontainer col-md-12">
+ <input type="hidden" name="id" value="<% $asset->id %>">
+ <input type="hidden" name="Grouping" value="<% $Grouping %>">
- <&| /Widgets/TitleBox, title => $Grouping ? loc($Grouping) : loc("Custom Fields"), class => "asset-info-cfs ".($Grouping ? CSSClass("asset-info-cfs-\L$Grouping") : ""), title_class => "inverse" &>
- <& /Elements/EditCustomFields, Object => $asset, Grouping => $Grouping &>
- </&>
-
- <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
-</form>
+ <div class="form-row">
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => $Grouping ? loc($Grouping) : loc("Custom Fields"), class => "asset-info-cfs ".($Grouping ? CSSClass("asset-info-cfs-\L$Grouping") : ""), title_class => "inverse" &>
+ <& /Elements/EditCustomFields, Object => $asset, Grouping => $Grouping &>
+ </&>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
+ </div>
+ </div>
+ </form>
</span>
<%args>
diff --git a/share/html/Asset/ModifyDates.html b/share/html/Asset/ModifyDates.html
index 663eaa570..ca94c9921 100644
--- a/share/html/Asset/ModifyDates.html
+++ b/share/html/Asset/ModifyDates.html
@@ -51,15 +51,23 @@
<& /Elements/ListActions, actions => \@results &>
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
-<form method="post" enctype="multipart/form-data" id="ModifyAssetDates" action="ModifyDates.html">
- <input type="hidden" name="id" value="<% $asset->id %>">
+ <div class="boxcontainer col-md-12">
+ <form method="post" enctype="multipart/form-data" id="ModifyAssetDates" action="ModifyDates.html">
+ <input type="hidden" name="id" value="<% $asset->id %>">
- <&| /Widgets/TitleBox, title => loc("Dates"), class => "asset-dates", title_class => "inverse" &>
- <& Elements/EditDates, %ARGS, AssetObj => $asset &>
- </&>
-
- <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
-</form>
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => loc("Dates"), class => "asset-dates", title_class => "inverse" &>
+ <div class="col-md-12">
+ <& Elements/EditDates, %ARGS, AssetObj => $asset &>
+ </&>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
+ </div>
+ </div>
+ </div>
+ </form>
</span>
<%init>
diff --git a/share/html/Asset/ModifyLinks.html b/share/html/Asset/ModifyLinks.html
index 610a697c4..28f96ce0d 100644
--- a/share/html/Asset/ModifyLinks.html
+++ b/share/html/Asset/ModifyLinks.html
@@ -51,15 +51,24 @@
<& /Elements/ListActions, actions => \@results &>
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
-<form method="post" enctype="multipart/form-data" id="ModifyAssetLinks" action="ModifyLinks.html">
- <input type="hidden" name="id" value="<% $asset->id %>">
+ <div class="boxcontainer asset-metadata col-md-12">
+ <form method="post" enctype="multipart/form-data" id="ModifyAssetLinks" action="ModifyLinks.html">
+ <input type="hidden" name="id" value="<% $asset->id %>">
- <&| /Widgets/TitleBox, title => loc("Links"), class => "asset-links", title_class => "inverse" &>
- <& /Elements/EditLinks, %ARGS, Object => $asset, Merge => 0 &>
- </&>
-
- <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
-</form>
+ <div class="row">
+ <div class="col-md-12">
+ <&| /Widgets/TitleBox, title => loc("Links"), class => "asset-links", title_class => "inverse" &>
+ <& /Elements/EditLinks, %ARGS, Object => $asset, Merge => 0 &>
+ </&>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Save asset'), Name => "Update" &>
+ </div>
+ </div>
+ </form>
+ </div>
</span>
<%init>
diff --git a/share/html/Asset/ModifyPeople.html b/share/html/Asset/ModifyPeople.html
index 5cd0384ce..5f2325900 100644
--- a/share/html/Asset/ModifyPeople.html
+++ b/share/html/Asset/ModifyPeople.html
@@ -53,23 +53,29 @@
<& /Elements/ListActions, actions => \@results &>
<span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
-<form method="post" enctype="multipart/form-data" id="ModifyAssetPeople" action="ModifyPeople.html">
- <input type="hidden" name="id" value="<% $asset->id %>">
-
- <&| /Widgets/TitleBox, title => loc("People"), class => "asset-people", title_class => "inverse" &>
- <table width="100%" class="edit">
- <tr>
- <td width="30%"><& /Asset/Elements/EditCatalogPeople, %ARGS, Object => $asset &></td>
- <td width="30%"><& /Asset/Elements/AddCatalogPeople, Object => $asset &></td>
- <td>
- <& /Elements/EditCustomFields, Object => $asset, Grouping => 'People' &>
- </td>
- </tr>
- </table>
- </&>
-
- <& /Elements/Submit, Label => loc('Save'), Name => "Update" &>
-</form>
+ <div class="boxcontainer">
+ <div class="col-md-12">
+ <form method="post" enctype="multipart/form-data" id="ModifyAssetPeople" action="ModifyPeople.html">
+ <input type="hidden" name="id" value="<% $asset->id %>">
+ <&| /Widgets/TitleBox, title => loc("People"), class => "asset-people", title_class => "inverse" &>
+ <div class="form-row">
+ <div class="col-md-4">
+ <& /Asset/Elements/EditCatalogPeople, %ARGS, Object => $asset &>
+ </div>
+ <div class="col-md-4">
+ <& /Asset/Elements/AddCatalogPeople, Object => $asset &>
+ </div>
+ </div>
+ <div class="col-md-4">
+ <& /Elements/EditCustomFields, Object => $asset, Grouping => 'People' &>
+ </div>
+ </&>
+ </div>
+ <div class="col-md-12">
+ <& /Elements/Submit, Label => loc('Save'), Name => "Update" &>
+ </div>
+ </form>
+ </div>
</span>
<%init>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list