This patch updates the OPAC and staff interface to use Bootstrap 5. Bootstrap CSS assets are now pulled from node_modules and compiled into staff-global.css and opac.css at build time. This update lays the foundations of some other chnages, especially the addition of a dark mode in the future. Hundreds of templates have been updated, mostly with updates to the grid markup. Most of the responsive behavior is still the same with the exception of improved flexibility of headers and footers in both the OPAC and staff interface. The other most common change is to add a new "namespace" to data attributes used by Bootstrap, e.g. "data-bs-target" or "data-bs-toggle". Modal markup has also been updated everywhere. Other common changes: dropdown button markup, alert markup (we now use Bootstrap's "alert alert-warning" and "alert alert-info" instead of our old "dialog alert" and "dialog info"). Bootstrap 5 now uses CSS variables which we can override in our own '_variables.scss' (in both the OPAC and staff) to accomplish a lot of the style overrides which we previously put in staff-global.scss. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
69 lines
4.1 KiB
HTML
69 lines
4.1 KiB
HTML
[% USE AuthorisedValues %]
|
|
[% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %]
|
|
[% SET resolutions = AuthorisedValues.GetAuthValueDropbox('TICKET_RESOLUTION') %]
|
|
<!-- Display updates concern modal -->
|
|
<div class="modal" id="ticketDetailsModal" tabindex="-1" role="dialog" aria-labelledby="ticketDetailsLabel">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title" id="displayUpdateLabel">Ticket details</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="concern-details"></div>
|
|
<fieldset>
|
|
<ol>
|
|
<li class="form-group">
|
|
<label for="message">Update: </label>
|
|
<textarea id="update_message" class="form-control" name="message"></textarea>
|
|
</li>
|
|
<li class="rows">
|
|
<label for="public">Notify reporter: </label>
|
|
<input type="checkbox" name="public" id="public">
|
|
<label for="assignee_id">Change assignee: </label>
|
|
<select name="assignee_id" id="assignee_id"></select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
</div> <!-- /.modal-body -->
|
|
<div class="modal-footer">
|
|
<input type="hidden" name="ticket_id" id="ticket_id">
|
|
[% IF resolutions.count %]
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-danger dropdown-toggle" id="resolveTicket" data-bs-toggle="dropdown" aria-expanded="false">
|
|
Resolve <span class="caret"></span> <i id="resolve-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
[% FOR resolution IN resolutions %]
|
|
<li>
|
|
<a class="dropdown-item resolveSubmit" type="button" data-resolution="[% resolution.authorised_value | html %]">[% resolution.lib | html_entity %]</a>
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% ELSE %]
|
|
<button type="button" class="btn btn-danger resolveSubmit" id="resolveTicket">Resolve <i id="resolve-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
|
|
[% END %]
|
|
[% IF status.count %]
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-primary updateSubmit" id="updateTicket">Update <i id="comment-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
|
|
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<span class="caret"></span>
|
|
<span class="sr-only">Select status</span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
[% FOR st IN status %]
|
|
<li>
|
|
<a class="dropdown-item updateSubmit" type="button" data-status="[% st.authorised_value | html %]">[% st.lib | html_entity %]</a>
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% ELSE %]
|
|
<button type="submit" class="btn btn-primary updateSubmit" id="updateTicket">Update <i id="comment-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
|
|
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
|
|
[% END %]
|
|
</div> <!-- /.modal-footer -->
|
|
</div> <!-- /.modal-content -->
|
|
</div> <!-- /.modal-dialog -->
|
|
</div> <!-- /#displayUpdateModal -->
|