Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
| 2 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 3 | {% block title %} |
| 4 | {{ doc.project_name }} |
| 5 | {% endblock %} |
| 6 | |
| 7 | {% block head_include %} |
Suraj Shetty | f0e8a51 | 2022-07-06 15:10:39 +0530 | [diff] [blame] | 8 | <link rel="stylesheet" href="/assets/frappe/css/fonts/fontawesome/font-awesome.min.css"> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 9 | {% endblock %} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 10 | |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 11 | {% block header %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 12 | <h3 class="my-account-header">{{ doc.project_name }}</h3> |
Kanchan Chauhan | 2ad801c | 2016-03-22 16:00:41 +0530 | [diff] [blame] | 13 | {% endblock %} |
| 14 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 15 | {% block style %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 16 | <style> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 17 | {% include "templates/includes/projects.css" %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 18 | </style> |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 19 | {% endblock %} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 20 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 21 | {% block page_content %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 22 | <div class="web-list-item transaction-list-item"> |
| 23 | <div class="row align-items-center"> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 24 | <div class="col-sm-4 "><b>{{ _("Status") }}: {{ _(doc.status) }}</b></div> |
| 25 | <div class="col-sm-4 "><b>{{ _("Progress") }}: {{ doc.get_formatted("percent_complete") }}</b></div> |
| 26 | <div class="col-sm-4 "><b>{{ _("Hours Spent") }}: {{ doc.get_formatted("actual_time") }}</b></div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 27 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 28 | </div> |
Rushabh Mehta | c20c536 | 2016-03-25 17:19:28 +0530 | [diff] [blame] | 29 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 30 | {{ progress_bar(doc.percent_complete) }} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 31 | |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 32 | <hr> |
| 33 | |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 34 | <div class="row align-items-center"> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 35 | <div class="col-sm-6 my-account-header"> <h4>{{ _("Tasks") }}</h4></div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 36 | <div class="col-sm-6 text-right"> |
| 37 | <a class="btn btn-secondary btn-light btn-sm" href='/tasks/new?project={{ doc.project_name }}'>{{ _("New task") }}</a> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 38 | </div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 39 | </div> |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 40 | {% if doc.tasks %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 41 | <div class="website-list"> |
| 42 | <div class="result"> |
| 43 | <div class="web-list-item transaction-list-item"> |
| 44 | <div class="row align-items-center"> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 45 | <div class="col-sm-4"><b>{{ _("Tasks") }}</b></div> |
| 46 | <div class="col-sm-2"><b>{{ _("Status") }}</b></div> |
| 47 | <div class="col-sm-2"><b>{{ _("End Date") }}</b></div> |
| 48 | <div class="col-sm-2"><b>{{ _("Assignment") }}</b></div> |
| 49 | <div class="col-sm-2"><b>{{ _("Modified On") }}</b></div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 50 | </div> |
| 51 | </div> |
| 52 | {% include "erpnext/templates/includes/projects/project_tasks.html" %} |
| 53 | </div> |
| 54 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 55 | {% else %} |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 56 | {{ empty_state(_("Task")) }} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 57 | {% endif %} |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 58 | |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 59 | <h4 class="my-account-header">{{ _("Timesheets") }}</h4> |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 60 | {% if doc.timesheets %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 61 | <div class="website-list"> |
| 62 | <div class="result"> |
| 63 | <div class="web-list-item transaction-list-item"> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 64 | <div class="row align-items-center"> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 65 | <div class="col-xs-2"><b>{{ _("Timesheet") }}</b></div> |
| 66 | <div class="col-xs-2"><b>{{ _("Status") }}</b></div> |
| 67 | <div class="col-xs-2"><b>{{ _("From") }}</b></div> |
| 68 | <div class="col-xs-2"><b>{{ _("To") }}</b></div> |
| 69 | <div class="col-xs-2"><b>{{ _("Modified By") }}</b></div> |
| 70 | <div class="col-xs-2"><b>{{ _("Modified On") }}</b></div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 71 | </div> |
| 72 | </div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 73 | {% include "erpnext/templates/includes/projects/project_timesheets.html" %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 74 | </div> |
| 75 | </div> |
| 76 | {% else %} |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 77 | {{ empty_state(_("Timesheet")) }} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 78 | {% endif %} |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 79 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 80 | {% if doc.attachments %} |
| 81 | <div class='padding'></div> |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 82 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 83 | <h4>{{ _("Attachments") }}</h4> |
| 84 | <div class="project-attachments"> |
| 85 | {% for attachment in doc.attachments %} |
| 86 | <div class="attachment"> |
| 87 | <a class="no-decoration attachment-link" href="{{ attachment.file_url }}" target="blank"> |
| 88 | <div class="row"> |
| 89 | <div class="col-xs-9"> |
| 90 | <span class="indicator red file-name"> |
| 91 | {{ attachment.file_name }}</span> |
| 92 | </div> |
| 93 | <div class="col-xs-3"> |
| 94 | <span class="pull-right file-size">{{ attachment.file_size }}</span> |
| 95 | </div> |
| 96 | </div> |
| 97 | </a> |
| 98 | </div> |
| 99 | {% endfor %} |
| 100 | </div> |
| 101 | {% endif %} |
JodeQ | 10dfd4a | 2018-09-10 13:40:43 +0200 | [diff] [blame] | 102 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 103 | </div> |
| 104 | |
| 105 | <script> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 106 | { % include "frappe/public/js/frappe/provide.js" % } |
| 107 | { % include "frappe/public/js/frappe/form/formatters.js" % } |
| 108 | </script> |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 109 | |
Kanchan Chauhan | e14389e | 2016-03-23 14:14:38 +0530 | [diff] [blame] | 110 | {% endblock %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 111 | |
| 112 | {% macro progress_bar(percent_complete) %} |
| 113 | {% if percent_complete %} |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 114 | <span class="small py-2">{{ _("Project Progress:") }}</span> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 115 | <div class="progress progress-hg" style="height: 15px;"> |
| 116 | <div |
| 117 | class="progress-bar progress-bar-{{ 'warning' if percent_complete|round < 100 else 'success' }} active"\ |
| 118 | role="progressbar" aria-valuenow="{{ percent_complete|round|int }}" aria-valuemin="0"\ |
| 119 | aria-valuemax="100" style="width:{{ percent_complete|round|int }}%;"> |
| 120 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 121 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 122 | {% endif %} |
| 123 | {% endmacro %} |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 124 | |
| 125 | |
| 126 | {% macro empty_state(section_name) %} |
| 127 | <div class="frappe-list align-items-center"> |
| 128 | <div class=" text-muted flex justify-center align-center" style=""> |
| 129 | <div class=" text-muted flex text-center"> |
| 130 | <div class="msg-box no-border"> |
| 131 | <div> |
| 132 | <img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"> |
| 133 | </div> |
barredterra | e72afd0 | 2023-10-29 17:48:48 +0100 | [diff] [blame^] | 134 | <p>{{ _("You haven't created a {0} yet").format(section_name) }}</p> |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 135 | </div> |
| 136 | </div> |
| 137 | </div> |
| 138 | </div> |
| 139 | {% endmacro %} |