WIP Collaborative Project Management first commit
diff --git a/erpnext/templates/includes/cart.css b/erpnext/templates/includes/cart.css
index 7a18530..07302db 100644
--- a/erpnext/templates/includes/cart.css
+++ b/erpnext/templates/includes/cart.css
@@ -23,3 +23,10 @@
margin-top: 80px;
margin-bottom: 60px;
}
+
+.cart-link {
+ margin-top: 40px;
+ text-align: right;
+
+
+}
\ No newline at end of file
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 0c29569..9cb5e6e 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -147,3 +147,8 @@
$(".cart-icon").hide();
shopping_cart.bind_events();
});
+
+function show_terms() {
+ var html = $(".cart-terms").html();
+ frappe.msgprint(html);
+}
diff --git a/erpnext/templates/includes/project_row.html b/erpnext/templates/includes/project_row.html
new file mode 100644
index 0000000..3c7331b
--- /dev/null
+++ b/erpnext/templates/includes/project_row.html
@@ -0,0 +1,29 @@
+{% if doc.status=="Open" %}
+<div class="web-list-item">
+ <a class="no-decoration" href="/projects?project={{ doc.name }}">
+ <div class="row">
+ <div class="col-xs-4">
+
+ {{ doc.name }}
+ </div>
+ <div class="col-xs-4">
+ {% if doc.percent_complete %}
+ <div class="progress" style="margin-bottom: 0!important;">
+ <div class="progress-bar progress-bar-warning" role="progressbar"
+ aria-valuenow="{{ doc.percent_complete|round|int }}"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{ doc.percent_complete|round|int }}%;">
+ {{ doc.percent_complete|round|int }}% Complete
+ </div>
+ </div>
+ {% else %}
+ <span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">
+ {{ doc.status }}</span>
+ {% endif %}
+ </div>
+ <div class="col-xs-4 text-right small text-muted">
+ {{ frappe.utils.pretty_date(doc.modified) }}
+ </div>
+ </div>
+ </a>
+</div>
+{% endif %}
diff --git a/erpnext/templates/includes/project_search_box.html b/erpnext/templates/includes/project_search_box.html
new file mode 100644
index 0000000..8788fcd
--- /dev/null
+++ b/erpnext/templates/includes/project_search_box.html
@@ -0,0 +1,20 @@
+<div class="project-search">
+ <input type="text" id="project-search"
+ placeholder="Search..."><span style="position:relative;
+ left:-19px;"> <a href="/projects?project={{doc.name}}" class="octicon octicon-x text-extra-muted" title="Clear" ></a> </span>
+</div>
+
+<script>
+frappe.ready(function() {
+ var thread = null;
+ function findResult(t) {
+ window.location.href="/projects?project={{doc.name}}&q=" + t;
+ }
+
+ $("#project-search").keyup(function() {
+ clearTimeout(thread);
+ var $this = $(this); thread = setTimeout(function(){findResult($this.val())}, 1000);
+ });
+ $(".form-search").on("submit", function() { return false; });
+});
+</script>
\ No newline at end of file
diff --git a/erpnext/templates/includes/projects.css b/erpnext/templates/includes/projects.css
new file mode 100644
index 0000000..e080880
--- /dev/null
+++ b/erpnext/templates/includes/projects.css
@@ -0,0 +1,132 @@
+/* CSS used here will be applied after bootstrap.css */
+
+.underline {
+ text-decoration: underline;
+}
+
+.page-container .indicator {
+ font-weight: normal;
+}
+
+.page-container .project-item {
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+.row-header {
+ font-size: 14px;
+ font-weight: 500;
+ padding-bottom: 8px;
+ border-bottom: 2px solid #d1d8dd;
+ margin: 0!important;
+}
+
+.content_display{
+ padding: 5px;
+}
+
+.task-btn, .issue-btn, .timelog-btn{
+ padding: 8px;
+}
+
+.timeline-centered {
+ position: relative;
+ margin-bottom: 30px;
+}
+
+.timeline-centered:before {
+ content: '';
+ position: absolute;
+ display: block;
+ width: 4px;
+ background: #f5f5f6;
+ /*left: 50%;*/
+ top: 20px;
+ bottom: 20px;
+ margin-left: 30px;
+}
+
+.timeline-centered .timeline-entry {
+ position: relative;
+ /*width: 50%;
+float: right;*/
+ margin-top: 5px;
+ margin-left: 30px;
+ margin-bottom: 10px;
+ clear: both;
+}
+
+
+
+.timeline-centered .timeline-entry.left-aligned .timeline-entry-inner .timeline-label:after {
+ left: auto;
+ right: 0;
+ margin-left: 0;
+ margin-right: -9px;
+ -moz-transform: rotate(180deg);
+ -o-transform: rotate(180deg);
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+
+.timeline-centered .timeline-entry .timeline-entry-inner {
+ position: relative;
+ margin-left: -20px;
+}
+
+
+.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon {
+ background: #fff;
+ color: #737881;
+ display: block;
+ width: 40px;
+ height: 40px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ -webkit-border-radius: 20px;
+ -moz-border-radius: 20px;
+ border-radius: 20px;
+ text-align: center;
+ -moz-box-shadow: 0 0 0 5px #f5f5f6;
+ -webkit-box-shadow: 0 0 0 5px #f5f5f6;
+ box-shadow: 0 0 0 5px #f5f5f6;
+ line-height: 40px;
+ font-size: 15px;
+ float: left;
+}
+
+
+.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-warning {
+ background-color: #fad839;
+ color: #fff;
+}
+
+
+.timeline-centered .timeline-entry .timeline-entry-inner .timeline-label {
+ position: relative;
+ background: #f5f5f6;
+ padding: 1em;
+ margin-left: 60px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.timeline-centered .timeline-entry .timeline-entry-inner .timeline-label:after {
+ content: '';
+ display: block;
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 9px 9px 9px 0;
+ border-color: transparent #f5f5f6 transparent transparent;
+ left: 0;
+ top: 10px;
+ margin-left: -9px;
+}
diff --git a/erpnext/templates/includes/projects/project_issues.html b/erpnext/templates/includes/projects/project_issues.html
new file mode 100644
index 0000000..14ce70f
--- /dev/null
+++ b/erpnext/templates/includes/projects/project_issues.html
@@ -0,0 +1,31 @@
+{% for issue in doc.issues %}
+ <div class='issue'>
+ <div class='row project-item'>
+ <div class='col-xs-9'>
+ <a class="no-decoration" href="/issues-view?name={{ issue.name}}">
+ <span class="indicator {{ "green" if issue.status=="Open" else "darkgrey" }}">
+ {% if issue.status == "Closed" %}
+ {{ issue.subject }} resolved {{ frappe.utils.pretty_date(issue.resolution_date) }}
+ {% else %}
+ {{ issue.subject }} raised on {{ issue.opening_date }}
+ {% endif %}
+ </span>
+ </a>
+ </div>
+ <div class='col-xs-3'>
+ <div class='pull-right'>
+ {% if issue.todo %}
+ <span class="avatar avatar-small" title="{{ issue.todo.owner }}"> <img src="{{ issue.todo.user_image }}"></span>
+ {% else %}
+ <span class="avatar avatar-small avatar-empty"></span>
+ {% endif %}
+ </div>
+ <div class='pull-right' style='padding-right:10px;'>
+ {% if issue.status != "Closed" %}
+ <span class="text-extra-muted "> <i class="octicon octicon-x issue-x" title="Close" id = "{{issue.name}}"></i> </span>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+{% endfor %}
diff --git a/erpnext/templates/includes/projects/project_tasks.html b/erpnext/templates/includes/projects/project_tasks.html
new file mode 100644
index 0000000..84de0e8
--- /dev/null
+++ b/erpnext/templates/includes/projects/project_tasks.html
@@ -0,0 +1,30 @@
+{% for task in doc.tasks %}
+ <div class='task'>
+ <div class='row project-item'>
+ <div class='col-xs-9'>
+ <a class="no-decoration" href="/tasks-view?name={{ task.name}}">
+ <span class="indicator {{ "green" if task.status=="Open" else "darkgrey" }}">
+ {% if task.status == "Closed" %}
+ {{ task.subject }} completed on {{ task.closing_date }}
+ {% else %}
+ {{ task.subject }}
+ {% endif %}
+ </span>
+ </a>
+ </div>
+ <div class='col-xs-3'>
+ <div class='pull-right'>
+ {% if task.todo %} <span class="avatar avatar-small" title="{{ task.todo.owner }}"> <img src="{{ task.todo.user_image }}"></span>
+ {% else %}
+ <span class="avatar avatar-small avatar-empty"></span>
+ {% endif %}
+ </div>
+ <div class='pull-right' style='padding-right:10px;'>
+ {% if task.status != "Closed" %}
+ <span class="text-extra-muted "> <i class="octicon octicon-x task-x" title="Close" id = "{{task.name}}"></i> </span>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/projects/project_timelogs.html b/erpnext/templates/includes/projects/project_timelogs.html
new file mode 100644
index 0000000..4934032
--- /dev/null
+++ b/erpnext/templates/includes/projects/project_timelogs.html
@@ -0,0 +1,20 @@
+{% for timelog in doc.timelogs %}
+<div class='timelog'>
+ <div class='row project-item'>
+ <div class='col-xs-9'>
+ <a class="no-decoration" href="/timelog_info?timelog={{ timelog.name}}">
+ <span class="indicator {{ "green" if timelog.status=="Draft" else "blue" if timelog.status=="Submitted" else "darkgrey"}}">
+
+ {{ timelog.title }}: From {{ frappe.format_date(timelog.from_time) }} to {{ frappe.format_date(timelog.to_time) }}
+
+</span>
+ </a>
+ </div>
+ <div class='col-xs-3'>
+ <div class='pull-right'>
+ <span class="avatar avatar-small" title="{{ timelog.modified_by }}"> <img src="{{ timelog.user_image }}"></span>
+ </div>
+ </div>
+ </div>
+</div>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/projects/timeline.html b/erpnext/templates/includes/projects/timeline.html
new file mode 100644
index 0000000..77b0c76
--- /dev/null
+++ b/erpnext/templates/includes/projects/timeline.html
@@ -0,0 +1,44 @@
+{% for timeline in doc.timelines %}
+<div class='timeline'>
+ <div class="row project-item">
+ <div class="col-xs-12">
+ <span class="avatar avatar-small" title="{{ timeline.modified_by }}"> <img src="{{ timeline.user_image }}"></span>
+ <span class='indicator'>
+ {{timeline.reference_name}} {{timeline.subject }}
+ </span>
+ <span class='indicator pull-right'>
+ {{ frappe.utils.pretty_date(timeline.creation) }}
+ </span>
+ </div>
+ </div>
+</div>
+{% endfor %}
+<!-- <div class="timeline-centered">
+{% for timeline in doc.timelines %}
+
+
+
+ <article class="timeline-entry">
+
+ <div class="timeline-entry-inner">
+
+ <div class="timeline-icon bg-warning">
+ <i class="entypo-camera"></i>
+ </div>
+
+ <div class="timeline-label">
+ <span class="avatar avatar-small" title="{{ timeline.modified_by }}"> <img src="{{ timeline.user_image }}"></span>
+ <span class='indicator'>
+ {{timeline.reference_name}} {{timeline.subject }}
+ </span>
+ <span class='indicator pull-right'>
+ {{ frappe.utils.pretty_date(timeline.creation) }}
+ </span>
+ </div>
+ </div>
+
+ </article>
+
+
+{% endfor %}
+</div> -->
\ No newline at end of file