159 lines
7.3 KiB
Smarty
Executable File
159 lines
7.3 KiB
Smarty
Executable File
|
|
{foreach from=$USER_LIST key=k item=v}
|
|
<li>
|
|
<a href="index.php?module=Users&action=DetailView&record={$v.user_id}">{$v.user_name}</a>
|
|
{*brak akceptacji*}
|
|
{if $v.accepted == '0'}
|
|
{*brak akceptacji i brak opisu i jest sie zalogowanym uzytkownikiem*}
|
|
{if $v.accepted_description == '' && $v.user_id eq $CURRENT_USER}
|
|
<input type="button" id="userListButton"
|
|
value="Akceptuj" onclick="$('#userDiv').toggle('slow');">
|
|
<div id="userDiv" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Opis</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td>
|
|
<textarea id="userAcceptDes" rows="4" style="width: 100%"></textarea>
|
|
<select id="statusik">
|
|
<option value='1'>Akceptuj</option>
|
|
<option value='0'>Oczekuj</option>
|
|
<option value='2'>Odrzuć</option>
|
|
</select>
|
|
<input type="button"
|
|
id="userSaveDes"
|
|
value="Zapisz"
|
|
onclick="location.href = 'index.php?module=Documents&action=accept&status=' + $('#statusik :selected').val() + '&record={$v.id}&user_id={$v.user_id}&doc_id={$v.document_id}&des=' + $('#userAcceptDes').val() + ''"
|
|
>
|
|
<input type="button" id="userListCancel" value="Anuluj" onclick="$('#userDiv').toggle('slow');">
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{/if}
|
|
{*brak akceptacji i jest opis i jest sie zalogowanym uzytkownikiem*}
|
|
{if $v.accepted_description != '' && $v.user_id eq $CURRENT_USER}
|
|
<input type="button" id="userListButton"
|
|
value="Zmień status" onclick="$('#userDiv').toggle('slow');">
|
|
Status: Oczekuje {$v.date_accepted|date_format:"%d.%m.%Y %H.%M:%S"}
|
|
<div id="userDiv" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Opis</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
{$v.accepted_description|replace:'XVZC':'<br>'}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td>
|
|
<textarea id="userAcceptDes" rows="4" style="width: 100%"></textarea>
|
|
<select id="statusik">
|
|
<option value='1'>Akceptuj</option>
|
|
<option value='0'>Oczekuj</option>
|
|
<option value='2'>Odrzuć</option>
|
|
</select>
|
|
<input type="button"
|
|
id="userSaveDes"
|
|
value="Zapisz"
|
|
onclick="location.href = 'index.php?module=Documents&action=accept&status=' + $('#statusik :selected').val() + '&record={$v.id}&user_id={$v.user_id}&doc_id={$v.document_id}&des=' + $('#userAcceptDes').val() + ''"
|
|
>
|
|
<input type="button" id="userListCancel" value="Anuluj" onclick="$('#userDiv').toggle('slow');">
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{elseif $v.accepted_description != '' }
|
|
<input type="button" id="userListButton"
|
|
value="Pokaż opis" onclick="$('#userDiv').toggle('slow');">
|
|
Status: Oczekuje {$v.date_accepted|date_format:"%d.%m.%Y %H.%M:%S"}
|
|
<div id="userDiv" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Opis</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td>
|
|
{$v.accepted_description|replace:'XVZC':'<br>'}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="button" id="userListCancel" value="Zamknij opis" onclick="$('#userDiv').toggle('slow');">
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
{*Jest akceptacja bądź odrzucony*}
|
|
{if $v.accepted == '1'}
|
|
<input type="button" id="userShowDes"
|
|
value="Pokaż opis" onclick="$('#userDess_{$v.id}').toggle('slow');">
|
|
Status: Zaakceptowano {$v.date_accepted|date_format:"%d.%m.%Y %H.%M:%S"}
|
|
<div id="userDess_{$v.id}" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Opis</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td>
|
|
{$v.accepted_description|replace:'XVZC':'<br>'}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="button" id="userListCancel" value="Zamknij opis" onclick="$('#userDess_{$v.id}').toggle('slow');">
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{/if}
|
|
{if $v.accepted == '2'}
|
|
<input type="button" id="userShowDes"
|
|
value="Pokaż opis" onclick="$('#userDess_{$v.id}').toggle('slow');">
|
|
Status: Odrzucono {$v.date_accepted|date_format:"%d.%m.%Y %H.%M:%S"}
|
|
<div id="userDess_{$v.id}" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Opis</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td>
|
|
{$v.accepted_description|replace:'XVZC':'<br>'}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="button" id="userListCancel" value="Zamknij opis" onclick="$('#userDess_{$v.id}').toggle('slow');">
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{/if}</li>
|
|
{/foreach}
|