Skip to content

Commit

Permalink
añadidos los search table que se me olvidaron xD
Browse files Browse the repository at this point in the history
  • Loading branch information
anddonram committed Jul 2, 2017
1 parent af3985d commit 9d11bd0
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Metronus-Project/metronus/templates/employee/employee_search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% load i18n %}
{% load l10n %}

{% block content %}
{% for employee in employees %}
<tr>
<td >
{% if employee.picture %}
<img src="{{ MEDIA_URL }}{{employee.picture}}" alt="{{user.get_username}}" class="avatar" alt="IMG">
{% else %}
<img src="/static/avatar.png" alt="{{user.get_username}}" class="avatar" alt="IMG">
{% endif %}
&nbsp;
<span class="searchable">
{{employee.user.first_name }} {{employee.user.last_name}}
</span>
</td>
<td>{{employee.user.email}}</td>
<td>{{employee.phone}}</td>
<td class="hidden-xs">{{employee.registryDate}}</td>
<td>
<a href="{% url 'employee_view' employee.user.username %}" type="button" class="btn btn-success">{% trans 'details' %}</a>
</td>
<td class="hidden-xs">
{% if actor_is_admin or actor_is_executive %}
<a href="{% url 'employee_edit' employee.user.username %}" type="button" class="btn btn-dark">{% trans 'update' %}</a>
{% endif %}
</td>
<td class="hidden-xs">
{% if actor_is_admin or actor_is_executive %}
<a href="#" class="btn btn-danger" data-href="{% url 'employee_delete' employee.user.username %}"
data-toggle="modal" data-target="#confirm-delete">{% trans 'fire' %}</a>
{% endif %}
</td>
</tr>
{% endfor %}
{% endblock %}
26 changes: 26 additions & 0 deletions Metronus-Project/metronus/templates/project/project_search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% load i18n %}
{% load l10n %}

{% block content %}
{% for project in projects %}
<tr>
<td class="searchable">{{project.name}}</td>
<td>
<a href="{% url 'project_view' project.id %}" type="button" class="btn btn-success">
{% trans 'details' %}
</a>
</td>
{% if actor_is_admin or actor_is_executive %}
<td class="hidden-xs">
<a href="{% url 'project_edit' project.id %}" type="button" class="btn btn-dark">
{% trans 'update' %}
</a>
</td>
<td class="hidden-xs">
<a href="#" class="btn btn-danger" data-href="{% url 'project_delete' project.id %}" data-toggle="modal" data-target="#confirm-delete">{% trans 'delete' %}</a>
</td>
{% endif %}
</tr>
{% endfor %}

{% endblock %}
30 changes: 30 additions & 0 deletions Metronus-Project/metronus/templates/task/task_search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% load i18n %}
{% load l10n %}

{% block content %}
{% for task in tasks %}
<tr>
<td class="searchable">{{task.name}}</td>
<td>{{task.projectDepartment_id.project_id.name}} / {{task.projectDepartment_id.department_id.name}}</td>
<td>{{task.actor_id.user.first_name}} {{task.actor_id.user.last_name}}</td>
<td>{{task.registryDate}}</td>
<td>
<a href="{% url 'task_view' task.id %}" type="button" class="btn btn-success">
{% trans 'details' %}
</a>
</td>
{% if actor_is_admin or actor_is_executive or actor_is_projectManager or actor_is_coordinator%}
<td class="hidden-xs">
<a href="{% url 'task_edit' task.id %}" type="button" class="btn btn-dark">
{% trans 'edit' %}
</a>
</td>
<td class="hidden-xs">
<a href="#" class="btn btn-danger" data-href="{% url 'task_delete' task.id %}"
data-toggle="modal" data-target="#confirm-delete">{% trans 'delete' %}</a>
</td>
{% endif %}
</tr>
{% endfor %}

{% endblock %}

0 comments on commit 9d11bd0

Please sign in to comment.