Changes 2

This commit is contained in:
Kanchan Chauhan 2016-04-15 14:52:23 +05:30
parent 2dbf5294a9
commit 704f248952
9 changed files with 27 additions and 22 deletions

View File

@ -677,6 +677,7 @@ def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context) list_context = get_list_context(context)
list_context["title"] = _("My Invoices") list_context["title"] = _("My Invoices")
list_context["show_sidebar"] = True
return list_context return list_context
@frappe.whitelist() @frappe.whitelist()

View File

@ -7,6 +7,8 @@ from __future__ import unicode_literals
import frappe import frappe
from frappe.website.website_generator import WebsiteGenerator from frappe.website.website_generator import WebsiteGenerator
from frappe.utils import quoted
from frappe.utils.user import get_fullname_and_avatar
from frappe import _ from frappe import _
class JobOpening(WebsiteGenerator): class JobOpening(WebsiteGenerator):
@ -15,6 +17,9 @@ class JobOpening(WebsiteGenerator):
condition_field = "publish", condition_field = "publish",
page_title_field = "job_title", page_title_field = "job_title",
) )
def get_route(self):
return 'jobs/' + quoted(self.page_name)
def get_context(self, context): def get_context(self, context):
context.parents = [{'name': 'jobs', 'title': _('All Jobs') }] context.parents = [{'name': 'jobs', 'title': _('All Jobs') }]
@ -22,3 +27,4 @@ class JobOpening(WebsiteGenerator):
def get_list_context(context): def get_list_context(context):
context.title = _("Jobs") context.title = _("Jobs")
context.introduction = _('Current Job Openings') context.introduction = _('Current Job Openings')
context.show_sidebar=True

View File

@ -160,11 +160,13 @@ def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
def get_list_context(context=None): def get_list_context(context=None):
return { return {
"show_sidebar": True,
"title": _("My Projects"), "title": _("My Projects"),
"get_list": get_project_list, "get_list": get_project_list,
"row_template": "templates/includes/projects/project_row.html" "row_template": "templates/includes/projects/project_row.html"
} }
@frappe.whitelist() @frappe.whitelist()
def get_cost_center_name(project): def get_cost_center_name(project):
return frappe.db.get_value("Project", project, "cost_center") return frappe.db.get_value("Project", project, "cost_center")

View File

@ -44,13 +44,12 @@ $.extend(shopping_cart, {
var cart_count = getCookie("cart_count"); var cart_count = getCookie("cart_count");
if($(".cart-icon").length == 0) { if($(".cart-icon").length == 0) {
$('<div class="cart-icon" style="float:right;padding-top:5px;padding-right:10px;padding-left:10px;border-radius:10px;\ $('<div class="cart-icon small" style="float:right;padding:3px;border-radius:10px;\
border: 2px solid #2fa5d6;color:#2fa5d6;">\ border: 1px solid #78D6FF;">\
<a href="/cart" style="color:#2fa5d6;">\ <a href="/cart" style="color:#78D6FF; text-decoration: none">\
<i class="icon-shopping-cart"></i> <span style="\ Cart\
position: relative; bottom: 2ex; font-size: 75%; margin-left:-12px;" id="cart-count"></span> Cart\ <span style="color:#78D6FF;" class="badge" id="cart-count">5</span>\
</div>\ </a></div>').appendTo($('.shopping-cart'))
</a></div>').appendTo($('.hidden-xs'))
} }
var $cart = $('.cart-icon'); var $cart = $('.cart-icon');

View File

@ -310,6 +310,7 @@ class SalesOrder(SellingController):
def get_list_context(context=None): def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context) list_context = get_list_context(context)
list_context["show_sidebar"] = True
list_context["title"] = _("My Orders") list_context["title"] = _("My Orders")
list_context["parents"] = [{"title": _("My Account"), "name": "me"}] list_context["parents"] = [{"title": _("My Account"), "name": "me"}]
return list_context return list_context

View File

@ -330,6 +330,7 @@ def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context) list_context = get_list_context(context)
list_context["title"] = _("My Shipments") list_context["title"] = _("My Shipments")
list_context["show_sidebar"] = True
return list_context return list_context
def get_invoiced_qty_map(delivery_note): def get_invoiced_qty_map(delivery_note):

View File

@ -57,7 +57,8 @@ def get_list_context(context=None):
return { return {
"title": _("My Issues"), "title": _("My Issues"),
"get_list": get_issue_list, "get_list": get_issue_list,
"row_template": "templates/includes/issue_row.html" "row_template": "templates/includes/issue_row.html",
"show_sidebar": True
} }
def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20): def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20):

View File

@ -10,8 +10,9 @@
{% block page_content %} {% block page_content %}
{%- if description -%}
<div>{{ description }}</div> <div>{{ description }}</div>
{% endif %}
<p> <p>
<a class='btn btn-primary' <a class='btn btn-primary'
href='/job_application?job_title={{ doc.name }}'> href='/job_application?job_title={{ doc.name }}'>

View File

@ -1,23 +1,16 @@
<div class="web-list-item"> <div class="web-list-item">
<a href="/{{ pathname }}/{{ doc.name }}"> <a href="/{{ pathname }}/{{ doc.name }}">
<div class="row"> <div class="row">
<div class="col-sm-8 col-xs-7"> <div class="col-sm-6">
<div class="row">
<div class="col-sm-9"> <span class="indicator {{ doc.indicator_color or "darkgrey" }}">{{ doc.name }}</span>
<div>{{ doc.name }}</div>
<div class="small text-muted">{{ doc.items_preview }}</div> <div class="small text-muted">{{ doc.items_preview }}</div>
</div>
<div class="col-sm-3">
<span class="indicator {{ doc.indicator_color or "darkgrey" }}">
{{ doc.indicator_title or doc.status or "Submitted" }}
</span>
</div>
</div>
</div> </div>
<div class="col-sm-2 col-xs-5 text-right"> <div class="col-sm-3 col-xs-5">
{{ doc.get_formatted("grand_total") }} {{ doc.get_formatted("grand_total") }}
</div> </div>
<div class="col-sm-2 small text-muted text-right" title="{{ frappe.utils.format_datetime(doc.creation, "medium") }}"> <div class="col-sm-3 small text-muted text-right" title="{{ frappe.utils.format_datetime(doc.creation, "medium") }}">
{{ frappe.utils.pretty_date(doc.creation) }}</div> {{ frappe.utils.pretty_date(doc.creation) }}</div>
</div> </div>
</a> </a>