File "project.html"
Full Path: /home/humancap/cl.humancap.com.my/admin/templates/project.html
File size: 13.45 KB
MIME-type: text/html
Charset: utf-8
<div class="px-4">
{# Partial block debug - rendered alone on the research results #}
{% block object_debug %}
<div id="debug-content">{{ object.debug_content|raw }}</div>
{% endblock object_debug %}
{# END Partial block - rendered alone on the research results #}
<div id="toolbar" class="d-lg-flex flex-wrap justify-content-between">
{% if object.records_count > 0 %}
<div class="d-flex ms-auto order-lg-2">
{{ object.select_number_per_page|raw }}
</div>
<hr class="w-100 d-lg-none">
{% endif %}
<div class="d-flex order-lg-0 mb-3">
{% if object.can_create == true %}
<a href="{{ constant('ADMIN_URL') }}{{ object.item }}/create" class="btn btn-sm me-1 btn-primary d-flex align-items-center"><i class="{{ constant('ICON_PLUS') }} prepend"></i>{{ constant('ADD_NEW') }}</a>
{% endif %}
{% if object.records_count > 0 %}
{{ object.export_data_button|raw }}
{% endif %}
</div>
<div class="order-lg-1 mx-lg-auto">
<form name="rp-search-form" id="rp-search-form" class="form-inline justify-content-center">
<div class="input-group input-group-sm">
<button class="input-group-text btn {{ constant('DEFAULT_BUTTONS_CLASS') }} dropdown-toggle ps-4 pe-3" type="button" data-bs-toggle="dropdown" aria-expanded="false"></button>
<ul id="rp-search-field" class="dropdown-menu">
{% for field_name, field_display_name in object.fields %}
{% set active = '' %}
{% if field_name == attribute(session.rp_search_field, object.table) %}
{% set active = ' active' %}
{% elseif field_name == 'id' %}
{% set active = ' active' %}
{% endif %}
<li><a class="dropdown-item{{ active }}" href="#" rel="noindex" data-value="{{ field_name }}">{{ field_display_name }}</a></li>
{% endfor %}
</ul>
{% set search_value = '' %}
{% if attribute(session.rp_search_string, object.table) is defined %}
{% set search_value = attribute(session.rp_search_string, object.table) %}
{% endif %}
<input id="rp-search" name="rp-search" type="text" value="{{ search_value }}" placeholder="{{ constant('SEARCH') }}" class="form-control form-control-sm flex-grow-1">
<button id="rp-search-submit" class="input-group-text btn {{ constant('DEFAULT_BUTTONS_CLASS') }}" data-ladda-button="true" data-style="zoom-in" type="submit"><span class="ladda-label"><i class="{{ constant('ICON_SEARCH') }}"></i></span></button>
</div>
</form>
</div>
</div>
{# Partial block list - rendered alone on the research results #}
{% block object_list %}
{%
set filtered_class = {
id: 'id' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
name: 'name' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
nama: 'nama' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
company_id: 'company_id' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
username: 'username' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
pwd: 'pwd' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
email_subject: 'email_subject' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
email_template: 'email_template' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
email_subject_third: 'email_subject_third' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':'',
email_template_third: 'email_template_third' in object.active_filtered_fields?' class="' ~ constant('ADMIN_FILTERED_COLUMNS_CLASS') ~ '"':''
}
%}
<div id="{{ object.item }}-list">
{% if object.records_count > 0 %}
<div class="table-data-wrapper">
<table class="table table-data" >
<thead>
<tr class="{{ constant('DEFAULT_TABLE_HEADING_CLASS') }}">
{% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'left' %}
<th>{{ constant('ACTION_CONST') }}</th>
{% endif %}
<th>{{ object.fields.id }}|raw</th>
<th>{{ object.fields.name }}|raw</th>
<th>{{ object.fields.nama }}|raw</th>
<th>{{ object.fields.company_id }}|raw</th>
<th>{{ object.fields.username }}|raw</th>
<th>{{ object.fields.pwd }}|raw</th>
<th>{{ object.fields.email_subject }}|raw</th>
<th>{{ object.fields.email_template }}|raw</th>
<th>{{ object.fields.email_subject_third }}|raw</th>
<th>{{ object.fields.email_template_third }}|raw</th>
<th>Assessment (Position)</th>
{% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'right' %}
<th>{{ constant('ACTION_CONST') }}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for i in range(0, object.records_count - 1) %}
<tr>
{% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'left' %}
<td class="has-btn-group no-ellipsis">
<div class="btn-group">
<a href="#" class="btn btn-sm btn-primary btn-view-record" data-target="{{ object.item }}/view/{{ object.pk_url_params[loop.index0] }}" data-bs-toggle="tooltip" data-bs-title="{{ constant('VIEW_DETAIL') }}"><span class="{{ constant('ICON_VIEW') }} icon-md"></span></a>
{% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
<a href="{{ constant('ADMIN_URL') }}{{ object.item }}/edit/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-warning" data-bs-toggle="tooltip" data-bs-title="{{ constant('EDIT') }}"><span class="{{ constant('ICON_EDIT') }} icon-md"></span></a>
{% endif %}
{% if object.can_create == true %}
<a href="{{ constant('ADMIN_URL') }}{{ object.item }}/delete/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-danger" data-bs-toggle="tooltip" data-bs-title="{{ constant('DELETE_CONST') }}"><span class="{{ constant('ICON_DELETE') }} icon-md"></span></a>
{% endif %}
</div>
</td>
{% endif %}
<td{{ filtered_class.id|raw }}>{{ object.id[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.name|raw }}>{{ object.name[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.nama|raw }}>{{ object.nama[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.company_id|raw }}>{{ object.company_id[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.username|raw }}>{{ object.username[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.pwd|raw }}>{{ object.pwd[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.email_subject|raw }}>{{ object.email_subject[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.email_template|raw }}>{{ object.email_template[ loop.index0 ]|raw }}</td>
<td{{ filtered_class.email_subject_third|raw }}>{{ object.email_subject_third[ loop.index0 ]|replace({'[|]': ' '}) }}</td>
<td{{ filtered_class.email_template_third|raw }}>{{ object.email_template_third[ loop.index0 ]|raw }}</td>
{% if object.external_tables_count > 0 %}
{% for j in range(0, object.external_tables_count - 1) %}
<td class="no-ellipsis">
{% if object.external_rows_count[i][j] > 0 %}
<a class="dropdown-toggle text-nowrap" data-bs-toggle="collapse" href="#{{ object.external_fields[i][j]['uniqid'] }}" rel="noindex" role="button" aria-expanded="false" aria-controls="{{ object.external_fields[i][j]['uniqid'] }}"><small class="badge rounded-pill text-bg-light prepend">{{ object.external_rows_count[i][j] }}</small><span class="show-external">{{ constant('SHOW') }}</span><span class="hide-external">{{ constant('HIDE') }}</span></a>
<div class="collapse mt-2" id="{{ object.external_fields[i][j]['uniqid'] }}">
{{ object.external_add_btn[i][j]|raw }}
<div class="table table-sm text-bg-light">
<div class="thead {{ constant('DEFAULT_TABLE_HEADING_CLASS') }}">
<div class="tr">
{% for field, value in object.external_fields[i][j].fieldnames %}
<div class="th">{{ value }}</div>
{% endfor %}
</div>
</div>
<div class="tbody">
{# Loop records #}
{% for k in range(0, object.external_rows_count[i][j] - 1) %}
<div class="tr">
{# Loop fields #}
{% for field, value in object.external_fields[i][j].fields %}
<div class="td">{{ object.external_fields[i][j].fields[field][k]|raw }}</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
{% else %}
{{ object.external_add_btn[i][j]|raw }}
{% endif %}
</td>
{% endfor %}
{% endif %}
{% if constant('ADMIN_ACTION_BUTTONS_POSITION') == 'right' %}
<td class="has-btn-group no-ellipsis">
<div class="btn-group">
<a href="#" class="btn btn-sm btn-primary btn-view-record" data-target="{{ object.item }}/view/{{ object.pk_url_params[loop.index0] }}" data-bs-toggle="tooltip" data-bs-title="{{ constant('VIEW_DETAIL') }}"><span class="{{ constant('ICON_VIEW') }} icon-md"></span></a>
{% if object.update_record_authorized[object.pk_concat_values[loop.index0]] == true %}
<a href="{{ constant('ADMIN_URL') }}{{ object.item }}/edit/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-warning" data-bs-toggle="tooltip" data-bs-title="{{ constant('EDIT') }}" data-delay="500"><span class="{{ constant('ICON_EDIT') }} icon-md"></span></a>
{% endif %}
{% if object.can_create == true %}
<a href="{{ constant('ADMIN_URL') }}{{ object.item }}/delete/{{ object.pk_url_params[loop.index0] }}" class="btn btn-sm btn-danger" data-bs-toggle="tooltip" data-bs-title="{{ constant('DELETE_CONST') }}" data-delay="500"><span class="{{ constant('ICON_DELETE') }} icon-md"></span></a>
{% endif %}
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div> <!-- END table-responsive -->
{% else %}
<p class="text-semibold">
{{ alert(constant('NO_RECORD_FOUND'), 'alert-info has-icon')|raw }}
</p>
{% endif %}
<div id="pagination-wrapper" class="d-flex justify-content-between p-4">
{{ object.pagination_html|raw }}
</div>
</div> <!-- END {{ object.item }}-list -->
{% endblock object_list %}
{# END Partial block - rendered alone on the research results #}
</div> <!-- END card -->