<div>

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

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

        %= hidden_field 'trt' => 'ADD'

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

	<p>
	<h2>
	%=l 'prt_CURRENT_LIST'
	</h2>
	<br><br>
    % 	my $numPrinters = @$printerDrivers;
    %	if ($numPrinters == 0){
        %=l 'prt_NO_PRINTERS'
    %	} else {
	<table class="table table-bordered">
	<thead>
	<tr>
    	    <th class="">
    	    %=l 'NAME'
    	    </th>
    	    <th class="">
    	    %=l 'DESCRIPTION'
    	    </th>
    	    <th class="">
    	    %=l 'LOCATION'
    	    </th>
    	    <th class="">
    	    %=l 'prt_REMOTE_ADDRESS'
    	    </th>
    	    <th class="">
    	    %=l 'prt_REMOTE_NAME'
    	    </th>
    	    <th class="">
    	    %=l 'ACTION'
    	    </th>
    	</tr>
    	</thead>
    	<tbody>
    %    foreach my $printer (@$printerDrivers)
    %    {
    %        my $address = ($printer->prop('Location') eq 'remote')
    %        ? $printer->prop('Address') : 'N/A';
    %        my $remoteName = ($printer->prop('Location') eq 'remote')
    %        ? $printer->prop('RemoteName') : 'N/A';
    %        $remoteName = 'raw' unless ($remoteName);
        <tr>
            %= t td => (class => "") => $printer->key
            %= t td => (class => "") => $printer->prop('Description')
            %= t td => (class => "") => $printer->prop('Location')
            %= t td => (class => "") => $address
            %= t td => (class => "") => $remoteName
			<td class="">
				%my $remove_text = l('REMOVE');  # Localized text
				%my $csrf_token = "TOKEN";  # CSRF token for security
				%my $printer_name = $printer->key;
				%my $actionRemove = qq{
                                %       <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name">
				%	<button type='button' class="" title='$remove_text' >
				%		$remove_text
				%	</button>
                                %       </a>
				%};
			<%= $c->render_to_string(inline => $actionRemove) %>
			</td>
    	</tr>
    %    }
    	</tbody>
    	</table>
	<%} %>
	</p>


</div>
