blob: 3b8698f4ab2e3699d350aa9b5393bb3027ea1c6b [file] [log] [blame]
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +05301{% extends "templates/web.html" %}
2
Jannat Patel5a425112021-07-01 17:17:34 +05303{% block title %}
4 {{ doc.project_name }}
5{% endblock %}
6
7{% block head_include %}
Suraj Shettyf0e8a512022-07-06 15:10:39 +05308 <link rel="stylesheet" href="/assets/frappe/css/fonts/fontawesome/font-awesome.min.css">
Jannat Patel5a425112021-07-01 17:17:34 +05309{% endblock %}
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +053010
Kanchan Chauhan239b3512016-05-02 11:43:44 +053011{% block header %}
Saurabh80e45822022-11-21 17:42:53 +053012 <h3 class="my-account-header">{{ doc.project_name }}</h3>
Kanchan Chauhan2ad801c2016-03-22 16:00:41 +053013{% endblock %}
14
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +053015{% block style %}
Jannat Patel5a425112021-07-01 17:17:34 +053016 <style>
barredterrae72afd02023-10-29 17:48:48 +010017 {% include "templates/includes/projects.css" %}
Jannat Patel5a425112021-07-01 17:17:34 +053018 </style>
Rushabh Mehtab2269dd2016-03-23 18:28:50 +053019{% endblock %}
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +053020
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +053021{% block page_content %}
Saurabh80e45822022-11-21 17:42:53 +053022 <div class="web-list-item transaction-list-item">
23 <div class="row align-items-center">
barredterrae72afd02023-10-29 17:48:48 +010024 <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>
Saurabh80e45822022-11-21 17:42:53 +053027 </div>
Jannat Patel5a425112021-07-01 17:17:34 +053028 </div>
Rushabh Mehtac20c5362016-03-25 17:19:28 +053029
Jannat Patel5a425112021-07-01 17:17:34 +053030 {{ progress_bar(doc.percent_complete) }}
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +053031
Saurabh80e45822022-11-21 17:42:53 +053032 <hr>
33
Saurabh80e45822022-11-21 17:42:53 +053034 <div class="row align-items-center">
barredterrae72afd02023-10-29 17:48:48 +010035 <div class="col-sm-6 my-account-header"> <h4>{{ _("Tasks") }}</h4></div>
Saurabh80e45822022-11-21 17:42:53 +053036 <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 Patel5a425112021-07-01 17:17:34 +053038 </div>
Saurabh80e45822022-11-21 17:42:53 +053039 </div>
Saurabh5d9960a2022-11-21 19:37:57 +053040 {% if doc.tasks %}
Saurabh80e45822022-11-21 17:42:53 +053041 <div class="website-list">
42 <div class="result">
43 <div class="web-list-item transaction-list-item">
44 <div class="row align-items-center">
barredterrae72afd02023-10-29 17:48:48 +010045 <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>
Saurabh80e45822022-11-21 17:42:53 +053050 </div>
51 </div>
52 {% include "erpnext/templates/includes/projects/project_tasks.html" %}
53 </div>
54 </div>
Jannat Patel5a425112021-07-01 17:17:34 +053055 {% else %}
barredterrae72afd02023-10-29 17:48:48 +010056 {{ empty_state(_("Task")) }}
Jannat Patel5a425112021-07-01 17:17:34 +053057 {% endif %}
Rushabh Mehtab2269dd2016-03-23 18:28:50 +053058
barredterrae72afd02023-10-29 17:48:48 +010059 <h4 class="my-account-header">{{ _("Timesheets") }}</h4>
Saurabh5d9960a2022-11-21 19:37:57 +053060 {% if doc.timesheets %}
Jannat Patel5a425112021-07-01 17:17:34 +053061 <div class="website-list">
62 <div class="result">
63 <div class="web-list-item transaction-list-item">
Saurabh80e45822022-11-21 17:42:53 +053064 <div class="row align-items-center">
barredterrae72afd02023-10-29 17:48:48 +010065 <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 Patel5a425112021-07-01 17:17:34 +053071 </div>
72 </div>
Saurabh80e45822022-11-21 17:42:53 +053073 {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
Jannat Patel5a425112021-07-01 17:17:34 +053074 </div>
75 </div>
76 {% else %}
barredterrae72afd02023-10-29 17:48:48 +010077 {{ empty_state(_("Timesheet")) }}
Jannat Patel5a425112021-07-01 17:17:34 +053078 {% endif %}
Rushabh Mehtab2269dd2016-03-23 18:28:50 +053079
Jannat Patel5a425112021-07-01 17:17:34 +053080 {% if doc.attachments %}
81 <div class='padding'></div>
Rushabh Mehtab2269dd2016-03-23 18:28:50 +053082
Jannat Patel5a425112021-07-01 17:17:34 +053083 <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 %}
JodeQ10dfd4a2018-09-10 13:40:43 +0200102
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +0530103</div>
104
105<script>
Saurabh80e45822022-11-21 17:42:53 +0530106 { % include "frappe/public/js/frappe/provide.js" % }
107 { % include "frappe/public/js/frappe/form/formatters.js" % }
108 </script>
Kanchan Chauhanb3fe6a42016-03-16 18:01:22 +0530109
Kanchan Chauhane14389e2016-03-23 14:14:38 +0530110{% endblock %}
Jannat Patel5a425112021-07-01 17:17:34 +0530111
112{% macro progress_bar(percent_complete) %}
113{% if percent_complete %}
barredterrae72afd02023-10-29 17:48:48 +0100114 <span class="small py-2">{{ _("Project Progress:") }}</span>
Saurabh80e45822022-11-21 17:42:53 +0530115 <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 Patel5a425112021-07-01 17:17:34 +0530121 </div>
Jannat Patel5a425112021-07-01 17:17:34 +0530122{% endif %}
123{% endmacro %}
Saurabh5d9960a2022-11-21 19:37:57 +0530124
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>
barredterrae72afd02023-10-29 17:48:48 +0100134 <p>{{ _("You haven't created a {0} yet").format(section_name) }}</p>
Saurabh5d9960a2022-11-21 19:37:57 +0530135 </div>
136 </div>
137 </div>
138 </div>
139{% endmacro %}