* fixes created timestamp in detail views where modified needs to be displayed * adds fallback timestamp if data has not been edited, yet --> show created timestamp * fixes bug where deleting of certain data didn't redirect to the index view * adds quality_check() method for EMA, needed for recording * adds all functions which are provided for compensations to EMA * adds/updates translations
		
			
				
	
	
		
			61 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% load i18n l10n fontawesome_5 humanize %}
 | 
						|
<div id="actions" class="card">
 | 
						|
    <div class="card-header rlp-r">
 | 
						|
        <div class="row">
 | 
						|
            <div class="col-sm-6">
 | 
						|
                <h5>
 | 
						|
                    <span class="badge badge-light">{{obj.actions.count}}</span>
 | 
						|
                    {% trans 'Actions' context 'Compensation' %}
 | 
						|
                </h5>
 | 
						|
            </div>
 | 
						|
            <div class="col-sm-6">
 | 
						|
                <div class="d-flex justify-content-end">
 | 
						|
                    {% if is_default_member and has_access  %}
 | 
						|
                    <button class="btn btn-outline-default btn-modal" data-form-url="{% url 'ema:new-action' obj.id %}" title="{% trans 'Add new action' %}">
 | 
						|
                        {% fa5_icon 'plus' %}
 | 
						|
                        {% fa5_icon 'seedling' %}
 | 
						|
                    </button>
 | 
						|
                    {% endif %}
 | 
						|
                </div>
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
    <div class="card-body scroll-300">
 | 
						|
        <table class="table table-hover">
 | 
						|
            <thead>
 | 
						|
            <tr>
 | 
						|
                <th scope="col">
 | 
						|
                    {% trans 'Action type' %}
 | 
						|
                </th>
 | 
						|
                <th scope="col">
 | 
						|
                    {% trans 'Amount' context 'Compensation' %}
 | 
						|
                </th>
 | 
						|
                <th scope="col">
 | 
						|
                    {% trans 'Comment' %}
 | 
						|
                </th>
 | 
						|
                <th scope="col">
 | 
						|
                    {% trans 'Action' %}
 | 
						|
                </th>
 | 
						|
            </tr>
 | 
						|
            </thead>
 | 
						|
            <tbody>
 | 
						|
            {% for action in obj.actions.all %}
 | 
						|
            <tr>
 | 
						|
                <td class="align-middle">
 | 
						|
                    {{ action.action_type }}
 | 
						|
                </td>
 | 
						|
                <td class="align-middle">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
 | 
						|
                <td class="align-middle">{{ action.comment|default_if_none:"" }}</td>
 | 
						|
                <td>
 | 
						|
                    {% if is_default_member and has_access  %}
 | 
						|
                    <button data-form-url="{% url 'ema:action-remove' action.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove action' %}">
 | 
						|
                        {% fa5_icon 'trash' %}
 | 
						|
                    </button>
 | 
						|
                    {% endif %}
 | 
						|
                </td>
 | 
						|
            </tr>
 | 
						|
            {% endfor %}
 | 
						|
            </tbody>
 | 
						|
        </table>
 | 
						|
    </div>
 | 
						|
</div> |