Edit template for controller - Refine params copy and bring DB opens up to spec with UTF8
This commit is contained in:
85
output/Pseudonyms/AdminLTE/_pse_list.html.new.ep
Normal file
85
output/Pseudonyms/AdminLTE/_pse_list.html.new.ep
Normal file
@@ -0,0 +1,85 @@
|
||||
<div>
|
||||
|
||||
% my $btn = l("pse_CLICK_TO_CREATE");
|
||||
|
||||
<form action="/smanager/pseudonyms" method="POST">
|
||||
<%= $c->render_to_string(inline => l("pse_DESCRIPTION")); %>
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-primary btn-sm"><%= $btn %></button>
|
||||
</div>
|
||||
</div>
|
||||
<%= hidden_field "trt" => "ADD" %>
|
||||
</form>
|
||||
|
||||
<br>
|
||||
<h2><%= l "pse_CURRENT_PSEUDONYMS" %></h2>
|
||||
<br>
|
||||
% my $numPseudonyms = @$pseudonyms;
|
||||
% if ($numPseudonyms == 0) {
|
||||
<%= l "pse_ACCOUNT_PSEUDONYM_NONE" %>
|
||||
% } else {
|
||||
<table class="table table-bordered user-table-max-width">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm"><%= l "Pseudonym" %></th>
|
||||
<th class="col-sm"><%= l "pse_USER_OR_GROUP" %></th>
|
||||
<th class="col-sm align-middle" colspan="2"><%= l "ACTION" %></th>
|
||||
<!-- <th class="" style="display: normal;"></th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
% foreach my $pseudonym ( @$pseudonyms ) {
|
||||
% my $modifiable = $pseudonym->prop("Changeable") || "yes";
|
||||
% my $removable = $pseudonym->prop("Removable") || "yes";
|
||||
|
||||
% my $account = $pseudonym->prop("Account");
|
||||
% $account = "Administrator" if ($account eq "admin");
|
||||
% $account = $c->l("Everyone") if ($account eq "shared");
|
||||
|
||||
% my $visible = $pseudonym->prop("Visible");
|
||||
% $account .= $c->l("pse_LOCAL_ONLY")
|
||||
% if (defined $visible && $visible eq "internal");
|
||||
|
||||
<tr>
|
||||
<td><%= $pseudonym->key%></td>
|
||||
<td><%= $account%></td>
|
||||
|
||||
% my ($actionModify, $actionRemove) = " ";
|
||||
% if ($modifiable eq "yes") {
|
||||
%my $modify_text = l("MODIFY"); # Localized text
|
||||
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
|
||||
%$actionModify = qq{
|
||||
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
|
||||
% <button type="button" class="btn btn-primary btn-sm" title="$modify_text" >
|
||||
% $modify_text
|
||||
% </button>
|
||||
% </a>
|
||||
% };
|
||||
% }
|
||||
|
||||
% if ($removable eq "yes") {
|
||||
%my $remove_text = l("REMOVE"); # Localized text
|
||||
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
|
||||
%$actionRemove = qq{
|
||||
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name">
|
||||
% <button type="button" class="btn btn-primary btn-sm" title="$remove_text" >
|
||||
% $remove_text
|
||||
% </button>
|
||||
% </a>
|
||||
% };
|
||||
% }
|
||||
|
||||
<td class="align-middle"><%= $c->render_to_string(inline => $actionModify) %></td>
|
||||
<td class="align-middle"><%= $c->render_to_string(inline => $actionRemove) %></td>
|
||||
|
||||
</tr>
|
||||
% }
|
||||
</tbody>
|
||||
</table>
|
||||
% }
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user