diff --git a/accounts/templates/accounts.html b/accounts/templates/accounts.html index 8b7231b4..92c90d3f 100644 --- a/accounts/templates/accounts.html +++ b/accounts/templates/accounts.html @@ -1,9 +1,14 @@ {% extends 'sales/base.html' %} {% load staticfiles %} {% load paginate %} -{% block extralinks %} {% load thumbnail %} +{% block extralinks %} + {% endblock %} {% block content %} @@ -145,7 +150,8 @@ {% with tags=each_account.tags.all %} {% if tags %} {% for tag in tags %} - {{ tag.name }} + {{ tag.name }} {% endfor %} {% else %} No Tags @@ -234,7 +240,8 @@ {% with tags=each_account.tags.all %} {% if tags %} {% for tag in tags %} - {{ tag.name }} + {{ tag.name }} {% endfor %} {% else %} No Tags @@ -644,6 +651,12 @@ $("#close-tab").click(function (e) { $("#tab_status").val('Closed'); }) + $(".tag_class_acc").click(function () { + // $(".tag_class_acc").css('cursor', 'pointer') + url = "{% url 'accounts:list' %}" + url = url + "?tag=" + $(this).attr('data-link') + window.location.href = url; + }); // $(".account_modal").click(function (e) { // console.log('clicked') diff --git a/cases/templates/cases.html b/cases/templates/cases.html index 743549e0..f8d5d661 100644 --- a/cases/templates/cases.html +++ b/cases/templates/cases.html @@ -1,6 +1,13 @@ {% extends 'sales/base.html' %} {% load staticfiles %} {% load paginate %} +{% block extralinks %} + +{% endblock %} {% block content %}
diff --git a/common/models.py b/common/models.py index 86eb04de..b5dfa6cf 100644 --- a/common/models.py +++ b/common/models.py @@ -1,3 +1,4 @@ +import arrow import binascii import os import time @@ -280,6 +281,10 @@ class Document(models.Model): def __str__(self): return self.title + @property + def created_on_arrow(self): + return arrow.get(self.created_on).humanize() + def generate_key(): return binascii.hexlify(os.urandom(8)).decode() diff --git a/common/templates/doc_list.html b/common/templates/doc_list.html index 7fe4a533..80c500db 100644 --- a/common/templates/doc_list.html +++ b/common/templates/doc_list.html @@ -4,6 +4,11 @@ {% load thumbnail %} {% block extralinks %} + {% endblock %} {% block content %} @@ -119,7 +124,7 @@ None {% endif %} - {{document.created_on}} + {{document.created_on_arrow}} {{document.status}} {% with document_users=document.shared_to.all %} diff --git a/contacts/templates/contacts.html b/contacts/templates/contacts.html index 077fc5f9..42b98682 100644 --- a/contacts/templates/contacts.html +++ b/contacts/templates/contacts.html @@ -4,6 +4,11 @@ {% load thumbnail %} {% block extralinks %} + {% endblock %} {% block content %} diff --git a/events/models.py b/events/models.py index 2664fa17..d6a0e9a8 100644 --- a/events/models.py +++ b/events/models.py @@ -1,3 +1,5 @@ +import arrow + from django.db import models from django.utils.translation import pgettext_lazy from django.utils.translation import ugettext_lazy as _ @@ -43,3 +45,7 @@ class Event(models.Model): disabled = models.BooleanField(default=False) date_of_meeting = models.DateField(blank=True, null=True) # tags = models.ManyToManyField(Tag) + + @property + def created_on_arrow(self): + return arrow.get(self.created_on).humanize() diff --git a/events/templates/events_list.html b/events/templates/events_list.html index 34c13979..976f7a0b 100644 --- a/events/templates/events_list.html +++ b/events/templates/events_list.html @@ -4,6 +4,11 @@ {% load thumbnail %} {% block extralinks %} + {% endblock %} {% block content %} @@ -179,7 +184,7 @@ {{ event.start_date }} {{ event.date_of_meeting }} {{ event.end_date }} - {{ event.created_on|date:'d-m-Y' }} + {{ event.created_on_arrow }} {% if event.created_by %} {% if event.created_by.profile_pic %} diff --git a/invoices/models.py b/invoices/models.py index 4d2ae3bd..76c196db 100644 --- a/invoices/models.py +++ b/invoices/models.py @@ -1,3 +1,4 @@ +import arrow from django.db import models from django.utils.translation import ugettext_lazy as _ from common.models import Address, User @@ -93,3 +94,7 @@ class Invoice(models.Model): return True else: return False + + @property + def created_on_arrow(self): + return arrow.get(self.created_on).humanize() \ No newline at end of file diff --git a/invoices/templates/invoice_create_1.html b/invoices/templates/invoice_create_1.html index 81ef34ab..f36d1eb3 100644 --- a/invoices/templates/invoice_create_1.html +++ b/invoices/templates/invoice_create_1.html @@ -6,6 +6,12 @@ + {% endblock %}