- Dodatna tabela z operacijami in stanjem (končano/nekončano) - šifrant operacij - možnost določevanje privzetih operacij - Opombe na pozicij dela projekta - Pogled kooperacij na poziciji dela projekta - Izpisano številka kooperacije in kooperant
113 lines
4.6 KiB
Plaintext
113 lines
4.6 KiB
Plaintext
@page
|
|
@model EveryThing.Pages.CodeTableOperations.IndexModel
|
|
|
|
@{
|
|
ViewData["Title"] = "Index";
|
|
Layout = "~/Pages/Layouts/_Layout.cshtml";
|
|
}
|
|
|
|
<h4 class="d-flex justify-content-between align-items-center w-100 font-weight-bold py-1 mb-4">
|
|
<span>
|
|
<span class="text-muted font-weight-light">Operacije /</span> Pregled
|
|
</span>
|
|
</h4>
|
|
|
|
<div class="row">
|
|
<div class="col-12 mb-2 text-right">
|
|
<form method="get">
|
|
<div class="btn-group">
|
|
<input class="form-control" type="text" name="searchString" value="@ViewData["SearchString"]" placeholder="Iskanje..." autocomplete="off">
|
|
<button id="btnSubmit" type="submit" class="btn btn-secondary" aria-label="Osveži" title="Osveži">
|
|
<i class="opacity-75 ion ion-md-refresh"></i>
|
|
</button>
|
|
<div class="btn-group" title="Columns">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-label="Nastavitve" title="Nastavitve">
|
|
<i class="opacity-75 ion ion-md-apps"></i>
|
|
<span class="caret"></span>
|
|
</button>
|
|
@* <div class="dropdown-menu dropdown-menu-right">
|
|
<label class="dropdown-item">
|
|
<input type="checkbox" name="finishedProjects" @ViewData["FinishedProjects"]> <span>Aktivni artikli</span>
|
|
</label>
|
|
</div>*@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<h6 class="card-header">
|
|
Seznam operacij
|
|
</h6>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-100">
|
|
@Html.DisplayNameFor(model => model.Operation[0].Title)
|
|
</th>
|
|
<th class="text-right" style="white-space: nowrap; width: 1%;">
|
|
@Html.DisplayNameFor(model => model.Operation[0].Default)
|
|
</th>
|
|
<th class="text-right" style="white-space: nowrap; width: 1%;"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model.Operation)
|
|
{
|
|
<tr data-idCodeTableOperation="@item.Id">
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Title)
|
|
</td>
|
|
<td class="text-right" style="white-space: nowrap; width: 1%;">
|
|
@Html.DisplayFor(modelItem => item.Default)
|
|
</td>
|
|
<td class="text-right" style="white-space: nowrap; width: 1%;">
|
|
<a class="btn btn-xs icon-btn btn-outline-secondary borderless" href="javascript:;" onclick="editCodeTableOperation(this);" data-toggle="tooltip" data-placement="top" title="Urejanje" data-state="secondary"><i class="fas fa-pencil-alt"></i></a>
|
|
<a class="btn btn-xs icon-btn btn-outline-danger borderless" data-state="danger" href='javascript:;' onclick="deleteCodeTableOperation(this)"><i class="fas fa-times"></i></a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="card-footer py-3 text-right">
|
|
<button type="button" class="btn btn-primary" onclick="addNewCodeTableOperation();" >Vnos operacije</button>
|
|
</div>
|
|
<div id="divModalCodeTableOperationAddEditPlaceholder"></div>
|
|
</div>
|
|
@Html.AntiForgeryToken()
|
|
|
|
@section Scripts {
|
|
<script src="~/js/codeTableOperationHelper.js" asp-append-version="true"></script>
|
|
|
|
<script>
|
|
$('[data-toggle="tooltip"]').tooltip({container: 'table'});
|
|
|
|
function addNewCodeTableOperation() {
|
|
codeTableOperationAddEdit('#divModalCodeTableOperationAddEditPlaceholder', false, null, (idCodeTableOperation) => {
|
|
document.getElementById('btnSubmit').click();
|
|
});
|
|
}
|
|
|
|
function editCodeTableOperation(element) {
|
|
let idCodeTableOperation = parseInt($(element).parent().parent().attr('data-idCodeTableOperation'));
|
|
|
|
codeTableOperationAddEdit('#divModalCodeTableOperationAddEditPlaceholder', true, idCodeTableOperation, (idCodeTableOperation) => {
|
|
document.getElementById('btnSubmit').click();
|
|
});
|
|
}
|
|
|
|
function deleteCodeTableOperation(element) {
|
|
let row = $(element).parent().parent();
|
|
let idCodeTableOperation = parseInt(row.attr('data-idCodeTableOperation'));
|
|
|
|
codeTableOperationDelete(idCodeTableOperation, (idCodeTableOperation) => {
|
|
row.remove();
|
|
});
|
|
}
|
|
</script>
|
|
}
|