diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index f9ddb12d86..4f42cca73b 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -175,6 +175,7 @@ website_route_rules = [
},
},
{"from_route": "/project", "to_route": "Project"},
+ {"from_route": "/tasks", "to_route": "Task"},
]
standard_portal_menu_items = [
diff --git a/erpnext/templates/includes/projects/project_tasks.html b/erpnext/templates/includes/projects/project_tasks.html
index 2b07a5f0d0..4069d3dcca 100644
--- a/erpnext/templates/includes/projects/project_tasks.html
+++ b/erpnext/templates/includes/projects/project_tasks.html
@@ -1,5 +1,57 @@
+{% macro task_row(task, indent) %}
+
+
+
{{ task.status }}
+
+ {% if task.exp_end_date %}
+ {{ task.exp_end_date }}
+ {% else %}
+ --
+ {% endif %}
+
+
+ {% if task["_assign"] %}
+ {% set assigned_users = json.loads(task["_assign"])%}
+ {% for user in assigned_users %}
+ {% set user_details = frappe.db.get_value("User", user,
+ ["full_name", "user_image"],
+ as_dict = True)%}
+ {% if user_details.user_image %}
+
+
+
+ {% else %}
+
+
+ {{ frappe.utils.get_abbr(user_details.full_name) }}
+
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+
+ {{ frappe.utils.pretty_date(task.modified) }}
+
+
+{% if task.children %}
+ {% for child in task.children %}
+ {{ task_row(child, indent + 30) }}
+ {% endfor %}
+{% endif %}
+{% endmacro %}
+
{% for task in doc.tasks %}
-
Status:
-
Progress:
- {{ doc.percent_complete }}
- %
-
-
Hours Spent:
- {{ doc.actual_time }}
-
+
+
+
Status: {{ doc.status }}
+
Progress: {{ doc.percent_complete }}%
+
Hours Spent: {{ doc.actual_time | round }}
+
{{ progress_bar(doc.percent_complete) }}
- {% if doc.tasks %}
-
-
-
-
-
Tasks
-
Status
-
End Date
-
Assigned To
-
-
-
- {% include "erpnext/templates/includes/projects/project_tasks.html" %}
-
+
+
+
+ {% if doc.tasks %}
+
+
+
+
+
Tasks
+
Status
+
End Date
+
Assignment
+
Modified On
+
+
+ {% include "erpnext/templates/includes/projects/project_tasks.html" %}
+
+
{% else %}
-
{{ _("No Tasks") }}
+ {{ empty_state('Task')}}
{% endif %}
+
{% if doc.timesheets %}
-
-
Timesheets
-
Status
-
From
-
To
-
Modified By
-
Modified On
+
+
Timesheet
+
Status
+
From
+
To
+
Modified By
+
Modified On
- {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
+ {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
{% else %}
-
{{ _("No Timesheets") }}
+ {{ empty_state('Timesheet')}}
{% endif %}
{% if doc.attachments %}
@@ -104,70 +105,37 @@
+ { % include "frappe/public/js/frappe/provide.js" % }
+ { % include "frappe/public/js/frappe/form/formatters.js" % }
+
{% endblock %}
{% macro progress_bar(percent_complete) %}
{% if percent_complete %}
-
-
+
Project Progress:
+
-{% else %}
-
{% endif %}
{% endmacro %}
-{% macro task_row(task, indent) %}
-
-
-
- {% if task.parent_task %}
-
-
-
- {% endif %}
- {{ task.subject }}
+
+{% macro empty_state(section_name) %}
+
+
+
+
+
+

+
+
You haven't created a {{ section_name }} yet
+
+
-
{{ task.status }}
-
- {% if task.exp_end_date %}
- {{ task.exp_end_date }}
- {% else %}
- --
- {% endif %}
-
- {% if task["_assign"] %}
- {% set assigned_users = json.loads(task["_assign"])%}
- {% for user in assigned_users %}
- {% set user_details = frappe.db.get_value("User", user,
- ["full_name", "user_image"],
- as_dict = True)%}
- {% if user_details.user_image %}
-
-
-
- {% else %}
-
-
- {{ frappe.utils.get_abbr(user_details.full_name) }}
-
-
- {% endif %}
- {% endfor %}
- {% endif %}
-
-
- {{ frappe.utils.pretty_date(task.modified) }}
-
-
-{% if task.children %}
- {% for child in task.children %}
- {{ task_row(child, indent + 30) }}
- {% endfor %}
-{% endif %}
-{% endmacro %}
+{% endmacro %}
\ No newline at end of file