-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use same view/tables for missions page and consultant missions tab
- Loading branch information
1 parent
da37a2a
commit 93eb53f
Showing
7 changed files
with
90 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{% load i18n %} | ||
<div id="missions-content" class="row mt-2"> | ||
{% if consultant %} | ||
<div class="my-3 d-flex flex-row"> | ||
{% if all %} | ||
<br/><a class="btn btn-primary" id="active-missions" href="#">{% trans "Display only active missions" %}</a><br/><br/> | ||
{% else %} | ||
<br/><a class="btn btn-primary" id="all-missions" href="#">{% trans "Display all missions" %}</a><br/><br/> | ||
{% endif %} | ||
|
||
</div> | ||
{% endif %} | ||
<table id="mission_table" class="table table-striped table-hover table-sm table-bordered" cellspacing="0" width="100%"> | ||
<thead> | ||
<tr> | ||
<th>{% trans "name" %}</th> | ||
<th>{% trans "subsidiary" %}</th> | ||
<th>{% trans "responsible" %}</th> | ||
<th>{% trans "nature" %}</th> | ||
<th>{% trans "Mission id" %}</th> | ||
<th>{% trans "amount (k€)" %}</th> | ||
<th>{% trans "billing mode" %}</th> | ||
<th>{% trans "product" %}</th> | ||
<th>{% trans "Forecast in future" %}</th> | ||
<th>{% trans "Up to date forecast" %}</th> | ||
<th>{% trans "Archiving" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
</tbody> | ||
</table> | ||
|
||
{% with "mission_table" as table_id %} | ||
{% include "core/_datatables.html" %} | ||
{% endwith %} | ||
|
||
<script type="text/JavaScript"> | ||
<!-- | ||
|
||
// Function that process ajax callback | ||
function process_mission_archive(data) { | ||
if (data.error==true) { | ||
alert("{% trans 'Archiving failed' %}"); | ||
} | ||
else { | ||
$("#mission_" + data.id).closest("tr").hide("fast"); | ||
} | ||
}; | ||
{% if consultant %} | ||
// Toggle all or only active missions when embeded in consultant mission tab | ||
$('#all-missions').on("click", function () { | ||
$('#missions-content').load('{% url 'staffing:consultant_all_missions' consultant.id %}'); | ||
}); | ||
$('#active-missions').on("click", function () { | ||
$('#missions-content').load('{% url 'staffing:consultant_missions' consultant.id %}'); | ||
}); | ||
{% endif %} | ||
--> | ||
</script> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters