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 %}
diff --git a/invoices/templates/invoices_detail_1.html b/invoices/templates/invoices_detail_1.html
index ee3c8c66..48b1db4a 100644
--- a/invoices/templates/invoices_detail_1.html
+++ b/invoices/templates/invoices_detail_1.html
@@ -8,6 +8,10 @@
.opacity_block {
opacity: 0.2;
}
+ .form-group label{
+ font-weight: 800;
+ color:black;
+ }
{% endblock extralinks %}
diff --git a/invoices/templates/invoices_list.html b/invoices/templates/invoices_list.html
index 89f95506..07517048 100644
--- a/invoices/templates/invoices_list.html
+++ b/invoices/templates/invoices_list.html
@@ -4,6 +4,11 @@
{% load thumbnail %}
{% block extralinks %}
+
{% endblock %}
{% block content %}
@@ -183,7 +188,7 @@
None
{% endif %}
-
{{ invoice.created_on|date:'d-m-Y' }}
+
{{ invoice.created_on_arrow }}
diff --git a/leads/templates/leads.html b/leads/templates/leads.html
index 38b07ec2..d74f10f4 100644
--- a/leads/templates/leads.html
+++ b/leads/templates/leads.html
@@ -4,6 +4,11 @@
{% load thumbnail %}
{% block extralinks %}
+
{% endblock %}
{% block content %}
@@ -196,7 +201,7 @@
{% with tags=lead.tags.all %}
{% if tags %}
{% for tag in tags %}
- {{ tag.name }}
+ {{ tag.name }}
{% endfor %}
{% else %}
No Tags
@@ -291,7 +296,7 @@
{% with tags=lead.tags.all %}
{% if tags %}
{% for tag in tags %}
- {{ tag.name }}
+ {{ tag.name }}
{% endfor %}
{% else %}
No Tags
@@ -668,6 +673,14 @@
});
});
+ $(".tag_class_lead").click(function () {
+ // $(".tag_class_opp").css('cursor', 'pointer')
+ url = "{% url 'leads:list' %}"
+ url = url + "?tag=" + $(this).attr('data-link')
+ window.location.href = url;
+ });
+
+
search = "{{search}}"
if (search == 'True') {
diff --git a/leads/views.py b/leads/views.py
index d7aea95d..6da97549 100644
--- a/leads/views.py
+++ b/leads/views.py
@@ -43,6 +43,9 @@ class LeadListView(SalesAccessRequiredMixin, LoginRequiredMixin, TemplateView):
Q(assigned_to__in=[self.request.user]) |
Q(created_by=self.request.user))
+ if self.request.GET.get('tag', None):
+ queryset = queryset.filter(tags__in = self.request.GET.getlist('tag'))
+
request_post = self.request.POST
if request_post:
if request_post.get('name'):
diff --git a/marketing/forms.py b/marketing/forms.py
index 235dd637..e4c1d50c 100644
--- a/marketing/forms.py
+++ b/marketing/forms.py
@@ -17,6 +17,8 @@ email_regex = '^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)
def csv_doc_validate(document):
temp_row = []
invalid_row = []
+ # this stores all the failed csv contacts
+ failed_contacts_csv = []
reader = csv.reader((document.read().decode("utf-8")).splitlines())
# csv_headers = ["first name", "last name", "email"]
csv_headers = ["first name", "email"]
@@ -56,9 +58,11 @@ def csv_doc_validate(document):
each[csv_headers[x_index]] = cell_value
if invalid_each:
invalid_row.append(each)
+ failed_contacts_csv.append(list(each.values()))
else:
temp_row.append(each)
- return {"error": False, "validated_rows": temp_row, "invalid_rows": invalid_row}
+ return {"error": False, "validated_rows": temp_row, "invalid_rows": invalid_row, "headers":csv_headers,
+ "failed_contacts_csv": failed_contacts_csv}
def get_validated_rows(wb, sheet_name, validated_rows, invalid_rows):
@@ -141,14 +145,21 @@ class ContactListForm(forms.ModelForm):
self.fields['contacts_file'].widget.attrs.update({
"accept": ".csv,.xls,.xlsx,.xlsm,.xlsb,.xml",
})
- self.fields['contacts_file'].required = True
- # if self.instance is None:
- # self.fields['contacts_file'].required = True
+ if self.instance.id is None:
+ self.fields['contacts_file'].required = True
+ else:
+ self.fields['contacts_file'].required = False
if self.data.get('contacts_file'):
self.fields['contacts_file'].widget.attrs.update({
"accept": ".csv,.xls,.xlsx,.xlsm,.xlsb,.xml",
})
+ def clean_name(self):
+ name = self.cleaned_data.get('name')
+ if ContactList.objects.filter(name__iexact=name).exclude(id=self.instance.id).exists():
+ raise forms.ValidationError('Contact List with this Name already exists.')
+ return name
+
def clean_contacts_file(self):
document = self.cleaned_data.get("contacts_file")
if document:
@@ -158,8 +169,16 @@ class ContactListForm(forms.ModelForm):
else:
self.validated_rows = data.get("validated_rows", [])
self.invalid_rows = data.get("invalid_rows", [])
- if self.invalid_rows:
- raise forms.ValidationError('Uploaded file is not valid')
+ if len(self.validated_rows) == 0:
+ raise forms.ValidationError("All the contacts in the file are invalid.")
+ # self.headers = data.get("headers", [])
+ # self.failed_contacts_csv = data.get("failed_contacts_csv", [])
+ # failed_csv_data = []
+ # failed_csv_data = (self.failed_contacts_csv)
+ # failed_csv_data.insert(0, self.headers)
+ # if self.invalid_rows:
+ # self.add_error(None, json.dumps(failed_csv_data))
+ # raise forms.ValidationError('Uploaded file is not valid.')
return document
def clean_visible_to(self):
@@ -193,11 +212,11 @@ class ContactForm(forms.ModelForm):
field.widget.attrs = {"class": "form-control"}
self.fields['name'].required = True
- self.fields['last_name'].required = True
- self.fields['city'].required = True
- self.fields['state'].required = True
self.fields['email'].required = True
- self.fields['company_name'].required = True
+ self.fields['last_name'].required = False
+ self.fields['city'].required = False
+ self.fields['state'].required = False
+ self.fields['company_name'].required = False
self.fields['contact_list'].required = False
class Meta:
diff --git a/marketing/models.py b/marketing/models.py
index e69aa02f..3494450b 100644
--- a/marketing/models.py
+++ b/marketing/models.py
@@ -1,3 +1,4 @@
+import arrow
import os
from datetime import datetime, timedelta
from django.db import models
@@ -42,6 +43,10 @@ class EmailTemplate(models.Model):
def created_by_user(self):
return self.created_by if self.created_by else None
+ @property
+ def created_on_arrow(self):
+ return arrow.get(self.created_on).humanize()
+
class ContactList(models.Model):
created_by = models.ForeignKey(
@@ -104,6 +109,14 @@ class ContactList(models.Model):
'no_of_clicks'))['no_of_clicks__sum']
return clicks
+ @property
+ def created_on_arrow(self):
+ return arrow.get(self.created_on).humanize()
+
+ @property
+ def updated_on_arrow(self):
+ return arrow.get(self.updated_on).humanize()
+
class Contact(models.Model):
phone_regex = RegexValidator(
@@ -132,6 +145,10 @@ class Contact(models.Model):
def __str__(self):
return self.email
+ @property
+ def created_on_arrow(self):
+ return arrow.get(self.created_on).humanize()
+
class Meta:
ordering = ['id', ]
@@ -273,6 +290,18 @@ class Campaign(models.Model):
return contact_ids.count()
+ @property
+ def sent_on_arrow(self):
+ if self.schedule_date_time:
+ c_schedule_date_time = convert_to_custom_timezone(
+ self.schedule_date_time, self.timezone)
+ # return c_schedule_date_time.strftime('%b %d, %Y %I:%M %p')
+ return arrow.get(c_schedule_date_time).humanize()
+ else:
+ c_created_on = convert_to_custom_timezone(
+ self.created_on, self.timezone)
+ # return c_created_on.strftime('%b %d, %Y %I:%M %p')
+ return arrow.get(self.created_on).humanize()
@receiver(models.signals.pre_delete, sender=Campaign)
def comment_attachments_delete(sender, instance, **kwargs):
diff --git a/marketing/templatetags/__init__.py b/marketing/templatetags/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/marketing/templatetags/digg_paginator.py b/marketing/templatetags/digg_paginator.py
new file mode 100644
index 00000000..8091a06c
--- /dev/null
+++ b/marketing/templatetags/digg_paginator.py
@@ -0,0 +1,87 @@
+from django import template
+
+register = template.Library()
+
+LEADING_PAGE_RANGE_DISPLAYED = TRAILING_PAGE_RANGE_DISPLAYED = 0
+LEADING_PAGE_RANGE = TRAILING_PAGE_RANGE = 0
+NUM_PAGES_OUTSIDE_RANGE = 0
+ADJACENT_PAGES = 2
+
+
+def digg_paginator(context):
+ '''
+ To be used in conjunction with the object_list generic view.
+
+ Adds pagination context variables for use in displaying leading, adjacent and
+ trailing page links in addition to those created by the object_list generic
+ view.
+ '''
+
+ paginator = context['paginator']
+ page_obj = context['page_obj']
+ pages = paginator.num_pages
+ page = page_obj.number
+ in_leading_range = in_trailing_range = False
+ pages_outside_leading_range = pages_outside_trailing_range = range(0)
+ if pages <= LEADING_PAGE_RANGE_DISPLAYED + NUM_PAGES_OUTSIDE_RANGE + 1:
+ in_leading_range = in_trailing_range = True
+ page_range = [n for n in range(1, pages + 1)]
+ elif page <= LEADING_PAGE_RANGE:
+ in_leading_range = True
+ page_range = [n for n in range(1, LEADING_PAGE_RANGE_DISPLAYED + 1)]
+ pages_outside_leading_range = [
+ n + pages for n in range(0, -NUM_PAGES_OUTSIDE_RANGE, -1)]
+ elif page > pages - TRAILING_PAGE_RANGE:
+ in_trailing_range = True
+ page_range = [n for n in range(
+ pages - TRAILING_PAGE_RANGE_DISPLAYED + 1, pages + 1) if n > 0 and n <= pages]
+ pages_outside_trailing_range = [
+ n + 1 for n in range(0, NUM_PAGES_OUTSIDE_RANGE)]
+ else:
+ page_range = [n for n in range(
+ page - ADJACENT_PAGES, page + ADJACENT_PAGES + 1) if n > 0 and n <= pages]
+ pages_outside_leading_range = [
+ n + pages for n in range(0, -NUM_PAGES_OUTSIDE_RANGE, -1)]
+ pages_outside_trailing_range = [
+ n + 1 for n in range(0, NUM_PAGES_OUTSIDE_RANGE)]
+
+ # Now try to retain GET params, except for 'page'
+ # Add 'django.core.context_processors.request' to settings.TEMPLATE_CONTEXT_PROCESSORS beforehand
+ request = context['request']
+ params = request.GET.copy()
+ # if 'page' in params:
+ # del(params['page'])
+ # get_params = params.urlencode()
+
+ if 'bounced_contacts_page' in params:
+ del(params['bounced_contacts_page'])
+ get_params = params.urlencode()
+
+ if page_obj.has_previous():
+ previous_page = page_obj.previous_page_number()
+ else:
+ previous_page = 1
+
+ if page_obj.has_next():
+ next_page = page_obj.next_page_number()
+ else:
+ next_page = pages
+
+ return {
+ 'pages': pages,
+ 'bounced_contacts_page': page,
+ 'previous': previous_page,
+ 'next': next_page,
+ 'has_previous': page_obj.has_previous(),
+ 'has_next': page_obj.has_next(),
+ 'page_range': page_range,
+ 'in_leading_range': in_leading_range,
+ 'in_trailing_range': in_trailing_range,
+ 'pages_outside_leading_range': pages_outside_leading_range,
+ 'pages_outside_trailing_range': pages_outside_trailing_range,
+ 'get_params': get_params,
+ }
+
+
+register.inclusion_tag("contact_list_digg_paginator.html",
+ takes_context=True)(digg_paginator)
diff --git a/marketing/urls.py b/marketing/urls.py
index 4cee2610..09192a00 100644
--- a/marketing/urls.py
+++ b/marketing/urls.py
@@ -6,7 +6,7 @@ from .views import (
edit_contact_list, delete_contact_list, failed_contact_list_detail, failed_contact_list_download_delete,
campaign_link_click, campaign_open, demo_file_download, delete_contact, unsubscribe_from_campaign, contact_detail,
edit_failed_contact, delete_failed_contact, download_contacts_for_campaign, create_campaign_from_template,
- download_links_clicked
+ download_links_clicked, delete_multiple_contacts, download_failed_contacts
)
app_name = 'marketing'
@@ -48,4 +48,6 @@ urlpatterns = [
path('download-contacts-for-campaign//', download_contacts_for_campaign, name="download_contacts_for_campaign"),
path('create-campaign-from-template//', create_campaign_from_template, name="create_campaign_from_template"),
path('download-links-clicked//', download_links_clicked, name="download_links_clicked"),
+ path('delete_multiple_contacts/', delete_multiple_contacts, name="delete_multiple_contacts"),
+ path('download-failed-contacts//', download_failed_contacts, name="download_failed_contacts"),
]
diff --git a/marketing/views.py b/marketing/views.py
index 3aac86fa..dff6f05d 100644
--- a/marketing/views.py
+++ b/marketing/views.py
@@ -330,12 +330,20 @@ def edit_contact(request, pk):
@marketing_access_required
def delete_contact(request, pk):
contact_obj = get_object_or_404(Contact, pk=pk)
+
if not (request.user.role == 'ADMIN' or request.user.is_superuser or contact_obj.created_by == request.user or
(contact_obj.id in request.user.marketing_contactlist.all().values_list('contacts', flat=True))):
raise PermissionDenied
- contact_obj.delete()
if request.GET.get('from_contact'):
- return redirect(reverse('marketing:contact_list_detail', args=(request.GET.get('from_contact'),)))
+ if contact_obj.contact_list.count() == 1:
+ contact_obj.delete()
+ return redirect(reverse('marketing:contact_list_detail', args=(request.GET.get('from_contact'),)))
+ else:
+ contact_list_obj = get_object_or_404(ContactList, pk=request.GET.get('from_contact'))
+ contact_obj.contact_list.remove(contact_list_obj)
+ return redirect(reverse('marketing:contact_list_detail', args=(request.GET.get('from_contact'),)))
+ else:
+ contact_obj.delete()
return redirect('marketing:contacts_list')
@@ -345,7 +353,9 @@ def contact_list_detail(request, pk):
contact_list = get_object_or_404(ContactList, pk=pk)
if not (request.user.role == 'ADMIN' or request.user.is_superuser or contact_list.created_by == request.user):
raise PermissionDenied
- contacts_list = contact_list.contacts.all()
+ contacts_list = contact_list.contacts.filter(is_bounced=False)
+ bounced_contacts_list = contact_list.contacts.filter(is_bounced=True)
+ bounced_contacts_list_count = contact_list.contacts.filter(is_bounced=True).count()
if request.POST:
if request.POST.get('name'):
contacts_list = contacts_list.filter(
@@ -356,7 +366,29 @@ def contact_list_detail(request, pk):
if request.POST.get('company_name'):
contacts_list = contacts_list.filter(
company_name=request.POST.get('company_name'))
- data = {'contact_list': contact_list, "contacts_list": contacts_list}
+
+ if request.POST.get('name'):
+ bounced_contacts_list = bounced_contacts_list.filter(
+ name__icontains=request.POST.get('name'))
+ if request.POST.get('email'):
+ bounced_contacts_list = bounced_contacts_list.filter(
+ email__icontains=request.POST.get('email'))
+ if request.POST.get('company_name'):
+ bounced_contacts_list = bounced_contacts_list.filter(
+ company_name=request.POST.get('company_name'))
+
+ page = request.GET.get('bounced_contacts_page', 1)
+ paginator = Paginator(bounced_contacts_list, 10)
+ try:
+ bounced_contacts_list = paginator.page(page)
+ except:
+ bounced_contacts_list = paginator.page(paginator.num_pages)
+
+ data = {'contact_list': contact_list, "contacts_list": contacts_list,
+ "bounced_contacts_list":bounced_contacts_list,
+ 'bounced_contacts_list_count': bounced_contacts_list_count,
+ # these two are added for digg pagintor
+ 'paginator':paginator,'page_obj': bounced_contacts_list,}
return render(request, 'marketing/lists/detail.html', data)
@@ -941,3 +973,55 @@ def download_links_clicked(request, campaign_id):
response = HttpResponse(data, content_type='text/plain')
response['Content-Disposition'] = 'attachment; filename={}'.format('data_downloads.csv')
return response
+
+
+@login_required(login_url='/login')
+@marketing_access_required
+def delete_multiple_contacts(request):
+
+ contacts_list = Contact.objects.filter(id__in=request.POST.getlist('selected_list[]'))
+ shared_contact_lists = request.user.marketing_contactlist.all().values_list('contacts', flat=True)
+ cannot_be_deleted = []
+ error = False
+ for contact_obj in contacts_list:
+ if not (request.user.role == 'ADMIN' or request.user.is_superuser or contact_obj.created_by == request.user or (contact_obj.id in shared_contact_lists)):
+ cannot_be_deleted.append(contact_obj.email)
+ error = True
+ if len(cannot_be_deleted) == 0:
+ error = False
+ for contact_obj in contacts_list:
+ if request.POST.get('from_contact'):
+ if contact_obj.contact_list.count() == 1:
+ contact_obj.delete()
+ else:
+ contact_list_obj = get_object_or_404(ContactList, pk=request.POST.get('from_contact'))
+ contact_obj.contact_list.remove(contact_list_obj)
+ return JsonResponse({'error':False, 'refresh': True})
+ else:
+ message = "You don't have permission to delete {}".format(', '.join(cannot_be_deleted))
+ return JsonResponse({'error': True, 'message' : message })
+
+
+@login_required
+@marketing_access_required
+def download_failed_contacts(request, contact_list_id):
+
+ contact_list_obj = get_object_or_404(ContactList, pk=contact_list_id)
+ if not (request.user.role == 'ADMIN' or request.user.is_superuser or contact_list_obj.created_by == request.user):
+ raise PermissionDenied
+
+ failed_contacts = contact_list_obj.failed_contacts.values('company_name', 'email', 'name', 'last_name', 'city', 'state')
+ if failed_contacts:
+ data = [
+ 'company name,email,first name,last name,city,state\n',
+ ]
+ for contact in failed_contacts:
+ data.append((', '.join(contact.values()) + '\n'))
+ response = HttpResponse(
+ data, content_type='text/plain')
+ response['Content-Disposition'] = 'attachment; filename={}'.format(
+ 'failed_contacts.csv')
+ return response
+
+ else:
+ return HttpResponse('No Data')
diff --git a/opportunity/templates/opportunity.html b/opportunity/templates/opportunity.html
index 620d81dd..b4160fde 100644
--- a/opportunity/templates/opportunity.html
+++ b/opportunity/templates/opportunity.html
@@ -4,6 +4,11 @@
{% load thumbnail %}
{% block extralinks %}
+
{% endblock %}
{% block content %}
@@ -135,9 +140,8 @@
{% for opportunity in opportunity_list %}
{{ forloop.counter }}
- {{ opportunity.name }}
+ {{ opportunity.name }}
{% with opportunity_users=opportunity.assigned_to.all %}
{% for user in opportunity_users %}
@@ -161,7 +165,8 @@
{% with tags=opportunity.tags.all %}
{% if tags %}
{% for tag in tags %}
- {{ tag.name }}
+ {{ tag.name }}
{% endfor %}
{% else %}
No Tags
@@ -190,7 +195,8 @@
{% if opportunity.lead_source %}{{ opportunity.lead_source }}{% else %}Not Specified{% endif %}
-
+
{% if request.user == opportunity.created_by or request.user.role == "ADMIN" or request.user.is_superuser %}
@@ -393,6 +399,13 @@
$('#id_tag').select2();
});
+ $(".tag_class_opp").click(function () {
+ // $(".tag_class_opp").css('cursor', 'pointer')
+ url = "{% url 'opportunity:list' %}"
+ url = url + "?tag=" + $(this).attr('data-link')
+ window.location.href = url;
+ });
+
search = "{{search}}"
if (search == 'True') {
diff --git a/static/css/main.scss b/static/css/main.scss
index 6c583f50..d9b9343f 100644
--- a/static/css/main.scss
+++ b/static/css/main.scss
@@ -459,7 +459,7 @@ $color_2: #000;
.form-group{
margin-bottom: 10px;
label{
- color: $text_color;
+ color: black;
font-size: 0.85rem;
font-weight: 600;
text-transform: none;
diff --git a/tasks/templates/tasks_tasks_list.html b/tasks/templates/tasks_tasks_list.html
index 399dfa33..abf08874 100644
--- a/tasks/templates/tasks_tasks_list.html
+++ b/tasks/templates/tasks_tasks_list.html
@@ -8,6 +8,9 @@
.table_container_row .card .card-body table tbody .due-date td {
color: red;
}
+ .form-group label{
+ font-weight: 800;
+ }
{% endblock %}
{% block content %}
diff --git a/teams/models.py b/teams/models.py
index 89b61678..cac2a458 100644
--- a/teams/models.py
+++ b/teams/models.py
@@ -1,3 +1,5 @@
+import arrow
+
from django.db import models
from common.models import User
from django.utils.translation import ugettext_lazy as _
@@ -16,3 +18,7 @@ class Teams(models.Model):
class Meta:
ordering = ('id',)
+
+ @property
+ def created_on_arrow(self):
+ return arrow.get(self.created_on).humanize()
\ No newline at end of file
diff --git a/teams/templates/teams.html b/teams/templates/teams.html
index d4df5acc..d21bc8fa 100644
--- a/teams/templates/teams.html
+++ b/teams/templates/teams.html
@@ -4,6 +4,11 @@
{% load thumbnail %}
{% block extralinks %}
+
{% endblock %}
{% block content %}
@@ -158,7 +163,7 @@
None
{% endif %}
- {{ team.created_on|date:'d-m-Y' }}
+ {{ team.created_on_arrow }}
{% if request.user == team.created_by or request.user.role == 'ADMIN' or reques.user.is_superuser %}
+
+{% ifnotequal bounced_contacts_page 1 %}
+{{"<<"|safe}}
+{% endifnotequal %}
+{% if has_previous %}
+{{"<"|safe}}
+{% endif %}
+{% if not in_leading_range %}
+{% for p in pages_outside_trailing_range %}
+{{ p }}
+{% endfor %}
+
+{% endif %}
+{% for p in page_range %}
+{% if p == bounced_contacts_page %}
+{{ p }}
+{% else %}
+{{ p }}
+{% endif %}
+{% endfor %}
+{% if not in_trailing_range %}
+
+{% for p in pages_outside_leading_range reversed %}
+{{ p }}
+{% endfor %}
+{% endif %}
+{% if has_next %}
+{{">"|safe}}
+{% endif %}
+{% ifnotequal bounced_contacts_page pages %}
+{{">>"|safe}}
+{% endifnotequal %}
+
+{% endifnotequal %}
+{% endspaceless %}
\ No newline at end of file
diff --git a/templates/marketing/campaign/index.html b/templates/marketing/campaign/index.html
index 7af5e00d..082b211a 100644
--- a/templates/marketing/campaign/index.html
+++ b/templates/marketing/campaign/index.html
@@ -94,8 +94,8 @@
{{ campaign.title }}
{{campaign.get_all_emails_count}}
-
- {{ campaign.sent_on_format }}
+
+ {{ campaign.sent_on_arrow }}
{{ campaign.created_by }}
diff --git a/templates/marketing/dashboard.html b/templates/marketing/dashboard.html
index b90a7ff9..71f9d69b 100644
--- a/templates/marketing/dashboard.html
+++ b/templates/marketing/dashboard.html
@@ -144,7 +144,7 @@
Title
Tags
- Contact Lists
+ Contact List
diff --git a/templates/marketing/email_template/index.html b/templates/marketing/email_template/index.html
index 7f41d41c..6c8c899b 100644
--- a/templates/marketing/email_template/index.html
+++ b/templates/marketing/email_template/index.html
@@ -89,7 +89,7 @@
href="{% url 'marketing:email_template_detail' email_template.id %}">{{ email_template.title }}
{{ email_template.created_by }}
- {{ email_template.created_on }}
+ {{ email_template.created_on_arrow }}
{{ contact.email }}
{{ contact.company_name }}
{{ contact.created_by }}
- {{ contact.created_on }}
+ {{ contact.created_on_arrow }}
{% for contact_list in contact.contact_list.all %}
1) {
- if (!confirm('This contact exists in other contact lists too. Are you sure you want to delete this contact?'))
+ if (!confirm('This contact exists in other Contact List too. Are you sure you want to delete this contact?'))
return;
window.location = $(this).attr('href');
} else {
diff --git a/templates/marketing/lists/detail.html b/templates/marketing/lists/detail.html
index ab9710d9..cfbaba2e 100644
--- a/templates/marketing/lists/detail.html
+++ b/templates/marketing/lists/detail.html
@@ -1,131 +1,278 @@
{% extends 'marketing/base.html' %}
{% load staticfiles %}
{% load paginate %}
+{% load digg_paginator %}
{% block content %}
{{ block.super }}
-
+
Contact List
{{contact_list.name}}
-