<div>

    % my $btn = l('pse_CLICK_TO_CREATE');

    %= $c->render_to_string(inline => l('pse_DESCRIPTION'));

    %= form_for '/pseudonyms' => (method => 'POST') => begin

        %= hidden_field 'trt' => 'ADD'

    <p><br>
    %= submit_button "$btn", class => ""
    </p>
    
    % end    


    <p><h2>
    %=l 'pse_CURRENT_PSEUDONYMS'
    </h2><br>
    %   my $numPseudonyms = @$pseudonyms;
    %   if ($numPseudonyms == 0){
        %=l 'pse_ACCOUNT_PSEUDONYM_NONE'
    %   } else {
    <table class="table table-bordered">
    <thead>
    <tr>
            <th class="">
            %=l 'pse_PSEUDONYM'
            </th>
            <th class="">
            %=l 'pse_USER_OR_GROUP'
            </th>
            <th class="">
            %=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("pse_EVERYONE") if ($account eq "shared");

    %       my $visible = $pseudonym->prop('Visible');
    %       $account .= $c->l("pse_LOCAL_ONLY")
    %       if (defined $visible && $visible eq "internal");

        <tr>
            %= t td => (class => "") => $pseudonym->key
            %= t td => (class => "") => $account

            <td class="">
                %my ($actionModify, $actionRemove) = '&nbsp;'; 
                %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="" 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="" title='$remove_text' >
                    %       $remove_text
                    %   </button>
                                        %       </a>
                    %};
                %}
                <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>

            </td>
        </tr>
    %    }
        </tbody>
        </table>
    <%} %>
    </p>


</div>
