restructuring
This commit is contained in:
parent
df0830b93c
commit
e95c34528c
64 changed files with 10635 additions and 112 deletions
18
accounts/templates/account_comments.html
Normal file
18
accounts/templates/account_comments.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="pull-right right-container">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<a href="{% url 'accounts:comment_remove' pk=comment.pk %}"><button type="submit">Submit</button></a>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-head-container">{{comment.comment_user}} Commented</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}">{{comment.comment}}</div>
|
||||
<div class="stream-date-container">{{comment.comment_time}}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
147
accounts/templates/accounts.html
Normal file
147
accounts/templates/accounts.html
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="no-gutters row">
|
||||
<div class="col-md-6">
|
||||
<h4>Accounts</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'accounts:new_account' %}"><i class="fa fa-plus"></i> Add New Account</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<form id="accounts_filter" method="POST" action="">
|
||||
<div class="card-body">
|
||||
<div class="card-title">Filters</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">NAME</label>
|
||||
<input type="text" class="form-control" placeholder="Account Name" name="name" {% if request.POST %} value="{{request.POST.name}}" {%endif%}/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">CITY</label>
|
||||
<input type="text" class="form-control" placeholder="City" name="city" {% if request.POST %} value="{{request.POST.city}}" {%endif%}/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">INDUSTRY</label>
|
||||
<select class="form-control" id="id_industry" name="industry" >
|
||||
<option value="">--Select Type of Industry--</option>
|
||||
{% for each_industry in industries %}
|
||||
<option value="{{each_industry.0}}" {% if request.POST.industry %} {% ifequal each_industry.0 request.POST.industry %}selected{% endifequal %}{% endif %} >{{each_industry.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row">
|
||||
<button class="btn btn-primary save" type="submit">Search</button>
|
||||
<a href="{% url 'accounts:list' %}" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<!-- accounts list start -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="panel-heading-list card-title">
|
||||
List of Accounts
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Accounts {{accounts_list|length}}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.no</th>
|
||||
<th width="20%" style="text-align:center;">Name</th>
|
||||
<th width="15%" style="text-align:center;">City</th>
|
||||
<th width="15%" style="text-align:center;">State</th>
|
||||
<th width="20%" style="text-align:center;">Industry</th>
|
||||
<th width="25%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page accounts_list %}
|
||||
{% else%}
|
||||
{% paginate 10 accounts_list %}
|
||||
{% endif %}
|
||||
{% for each_account in accounts_list %}
|
||||
<tr id="account_details{{each_account.id}}" class="text-center">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td>{% if each_account.name %}<a href="{% url 'accounts:view_account' each_account.id %}">{{ each_account.name }}</a>{% endif %}</td>
|
||||
<td>{% if each_account.billing_address.city %}{{ each_account.billing_address.city }} {% else %} Not specified {% endif %}</td>
|
||||
<td>{% if each_account.billing_address.state %}{{ each_account.billing_address.state }} {% else %} Not specified {% endif %}</td>
|
||||
<td>{% if each_account.industry %}{{ each_account.industry }} {% else %} Not specified {% endif %}</td>
|
||||
<td class="actions">
|
||||
<a href="{% url 'accounts:view_account' each_account.id %}" class="btn btn-info view"><i class="fas fa-eye"></i> View</a>
|
||||
<a href="{% url 'accounts:edit_account' each_account.id %}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a href="{% url 'accounts:remove_account' each_account.id %}" class="btn btn-danger delete remove_account"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% ifequal accounts_list|length 0 %}
|
||||
<h6 class="text-center">No Acccount Records Found</h6>
|
||||
{% endifequal %}
|
||||
<div class="text-center row marl">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- accounts list end -->
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$('.remove_account').click(function(e){
|
||||
e.preventDefault()
|
||||
url = $(this).attr('href')
|
||||
if (!confirm('Are you sure you want to delete?'))
|
||||
return;
|
||||
window.location = $(this).attr('href')
|
||||
});
|
||||
|
||||
$(".reset").click(function(e){
|
||||
window.location = "{% url 'accounts:list'%}"
|
||||
});
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#accounts_filter').attr("action", $(this).attr("href"));
|
||||
$('#accounts_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
38
accounts/templates/accounts_list.html
Normal file
38
accounts/templates/accounts_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal accounts|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO ACCOUNTS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for account in accounts %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<a class="cell parentname" id="{{ account.id }}">
|
||||
{{ account.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="cell parentemail">
|
||||
{{ account.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
159
accounts/templates/create_account.html
Normal file
159
accounts/templates/create_account.html
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
{% block extralinks %}
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'accounts:list' %}">Accounts</a></li>
|
||||
<li class="breadcrumb-item active">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form id="formid" action='' method="POST" novalidate>
|
||||
<div class="overview_form_block row marl ">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE ACCOUNT
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Name{% if account_form.name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.name }}
|
||||
<span class="error">{{ account_form.name.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Website{% if account_form.website.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.website }}
|
||||
<span class="error">{{ account_form.website.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Phone{% if account_form.phone.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.phone }}
|
||||
<span class="error">{{ account_form.phone.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" class="required">Email Address{% if account_form.email.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.email }}
|
||||
<span class="error">{{ account_form.email.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Industry{% if account_form.industry.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.industry }}
|
||||
<span class="error">{{ account_form.industry.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Description{% if account_form.description.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ account_form.description }}
|
||||
<span class="error">{{ account_form.description.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
{{request.POST.assigned_to}}
|
||||
<select class="assigned_users form-control" name="assigned_to" multiple="multiple">
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% if user in account_obj.assigned_to.all or user.id in assignedto_list %} selected="" {% endif %}>{{user.email}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ account_form.assigned_to.errors }}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="filter_col billing_block col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Billing Address</label>
|
||||
{{ billing_form.address_line }}
|
||||
<span class="error">{{ billing_form.address_line.errors }}</span>
|
||||
</div>
|
||||
{{ billing_form.street }}
|
||||
<span class="error">{{ billing_form.street.errors }}</span>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="col-md-4">
|
||||
{{ billing_form.city }}
|
||||
<span class="error">{{ billing_form.city.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ billing_form.state }}
|
||||
<span class="error">{{ billing_form.state.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ billing_form.postcode }}
|
||||
<span class="error">{{ billing_form.postcode.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-top: 10px;">
|
||||
{{ billing_form.country }}
|
||||
<span class="error">{{ billing_form.country.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h6 style="color:white;">Copy Address</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
<input type="hidden" id="save_new_form" name="savenewform">
|
||||
</div>
|
||||
<!-- overview ends here -->
|
||||
<div class="row marl buttons_row text-center form_btn_row">
|
||||
<button class="btn btn-default save" type="submit">Save</button>
|
||||
{% if not account_obj %}
|
||||
<button class="btn btn-default save " type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'accounts:list' %}" class="btn btn-default clear">CANCEL</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$("#copy_billing_btn").click(function(){
|
||||
var address_line = $("#id_address_line").val()
|
||||
var street = $("#id_street").val()
|
||||
var city = $("#id_city").val()
|
||||
var state = $("#id_state").val()
|
||||
var postcode = $("#id_postcode").val()
|
||||
var country = $("#id_country").val()
|
||||
$("#id_ship-address_line").val(address_line)
|
||||
$("#id_ship-street").val(street)
|
||||
$("#id_ship-city").val(city)
|
||||
$("#id_ship-state").val(state)
|
||||
$("#id_ship-postcode").val(postcode)
|
||||
$("#id_ship-country").val(country)
|
||||
});
|
||||
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#formid').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
2098
accounts/templates/view_account.html
Normal file
2098
accounts/templates/view_account.html
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -35,7 +35,7 @@ class AccountsCreateTestCase(AccountCreateTest, TestCase):
|
|||
'name': "Uday", 'email': "udayteja@micropyramid.com", 'phone': "", 'billing_address': self.address,
|
||||
'shipping_address': self.address, 'website': "www.uday.com",
|
||||
'industry': "SOFTWARE", 'description': "Yes.. Testing Done"})
|
||||
self.assertTemplateUsed(response, 'accounts/create_account.html')
|
||||
self.assertTemplateUsed(response, 'create_account.html')
|
||||
|
||||
|
||||
class AccountsListTestCase(AccountCreateTest, TestCase):
|
||||
|
|
@ -43,7 +43,7 @@ class AccountsListTestCase(AccountCreateTest, TestCase):
|
|||
self.accounts = Account.objects.all()
|
||||
response = self.client.get('/accounts/list/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'accounts/accounts.html')
|
||||
self.assertTemplateUsed(response, 'accounts.html')
|
||||
|
||||
|
||||
class AccountsCountTestCase(AccountCreateTest, TestCase):
|
||||
|
|
@ -57,7 +57,7 @@ class AccountsViewTestCase(AccountCreateTest, TestCase):
|
|||
self.accounts = Account.objects.all()
|
||||
response = self.client.get('/accounts/'+ str(self.account.id) +'/view/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'accounts/view_account.html')
|
||||
self.assertTemplateUsed(response, 'view_account.html')
|
||||
|
||||
|
||||
class AccountsRemoveTestCase(AccountCreateTest, TestCase):
|
||||
|
|
@ -78,7 +78,7 @@ class AccountsUpdateUrlTestCase(AccountCreateTest, TestCase):
|
|||
'shipping_address': self.address, 'website': "www.uday.com",
|
||||
'industry': "SOFTWARE", 'description': "Yes.. Testing Done"})
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'accounts/create_account.html')
|
||||
self.assertTemplateUsed(response, 'create_account.html')
|
||||
|
||||
def test_accounts_update_status(self):
|
||||
response = self.client.get('/accounts/'+ str(self.account.id) +'/edit/')
|
||||
|
|
@ -86,7 +86,7 @@ class AccountsUpdateUrlTestCase(AccountCreateTest, TestCase):
|
|||
|
||||
def tst_accounts_update_html(self):
|
||||
response = self.client.get('/accounts/'+ str(self.account.id) +'/edit/')
|
||||
self.assertTemplateUsed(response, 'accounts/create_account.html')
|
||||
self.assertTemplateUsed(response, 'create_account.html')
|
||||
|
||||
|
||||
class AccountCreateEmptyFormTestCase(AccountCreateTest, TestCase):
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def accounts_list(request):
|
|||
if industry:
|
||||
accounts_list = accounts_list.filter(industry__icontains=industry)
|
||||
|
||||
return render(request, "accounts/accounts.html", {
|
||||
return render(request, "accounts.html", {
|
||||
'accounts_list': accounts_list,
|
||||
'industries': INDCHOICES,
|
||||
'per_page': page
|
||||
|
|
@ -62,7 +62,7 @@ def add_account(request):
|
|||
else:
|
||||
return redirect("accounts:list")
|
||||
else:
|
||||
return render(request, 'accounts/create_account.html', {
|
||||
return render(request, 'create_account.html', {
|
||||
'account_form': account_form,
|
||||
'billing_form': billing_form,
|
||||
'shipping_form': shipping_form,
|
||||
|
|
@ -75,7 +75,7 @@ def add_account(request):
|
|||
})
|
||||
|
||||
else:
|
||||
return render(request, 'accounts/create_account.html', {
|
||||
return render(request, 'create_account.html', {
|
||||
'account_form': account_form,
|
||||
'billing_form': billing_form,
|
||||
'shipping_form': shipping_form,
|
||||
|
|
@ -97,7 +97,7 @@ def view_account(request, account_id):
|
|||
users = User.objects.filter(is_active=True).order_by('email')
|
||||
cases = Case.objects.filter(account=account_record)
|
||||
teams = Team.objects.all()
|
||||
return render(request, "accounts/view_account.html", {
|
||||
return render(request, "view_account.html", {
|
||||
'account_record': account_record,
|
||||
'opportunity_list': opportunity_list,
|
||||
'stages': STAGES,
|
||||
|
|
@ -145,7 +145,7 @@ def edit_account(request, edid):
|
|||
account_object.teams.add(*teams_list)
|
||||
return redirect("accounts:list")
|
||||
else:
|
||||
return render(request, 'accounts/create_account.html', {
|
||||
return render(request, 'create_account.html', {
|
||||
'account_form': account_form,
|
||||
'billing_form': billing_form,
|
||||
'shipping_form': shipping_form,
|
||||
|
|
@ -160,7 +160,7 @@ def edit_account(request, edid):
|
|||
'teams_list': teams_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'accounts/create_account.html', {
|
||||
return render(request, 'create_account.html', {
|
||||
'account_form': account_form,
|
||||
'billing_form': billing_form,
|
||||
'shipping_form': shipping_form,
|
||||
|
|
@ -248,9 +248,9 @@ def remove_comment(request):
|
|||
@login_required
|
||||
def get_accounts(request):
|
||||
if request.method == 'GET':
|
||||
if request.user.is_authenticated():
|
||||
if request.user.is_authenticated:
|
||||
accounts = Account.objects.all()
|
||||
return render(request, 'accounts/accounts_list.html', {
|
||||
return render(request, 'accounts_list.html', {
|
||||
'accounts': accounts})
|
||||
else:
|
||||
return HttpResponseRedirect('accounts/login')
|
||||
|
|
|
|||
188
cases/templates/cases.html
Normal file
188
cases/templates/cases.html
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="no-gutters row">
|
||||
<div class="col-md-6">
|
||||
<h4>Cases</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'cases:add_case' %}"><i class="fa fa-plus"></i> Add New Case</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<form id="cases_filter" method="POST" action="" >
|
||||
<div class="card-body">
|
||||
<div class="card-title">Filters</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" name="name" value="{{request.POST.name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Status</label>
|
||||
<select class="form-control" id="id_status" name="status" >
|
||||
<option value="">--Status--</option>
|
||||
{% for each_status in case_status %}
|
||||
<option value="{{each_status.0}}" {% if request.POST.status %} {% ifequal each_status.0 request.POST.status %}selected{% endifequal %}{% endif %} >{{each_status.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Priority</label>
|
||||
<select class="form-control" id="id_priority" name="priority" >
|
||||
<option value="">--Priority--</option>
|
||||
{% for each_priority in case_priority %}
|
||||
<option value="{{each_priority.0}}" {% if request.POST.priority %} {% ifequal each_priority.0 request.POST.priority %}selected{% endifequal %}{% endif %}>{{each_priority.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account</label>
|
||||
<select class="form-control" id="id_account" name="account">
|
||||
<option value="">--Select Account--</option>
|
||||
{% for ac in accounts %}
|
||||
<option value="{{ac.id}}" {% ifequal acc ac.id %} selected {% endifequal %} >{{ac.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="per_page_field" name="per_page">
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row text-center">
|
||||
<button class="btn btn-primary save" id="filter_click" type="submit">Search</button>
|
||||
<a href="{% url 'cases:list' %}" id="filter_clear" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<!-- cases_list starts here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="panel-heading-list card-title">
|
||||
List of Cases
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Cases {{ cases|length }}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed" id="multiselect">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.No</th>
|
||||
<th width="20%" style="text-align:center;">Name</th>
|
||||
<th width="20%" style="text-align:center;">Account</th>
|
||||
<th width="15%" style="text-align:center;">Status</th>
|
||||
<th width="15%" style="text-align:center;">Priority</th>
|
||||
<th width="25%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page cases %}
|
||||
{% else%}
|
||||
{% paginate 10 cases%}
|
||||
{% endif %}
|
||||
{% for case in cases %}
|
||||
<tr class="case_row{{case.id}}" style="text-align:center;">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'cases:view_case' case.id %}">{{ case.name }}</a></td>
|
||||
<td>
|
||||
{% if case.account %}
|
||||
<a href="{% url 'accounts:view_account' case.account.id %}">{{ case.account }}</a>
|
||||
{% else %}
|
||||
No Related Account
|
||||
{% endif %}
|
||||
</td>
|
||||
<td id="status_id{{case.id}}" status="{{case.status}}">{{ case.status }}</td>
|
||||
<td>{{ case.priority }}</td>
|
||||
<td class="actions">
|
||||
<a href="{% url 'cases:view_case' case.id %}" class="btn btn-info view"><i class="fas fa-eye"></i> View</a>
|
||||
<a href="{% url 'cases:edit_case' case.id %}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a onclick="remove_case({{case.id}}, '{% url 'cases:remove_case' case.id %}')" class="btn btn-danger delete remove_account"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
{% if case.status != 'Closed' %}
|
||||
<a onclick="close_case({{case.id}}, '{% url 'cases:close_case' %}')" class="btn btn-warning"><i class="fas fa-times"></i> Close</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% ifequal cases|length 0 %}
|
||||
<h6 class="text-center">No Cases Records Found</h6>
|
||||
{% endifequal %}
|
||||
<div class="marl row text-center">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- cases_list ends here -->
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
function close_case(x, url){
|
||||
var stat = $("#status_id"+x).text()
|
||||
if(stat==="Closed"){
|
||||
alert("Case Already Closed")
|
||||
}
|
||||
else{
|
||||
$.post(url, {
|
||||
"case_id": x
|
||||
}, function(data) {
|
||||
$("#status_id"+data.cid).text(data.status)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function remove_case(x, url){
|
||||
if (!confirm('Are you sure you want to Remove?'))
|
||||
return;
|
||||
window.location = url
|
||||
$.post(url, {
|
||||
"case_id": x
|
||||
}, function(data) {
|
||||
$(".case_row" + data.case_id).remove()
|
||||
$(".total_count").html("Total "+data.count)
|
||||
})
|
||||
}
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#cases_filter').attr("action", $(this).attr("href"));
|
||||
$('#cases_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
38
cases/templates/cases_list.html
Normal file
38
cases/templates/cases_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Status
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal cases|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO CASES FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for case in cases %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<a class="cell parentname" id="{{ case.id }}">
|
||||
{{ case.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="cell parentstatus">
|
||||
{{ case.status }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
20
cases/templates/comments.html
Normal file
20
cases/templates/comments.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="pull-right right-container">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})" >Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})">Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-head-container">{{comment.comment_user}} Commented</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}">{{comment.comment}}</div>
|
||||
<div class="stream-date-container">{{comment.comment_time}}</div><span>{%if comment.get_file%}<a href="file:////home/raghu/Documents/Jango/CRM/crm_proj/media/{{comment.comment_file}}">{{comment.get_file}}</a>{% endif %}</span>
|
||||
{% endfor %}
|
||||
148
cases/templates/create_cases.html
Normal file
148
cases/templates/create_cases.html
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
{% block extralinks %}
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'cases:list' %}">Cases</a></li>
|
||||
<li class="breadcrumb-item active">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form id="submitForm" method="POST" action="" novalidate>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE CASE
|
||||
</div>
|
||||
<div class="row marl no-gutters">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" class="required">Name{% if case_form.name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.name }}
|
||||
<span class="error">{{ case_form.name.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_status" class="required">Status{% if case_form.status.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.status }}
|
||||
<span class="error">{{ case_form.status.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_priority" class="required">Priority{% if case_form.priority.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.priority }}
|
||||
<span class="error">{{ case_form.priority.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_case_type">Type of Case{% if case_form.case_type.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.case_type }}
|
||||
<span class="error">{{ case_form.case_type.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Close Date{% if case_form.closed_on.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<div class='input-group date' id='datepicker1'>
|
||||
{{ case_form.closed_on }}
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<span class="error">{{ case_form.closed_on.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="assigned_users form-control" name="assigned_to" multiple="multiple">
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% if user in case_obj.assigned_to.all or user.id in assignedto_list %} selected="" {% endif %}>{{user.email}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="error">{{ case_form.assigned_to.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_account">Account{% if case_form.account.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.account }}
|
||||
<span class="error">{{case_form.account.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_contacts">Contacts{% if case_form.contacts.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.contacts }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_description">Description{% if case_form.description.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ case_form.description }}
|
||||
<span class="error">{{ case_form.description.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
<input type="hidden" id="save_new_form" name="savenewform">
|
||||
</div>
|
||||
<div class="row marl buttons_row text-center form_btn_row">
|
||||
<button class="btn btn-default save" type="submit">Save</button>
|
||||
{% if not case_obj %}
|
||||
<button class="btn btn-success save savenew" type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'cases:list' %}" class="btn btn-default clear">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var date = new Date();
|
||||
var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
||||
$('#id_closed_on').datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
minDate: today
|
||||
})
|
||||
});
|
||||
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#submitForm').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
|
||||
$('#id_account').change(function(){
|
||||
var account = $("#id_account").val()
|
||||
$.get("{% url 'cases:select_contacts' %}", {"account":account}, function(data){
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function (index, value) {
|
||||
$("#id_contacts").append("<option value="+index+">"+value+"</option>")
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
8
cases/templates/sel_contacts.html
Normal file
8
cases/templates/sel_contacts.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<select>
|
||||
{% for con in con %}
|
||||
<option value="{{con.id}}" {% for sel in selcon %}
|
||||
{% ifequal con.id sel.id %}
|
||||
selected {% endifequal%}{% endfor %}>{{con.name}}</option>
|
||||
}
|
||||
{% endfor %}
|
||||
</select>
|
||||
791
cases/templates/show_case.html
Normal file
791
cases/templates/show_case.html
Normal file
|
|
@ -0,0 +1,791 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block content %}
|
||||
|
||||
<div class="main_container" id="maincontainer" {% if edit2%}style="display:none"{% endif %}>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a onclick="editFun({{case.id}})">Edit</a></li>
|
||||
<li><a href="{% url 'cases:delete_case' case.id %}">Remove</a></li>
|
||||
<li><a href="{% url 'cases:delete_case' case.id %}">Reject</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-content" id="datashow">
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12" id="iname">
|
||||
<div class="form-group" >
|
||||
<label for="id_name" data-name="name" >Name</label>
|
||||
<div class="field" id="case_name" data-name="name">{{case.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Status</label>
|
||||
<div class="field" id="case_status" data-name="name">{%ifequal case.status None%}Not Specified
|
||||
{% else %}{{case.status}}{% endifequal %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Priority</label>
|
||||
<div class="field" id="case_priority" data-name="name">{%ifequal case.priority None%}Not Specified
|
||||
{% else %}{{case.priority}}{% endifequal %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Case-Type</label>
|
||||
<div class="field" id="case_case_type" data-name="name">
|
||||
{%ifequal case.case_type None%}Not Specified
|
||||
{% else %}{{case.case_type}}{% endifequal %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Account</label>
|
||||
<div class="field" id="case_account" data-name="name">{%ifequal case.account None%}Not Specified
|
||||
{% else %}{{case.account}}{% endifequal %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Contacts</label>
|
||||
<div class="field" id="case_contacts">
|
||||
{% ifequal contacts "None" %}Not Specified{% endifequal %}
|
||||
{% for c in contacts %}
|
||||
<div class="field contacts_class" data-name="name">{{c.name}}</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Description</label>
|
||||
<div class="field" id ="case_description" data-name="name">{% if case.description%}{{case.description}}{% else%}Not Specified{% endif%}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- show case ends here-->
|
||||
</div>
|
||||
<!-- Comments Section starts-->
|
||||
<form id="comment_form" method="POST" enctype="multipart/form-data">
|
||||
<div class="filter_col col-md-12">
|
||||
<div style="background-color:gray"><h4 >Comments</h4></div>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" id="id_comments" name="comment" rows="1" onkeypress="HideError(event)" placeholder="Submit Your Comments"></textarea><span><i id="CommentError" style="display:none; color:red"></i></span>
|
||||
<input type="file" name="comment_file" id="comments_file" multiple>
|
||||
<ul id="selected_files"></ul>
|
||||
<span>
|
||||
<button class="btn btn-default save" id="comment_submit" type="submit">Submit</button>
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" value="{{case.id}}" name="caseid">
|
||||
</form>
|
||||
<ul class="list-group" id="comments_div">
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="pull-right right-container">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})" >Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})" >Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-head-container">{{comment.comment_user}} Commented</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}">{{comment.comment}}</div>
|
||||
<div class="stream-date-container">{{comment.comment_time}}</div>
|
||||
<div class="stream-date-container" id="comment_file_div{{comment.id}}">{% for com in comment.get_files %}
|
||||
<div class="gray-box" id="comment_file_span{{com.get_file_id}}" style="background-color:#cccccc; padding:5px;display: inline-block;margin:4px; width: 100%; max-width: 400px;">
|
||||
<span class="preview"><a href="{% url 'cases:download_comfile' com.get_file_id %}">{{com.get_file}}</a></span>
|
||||
<a class="remove-attachment pull-right" onclick="remove_file({{com.get_file_id}})">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Comments Section Ends-->
|
||||
<!-- Comment Edit Modal Starts Here -->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" role="dialog" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Update Your Comment</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<form id="comment_edit_form" method="POST" >
|
||||
<textarea class="form-control" textarea cols="40" id="id_editcomment" name="comment" rows="1" placeholder="Submit Your Comments"></textarea>
|
||||
<input type="hidden" value="{{case.id}}" name="caseid">
|
||||
<input type="hidden" value="" name="commentid" id="commentid">
|
||||
<input type="file" multiple="multiple" name="edit_file" id="comments_file_edit" >
|
||||
<span id="edit_file_field"></span>
|
||||
<button class="btn btn-default save" id="comment_edit" type="submit">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- COmment Edit Modal Ends Here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Assigned users and teams starts-->
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-center">
|
||||
<h6>Users&Teams</h6>
|
||||
</div>
|
||||
<div class="panel-content" id="datashow">
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Assigned User</label>
|
||||
<div class="field" id="case_assigned_user" data-name="name">{{ a_user.username }}{% ifequal a_user "None" %}Not Specified{% endifequal %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Assigned Teams</label>
|
||||
<div class="field" id="case_teams" data-name="name">{% ifequal case.teams None%}Not Specified
|
||||
{% else %}{{case.teams}}{% endifequal %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Created On</label>
|
||||
<div class="field" id ="case_description" data-name="name">{{case.created}}</div>
|
||||
</div></div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" data-name="name" >Created by</label>
|
||||
<div class="field" id ="case_description" data-name="name">{{case.userid}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Activities block Starts here-->
|
||||
<div class="panel panel-default panel-activities" data-name="activities">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<span class="action" data-panel="activities" data-action="refresh" title="Click to refresh" style="cursor: pointer;"> Activities </span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" data-name="activities">
|
||||
<div class="btn-group button-container nav nav-tabs">
|
||||
<a data-toggle="tab" href="#show_meets"><button class="btn btn-default all scope-switcher" data-scope="Meeting">Meetings</button></a>
|
||||
<a data-toggle="tab" href="#tasks_list"><button class="btn btn-default all scope-switcher" data-scope="Task">Tasks</button></a>
|
||||
<a data-toggle="tab" href="#calls_list"><button class="btn btn-default all scope-switcher" data-scope="Call">Calls</button></a>
|
||||
</div>
|
||||
<div class="list-container">
|
||||
<div class="list list-expanded">
|
||||
<div class="tab-content">
|
||||
<div id="show_meets" class="tab-pane fade in active">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_meetings|length 0 %}
|
||||
<li class="list-group-item list-row" > No Meetings </li>
|
||||
{% else %}
|
||||
{% for meet in case.get_meetings %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="meetings_activity{{meet.id}}">
|
||||
<li>
|
||||
<a class="action display_event" href="">view</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-briefcase text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" title="Discuss pricing" data-id="" href="/planner/meetings/list">{{meet.name}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="dateStart">{{meet.start_date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Tasks Tab Division starts-->
|
||||
<div id="tasks_list" class="tab-pane fade">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_tasks|length 0 %}
|
||||
<li class="list-group-item list-row" > No Tasks </li>
|
||||
{% else %}
|
||||
{% for meet in case.get_tasks %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="tasks_activity{{meet.id}}">
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-briefcase text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" title="Discuss pricing" data-id="" href="/planner/tasks/list">{{meet.name}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="dateStart">{{meet.start_date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Tasks Tab Division ends here-->
|
||||
<!-- Calls Tab Division Starts here-->
|
||||
<div id="calls_list" class="tab-pane fade">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_calls|length 0 %}
|
||||
<li class="list-group-item list-row" > No Calls </li>
|
||||
{% else %}
|
||||
{% for call in case.get_calls %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="calls_activities{{call.id}}">
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-earphone text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" title="Discuss pricing" data-id="" href="/planner/calls/list">{{call.name}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<!--<span class="cell" data-name="assignedUser">
|
||||
<a href="#User/view/52eb7b4ba5500">Raghu</a>
|
||||
</span>-->
|
||||
<span class="cell" data-name="dateStart">{{call.start_date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Calls Tab Division ends here-->
|
||||
</div>
|
||||
</ul>
|
||||
<div class="show-more hide">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Activities block ends here-->
|
||||
<!-- History block starts here-->
|
||||
<div class="panel panel-default panel-activities" data-name="activities">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<span class="action" data-panel="activities" data-action="refresh" title="Click to refresh" style="cursor: pointer;"> History </span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body" data-name="activities">
|
||||
<div class="btn-group button-container nav nav-tabs">
|
||||
<a data-toggle="tab" href="#show_meets_completed"><button class="btn btn-default all scope-switcher" data-scope="Meeting">Meetings</button></a>
|
||||
<a data-toggle="tab" href="#tasks_list_completed"><button class="btn btn-default all scope-switcher" data-scope="Task">Tasks</button></a>
|
||||
<a data-toggle="tab" href="#calls_list_completed"><button class="btn btn-default all scope-switcher" data-scope="Call">Calls</button></a>
|
||||
</div>
|
||||
<div class="list-container">
|
||||
<div class="list list-expanded">
|
||||
<div class="tab-content">
|
||||
<div id="show_meets_completed" class="tab-pane fade in active">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_completed_meetings|length 0 %}
|
||||
<li class="list-group-item list-row" > No Data </li>
|
||||
{% else %}
|
||||
{% for meet in case.get_completed_meetings %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="meeting_history{{meet.id}}">
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-briefcase text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" title="Discuss pricing" data-id="" href="/planner/meetings/list">{{meet.name}} </a>| {{ meet.status }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="dateStart">{{meet.start_date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Tasks Tab Division starts-->
|
||||
<div id="tasks_list_completed" class="tab-pane fade">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_completed_tasks|length 0 %}
|
||||
<li class="list-group-item list-row" > No Tasks </li>
|
||||
{% else %}
|
||||
{% for meet in case.get_completed_tasks %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="tasks_history{{meet.id}}">
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-briefcase text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" data-id="" href="/planner/tasks/list">{{meet.name}} </a>| {{meet.status }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="dateStart">{{meet.start_date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Tasks Tab Division ends here-->
|
||||
<!-- Calls Tab Division Starts here-->
|
||||
<div id="calls_list_completed" class="tab-pane fade">
|
||||
<ul class="list-group">
|
||||
{% ifequal case.get_completed_calls|length 0 %}
|
||||
<li class="list-group-item list-row" > No Calls </li>
|
||||
{% else %}
|
||||
{% for call in case.get_completed_calls %}
|
||||
<li class="list-group-item list-row" >
|
||||
<div class="pull-right right cell" data-name="buttons">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" id="calls_history{{call.id}}">
|
||||
<li>
|
||||
<a class="action remove_event" href="">Remove</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setHeld" href="">Set Held</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action status_set" data-action="setNotHeld" href="">Set Not Held</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<span class="cell" data-name="ico">
|
||||
<span class="glyphicon glyphicon-earphone text-muted action" data-action="quickView" title="View" style="cursor: pointer"></span>
|
||||
</span>
|
||||
<span class="cell" data-name="name">
|
||||
<a class="link" title="Discuss pricing" data-id="" href="/planner/calls/list">{{ call.name }}</a> | {{ call.status }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="expanded-row">
|
||||
<!--<span class="cell" data-name="assignedUser">
|
||||
<a href="#User/view/52eb7b4ba5500">Raghu</a>
|
||||
</span>-->
|
||||
<span class="cell" data-name="dateStart">{{ call.start_date }}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endifequal %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Calls Tab Division ends here-->
|
||||
</div>
|
||||
</ul>
|
||||
<div class="show-more hide">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<!-- History block ends here-->
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Assigned users and teams sends-->
|
||||
<!-- CREATE MEETING MODEL -->
|
||||
<div class="modal fade" id="meeting-dispaly-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="create-meeting-dialog-title" class="modal-title">Meeting</h4>
|
||||
</div>
|
||||
<div id="modelbody" class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group inline-group" data-name="name">
|
||||
<label class="control-label" data-name="name" style="display: inline">
|
||||
Name *
|
||||
</label>
|
||||
<div class="field" data-name="name">
|
||||
<input type="hidden" name="event_type" value="Meeting"/>
|
||||
<input id="name" class="main-element form-control" type="text"
|
||||
autocomplete="off"
|
||||
name="name" required/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="parent">
|
||||
<div class="field" data-name="parent">
|
||||
<label for="parent">Parent </label>
|
||||
<div class="form-group" data-name="parent">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control" id="parent_type" name="parent_type" style="width:150px">
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="parent_name" value="" name="parent_name"
|
||||
class="main-element form-control">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default" id="selectparent"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
<button tabindex="-1" type="button" class="btn btn-default" id="clearparent">
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="status">
|
||||
<label class="control-label" data-name="status"> Status</label>
|
||||
<div class="field" data-name="status">
|
||||
<select class="form-control main-element" id="status" name="status">
|
||||
</select>
|
||||
<i id="status_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="dateStart">
|
||||
<label class="control-label" data-name="dateEnd"> Date Start * </label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='startdatepicker'>
|
||||
<input type='text' name="start_date" class="form-control"
|
||||
id="start_date"
|
||||
required/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="dateEnd">
|
||||
<label class="control-label" data-name="dateEnd"> Date End *</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='enddatepicker'>
|
||||
<input type='text' id="close_date" name="close_date"
|
||||
class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="duration">
|
||||
<label class="control-label" data-name="duration"> Duration </label>
|
||||
<div class="field" data-name="duration">
|
||||
<select class="form-control main-element" id="duration" name="duration">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="reminders">
|
||||
<label class="control-label" data-name="reminders"> Reminders </label>
|
||||
<a type="button" id="addreminder"
|
||||
style="padding-top: 5px;border: none">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<div id="reminders" class="field" data-name="reminders">
|
||||
<div class="reminders-container">
|
||||
<div class="input-group reminder">
|
||||
<input type="hidden" id="pushreminder"/>
|
||||
<div id="reminder1">
|
||||
<div class="reminderslist" style="display: inline-flex;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><i id="reminder_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-12 form-group" data-name="description">
|
||||
<label class="control-label" data-name="description"> Description </label>
|
||||
<div class="field" data-name="description">
|
||||
<textarea id="description" class="main-element form-control" rows="4" name="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" type="button" class="btn btn-default">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END CREATE MEETING MODEL-->
|
||||
</div>
|
||||
</div>
|
||||
<form id="edit_form" method="POST" action="{% url 'cases:edit_case' case.id %}" >
|
||||
<div class="overview_form_block row marl" id="editdiv" {% if edit2%}style="display:block"{% endif %} style="display:none">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Overview
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_name" >Name*</label>
|
||||
<input type="text" id="id_name" maxlength="64" name="name" value="{{case.name}}" class="form-control" />
|
||||
{% if form.errors %}<ul class="errorlist">{{ form.name.errors }}</ul>{% endif %}
|
||||
<i id="NameError" style="display:none; color:red"> *This Field is Required</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_status">Status</label>
|
||||
<select class="form-control" id="id_status" name="status" >
|
||||
{% ifequal case.status None%}<option value="">--Select Status--</option>{% endifequal %}
|
||||
<option value="New" {% ifequal edata.status "New"%} selected{% endifequal%}>New</option>
|
||||
<option value="Assigned" {% ifequal case.status "Assigned"%} selected{% endifequal%}>Assigned</option>
|
||||
<option value="Pending" {% ifequal case.status "Pending"%} selected{% endifequal%}>Pending</option>
|
||||
<option value="Closed" {% ifequal case.status "Closed"%} selected{% endifequal%}>Closed</option>
|
||||
<option value="Rejected" {% ifequal case.status "Rejected"%} selected{% endifequal%}>Rejected</option>
|
||||
<option value="Duplicate" {% ifequal case.status "Duplicate"%} selected{% endifequal%}>Duplicate</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_priority">Priority</label>
|
||||
<select class="form-control" id="id_priority" name="priority">
|
||||
{% ifequal case.priority None%}<option value="">--Select Priority--</option>{% endifequal %}
|
||||
<option value="Low" {% ifequal case.priority "Low"%} selected{% endifequal%}>Low</option>
|
||||
<option value="Normal" {% ifequal case.priority "Normal"%} selected{% endifequal%}>Normal</option>
|
||||
<option value="High" {% ifequal case.priority "High"%} selected{% endifequal%}>High</option>
|
||||
<option value="Urgent" {% ifequal case.priority "Urgent"%} selected{% endifequal%}>Urgent</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_case_type">Type</label>
|
||||
<select class="form-control" id="id_case_type" name="case_type">
|
||||
{% ifequal case.case_type None%}<option value="">--Select CaseType--</option>{% endifequal %}
|
||||
<option value="Question" {% ifequal case.case_type "Question"%} selected{% endifequal%}>Question</option>
|
||||
<option value="Incident" {% ifequal case.case_type "Incident"%} selected{% endifequal%}>Incident</option>
|
||||
<option value="Problem" {% ifequal case.case_type "Problem"%} selected{% endifequal%}>Problem</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_account">Account</label>
|
||||
<select class="form-control" id="id_account" name="account" >
|
||||
{% ifequal case.account None%}<option value="">--Select Account--</option>{% endifequal %}
|
||||
{% for ac in accounts %}
|
||||
<option value="{{ac.id}}" {% ifequal case.account.id ac.id %} selected{% endifequal%}>{{ac.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_contacts">Contacts</label>
|
||||
<select class="form-control" multiple="multiple" id="id_contacts" name="contacts" >
|
||||
{% for con in con %}
|
||||
<option value="{{con.id}}" {% for sel in selcon %}
|
||||
{% ifequal con.id sel.id %}
|
||||
selected {% endifequal%}{% endfor %}>{{con.name}}</option>
|
||||
}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_description">Description</label>
|
||||
<textarea class="form-control" textarea cols="40" id="id_description" name="description" rows="4" > {{case.description}}</textarea>
|
||||
<input type="hidden" name="hiddenval" id="hiddenval" value="{{case.id}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" name="assigned_user">
|
||||
{% ifequal a_user "None"%}<option value="" selected>--Select User--</option>{% endifequal %}
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% ifequal a_user.id user.id %} selected{% endifequal%}>{{user.username}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="id_teams">Teams</label>
|
||||
<select class="form-control" id="id_teams" name="teams">
|
||||
{% ifequal case.teams None%}<option value="" selected>--Select Support--</option>{% endifequal %}
|
||||
<option value="Sales" {% ifequal case.teams "Sales"%} selected{% endifequal%}>Sales</option>
|
||||
<option value="Support" {% ifequal case.teams "Support"%} selected{% endifequal%}>Support</option>
|
||||
<option value="TopManagement" {% ifequal case.teams "TopManagement"%} selected{% endifequal%}>TopManagement</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row marl buttons_row text-center">
|
||||
<button class="btn btn-default save" id="edit_update" type="submit">Update</button>
|
||||
<a href="/cases/list" ><button class="btn btn-default" id="edit_cancel" type="submit">Cancel</button></a></form>
|
||||
</div></div></div> </div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_block %}
|
||||
<script src='js/cases/show_case.js'></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var date = new Date();
|
||||
var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
||||
$('#id_closed_on').datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
minDate: today
|
||||
})
|
||||
});
|
||||
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#submitForm').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
|
||||
$('#id_account').change(function(){
|
||||
var account = $("#id_account").val()
|
||||
$.get("{% url 'cases:select_contacts' %}", {"account":account}, function(data){
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function (index, value) {
|
||||
$("#id_contacts").append("<option value="+index+">"+value+"</option>")
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
395
cases/templates/view_case.html
Normal file
395
cases/templates/view_case.html
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block content %}
|
||||
<!-- CASE VIEW STARTS -->
|
||||
<div class="main_container" id="maincontainer">
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading view-pad card-title">
|
||||
<h5>
|
||||
Overview
|
||||
<span class="float-right" style="margin-top: 0px">
|
||||
<div class="dropdown buttons_row">
|
||||
<button class="btn btn-primary dropdown-toggle save" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'cases:edit_case' case_record.id %}" id="edit_case">Edit</a></li>
|
||||
<li class="delete_case" ><a href="{% url 'cases:remove_case' case_record.id %}" id="remove_case">REMOVE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12" id="iname">
|
||||
<div class="form-group" >
|
||||
<label class="case_field_label" for="id_name" data-name="name">Name</label>
|
||||
<div class="case_field" id="case_name" data-name="name">{{ case_record.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if case_record.account %}
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_account" data-name="name">Account</label>
|
||||
<div class="case_field" id ="case_account" data-name="name">{{ case_record.account }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if case_record.contacts.all %}
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_contact" data-name="name">Contact</label>
|
||||
<div class="case_field" id="case_contact" data-name="name">
|
||||
{% for contact in case_record.contacts.all %}
|
||||
<li>{{ contact }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if case_record.closed_on %}
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_closedon" data-name="name">Close Date</label>
|
||||
<div class="case_field" id="case_closedon" data-name="name">{{ case_record.closed_on|date }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_status" data-name="name">Status</label>
|
||||
<div class="case_field" id="case_status" data-name="name">{{ case_record.status }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_priority" data-name="name">Priority</label>
|
||||
<div class="case_field" id="case_priority" data-name="name">{{ case_record.priority }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if case_record.case_type %}
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_case_type" data-name="name">Type of Case</label>
|
||||
<div class="case_field" id="case_case_type" data-name="name">{{ case_record.case_type }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="filter_col col-md-12">
|
||||
{% if case_record.description %}
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_description" data-name="name" >Description</label>
|
||||
<div class="case_field" id="case_description" data-name="name">{{ case_record.description }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section starts-->
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>Comments</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-12">
|
||||
<form id="comment_form" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_comments" name="comment" placeholder="Submit Your Comments Here"></textarea><span><i id="CommentError" style="display:none; color:red"></i></span>
|
||||
</br>
|
||||
<div class="buttons_row">
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit" type="submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value="{{case_record.id}}" name="caseid">
|
||||
</form>
|
||||
<ul class="list-group" id="comments_div">
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="float-right right-container">
|
||||
<div class="list-row-buttons btn-group float-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu text-center">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})">Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})">Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}"><pre>{{ comment.comment }}</pre></div>
|
||||
<div class="stream-container">
|
||||
<pre class="float-left">{{ comment.commented_by }}</pre>
|
||||
<pre class="float-right">{{ comment.commented_on }}</pre>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="Comments_Cases_Modal" role="dialog" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Update Your Comment</h4>
|
||||
</div>
|
||||
<form id="comment_edit_form" method="POST" >
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_editcomment" name="comment" placeholder="Submit Your Comments"></textarea>
|
||||
<input type="hidden" value="{{ case.id }}" name="caseid">
|
||||
<input type="hidden" value="" name="commentid" id="commentid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default save" id="comment_edit" type="submit">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section Ends-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>Label</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{% if case_record.assigned_to.all %}
|
||||
<label class="case_field_label" for="id_assigned_user" data-name="name">Assigned User(s)</label>
|
||||
<div class="case_field" id="case_assigned_users" data-name="name">
|
||||
{% for user in case_record.assigned_to.all %}
|
||||
<li>{{ user }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_team" data-name="name">Assigned Team(s)</label>
|
||||
<div class="case_field" id="case_team" data-name="name">
|
||||
{% if not case_record.teams %}
|
||||
Not Assigned Yet
|
||||
{% else %}
|
||||
{% for team in case_record.teams.all %}
|
||||
<li>{{ team }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_created_on" data-name="name">Created On</label>
|
||||
<div class="case_field" id="case_created_on" data-name="name">
|
||||
{{ case_record.created_on }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="case_field_label" for="id_created_by" data-name="name">Created by</label>
|
||||
<div class="case_field" id="case_created_by" data-name="name">
|
||||
{{ case_record.created_by }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- CASE VIEW ENDS -->
|
||||
<!-- CREATE MEETING MODEL
|
||||
<div class="modal fade" id="meeting-dispaly-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="create-meeting-dialog-title" class="modal-title">Meeting</h4>
|
||||
</div>
|
||||
<div id="modelbody" class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group inline-group" data-name="name">
|
||||
<label class="control-label" data-name="name" style="display: inline">
|
||||
Name *
|
||||
</label>
|
||||
<div class="field" data-name="name">
|
||||
<input type="hidden" name="event_type" value="Meeting"/>
|
||||
<input id="name" class="main-element form-control" type="text"
|
||||
autocomplete="off"
|
||||
name="name" required/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="parent">
|
||||
<div class="field" data-name="parent">
|
||||
<label for="parent">Parent </label>
|
||||
<div class="form-group" data-name="parent">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control" id="parent_type" name="parent_type" style="width:150px">
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="parent_name" value="" name="parent_name"
|
||||
class="main-element form-control">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default" id="selectparent"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
<button tabindex="-1" type="button" class="btn btn-default" id="clearparent">
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="status">
|
||||
<label class="control-label" data-name="status"> Status</label>
|
||||
<div class="field" data-name="status">
|
||||
<select class="form-control main-element" id="status" name="status">
|
||||
</select>
|
||||
<i id="status_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="dateStart">
|
||||
<label class="control-label" data-name="dateEnd"> Date Start * </label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='startdatepicker'>
|
||||
<input type='text' name="start_date" class="form-control"
|
||||
id="start_date"
|
||||
required/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="dateEnd">
|
||||
<label class="control-label" data-name="dateEnd"> Date End *</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date' id='enddatepicker'>
|
||||
<input type='text' id="close_date" name="close_date"
|
||||
class="form-control"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="duration">
|
||||
<label class="control-label" data-name="duration"> Duration </label>
|
||||
<div class="field" data-name="duration">
|
||||
<select class="form-control main-element" id="duration" name="duration">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="reminders">
|
||||
<label class="control-label" data-name="reminders"> Reminders </label>
|
||||
<a type="button" id="addreminder"
|
||||
style="padding-top: 5px;border: none">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<div id="reminders" class="field" data-name="reminders">
|
||||
<div class="reminders-container">
|
||||
<div class="input-group reminder">
|
||||
<input type="hidden" id="pushreminder"/>
|
||||
<div id="reminder1">
|
||||
<div class="reminderslist" style="display: inline-flex;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<i id="reminder_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-12 form-group" data-name="description">
|
||||
<label class="control-label" data-name="description"> Description </label>
|
||||
<div class="field" data-name="description">
|
||||
<textarea id="description" class="main-element form-control" rows="4" name="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" type="button" class="btn btn-default">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
END CREATE MEETING MODEL-->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="{% static 'js/cases/view_case.js' %}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('#remove_case').click(function(e){
|
||||
var result = confirm("Are You Sure You Want to delete?");
|
||||
if (result==false) {
|
||||
e.preventDefault()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var date = new Date();
|
||||
var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
||||
$('#id_closed_on').datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
minDate: today
|
||||
})
|
||||
});
|
||||
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#submitForm').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
|
||||
$('#id_account').change(function(){
|
||||
var account = $("#id_account").val()
|
||||
$.get("{% url 'cases:select_contacts' %}", {"account":account}, function(data){
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function (index, value) {
|
||||
$("#id_contacts").append("<option value="+index+">"+value+"</option>")
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
3
cases/templates/view_contacts.html
Normal file
3
cases/templates/view_contacts.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{% for c in contacts %}
|
||||
<div class="field case_contacts" data-name="name">{{c.name}}</div>
|
||||
{% endfor %}
|
||||
|
|
@ -45,7 +45,7 @@ class CaseViewTestCase(CaseCreation, TestCase):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.context['cases'][0].id, self.case.id)
|
||||
self.assertTrue(response.context['cases'])
|
||||
self.assertTemplateUsed(response, 'cases/cases.html')
|
||||
self.assertTemplateUsed(response, 'cases.html')
|
||||
|
||||
|
||||
class CaseCreationUrlTestCase(CaseCreation, TestCase):
|
||||
|
|
@ -61,7 +61,7 @@ class CaseCreationUrlTestCase(CaseCreation, TestCase):
|
|||
'account': self.account, 'contacts': self.contacts,
|
||||
'priority': "Low",
|
||||
'description': "something", 'teams': 'Sales'})
|
||||
self.assertTemplateUsed(response, 'cases/create_cases.html')
|
||||
self.assertTemplateUsed(response, 'create_cases.html')
|
||||
|
||||
|
||||
class CaseShowTestCase(CaseCreation, TestCase):
|
||||
|
|
@ -72,7 +72,7 @@ class CaseShowTestCase(CaseCreation, TestCase):
|
|||
|
||||
def test_show_case_html(self):
|
||||
response = self.client.get('/cases/' + str(self.case.id) + '/view/')
|
||||
self.assertTemplateUsed(response, 'cases/view_case.html')
|
||||
self.assertTemplateUsed(response, 'view_case.html')
|
||||
|
||||
def test_show_case_invalid_data(self):
|
||||
response = self.client.get('/cases/' + str(self.case.id) + '/view/')
|
||||
|
|
@ -96,6 +96,6 @@ class CaseUpdateTestCase(CaseCreation, TestCase):
|
|||
|
||||
def test_case_update_html(self):
|
||||
response = self.client.post('/cases/' + str(self.case.id) + '/edit_case/', {'hiddenval': self.case.id})
|
||||
self.assertTemplateUsed(response, 'cases/create_cases.html')
|
||||
self.assertTemplateUsed(response, 'create_cases.html')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ def cases_list(request):
|
|||
cases = cases.filter(status=status)
|
||||
if priority:
|
||||
cases = cases.filter(priority=priority)
|
||||
return render(request, "cases/cases.html", {
|
||||
return render(request, "cases.html", {
|
||||
'cases': cases,
|
||||
'accounts': accounts,
|
||||
'acc': int(account),
|
||||
|
|
@ -70,7 +70,7 @@ def add_case(request):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'case_errors': form.errors})
|
||||
return render(request, "cases/create_cases.html", {
|
||||
return render(request, "create_cases.html", {
|
||||
'case_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -82,7 +82,7 @@ def add_case(request):
|
|||
'assignedto_list': [int(user_id) for user_id in assignedto_list],
|
||||
'contacts_list': contacts_list
|
||||
})
|
||||
return render(request, "cases/create_cases.html", {
|
||||
return render(request, "create_cases.html", {
|
||||
'case_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -101,7 +101,7 @@ def view_case(request, case_id):
|
|||
case_record = get_object_or_404(
|
||||
Case.objects.prefetch_related("contacts", "account"), id=case_id)
|
||||
comments = case_record.cases.all()
|
||||
return render(request, "cases/view_case.html", {
|
||||
return render(request, "view_case.html", {
|
||||
'case_record': case_record,
|
||||
'comments': comments
|
||||
})
|
||||
|
|
@ -141,7 +141,7 @@ def edit_case(request, case_id):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'case_errors': form.errors})
|
||||
return render(request, "cases/create_cases.html", {
|
||||
return render(request, "create_cases.html", {
|
||||
'case_obj': case_object,
|
||||
'case_form': form,
|
||||
'accounts': accounts,
|
||||
|
|
@ -155,7 +155,7 @@ def edit_case(request, case_id):
|
|||
'contacts_list': contacts_list
|
||||
})
|
||||
|
||||
return render(request, "cases/create_cases.html", {
|
||||
return render(request, "create_cases.html", {
|
||||
'case_form': form,
|
||||
'case_obj': case_object,
|
||||
'accounts': accounts,
|
||||
|
|
@ -278,6 +278,6 @@ def remove_comment(request):
|
|||
def get_cases(request):
|
||||
if request.method == 'GET':
|
||||
cases = Case.objects.all()
|
||||
return render(request, 'cases/cases_list.html', {'cases': cases})
|
||||
return render(request, 'cases_list.html', {'cases': cases})
|
||||
else:
|
||||
return HttpResponse('Oops!! Something Went Wrong.. in load_calls')
|
||||
|
|
|
|||
78
common/templates/create.html
Normal file
78
common/templates/create.html
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'common:users_list' %}">Users</a></li>
|
||||
<li class="breadcrumb-item">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{% endblock breadcrumb %}
|
||||
{% block content %}
|
||||
<form id="add_form" method="POST" action="" novalidate>
|
||||
<div class="overview_form_block row marl justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE USER
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_firstname">First Name{% if user_form.first_name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<input type="text" class="form-control" name="first_name" value="{% if user_obj %} {{ user_obj.first_name }} {% else %} {{request.POST.first_name}} {% endif %}">
|
||||
</div>
|
||||
<span class="error">{{ errors.first_name }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_lastname">Last Name{% if user_form.last_name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<input type="text" class="form-control" name="last_name" value="{% if user_obj %} {{ user_obj.last_name }} {% else %} {{request.POST.last_name}} {% endif %}">
|
||||
</div>
|
||||
<span class="error">{{ errors.last_name }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_username">Username{% if user_form.username.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<input type="text" class="form-control" name="username" value="{% if user_obj %} {{ user_obj.username }} {% else %} {{request.POST.username}} {% endif %}">
|
||||
</div>
|
||||
<span class="error">{{ errors.username }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_email">Email Address{% if user_form.email.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<input type="text" class="form-control" name="email" value="{% if user_obj %} {{ user_obj.email }} {% else %} {{request.POST.email}} {% endif %}" {% if user_obj and not user_obj.is_staff %} readonly=""{% endif %}>
|
||||
</div>
|
||||
<span class="error">{{ errors.email }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="id_role">User Role{% if user_form.role.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ user_form.role }}
|
||||
<span class="error">{{ user_form.role.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if not user_obj %}
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Password{% if user_form.password.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<input type="password" class="form-control" name="password" value="{{request.POST.password}}">
|
||||
</div>
|
||||
<span class="error">{{ errors.password }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row marl buttons_row form_btn_row text-center">
|
||||
<button class="btn btn-default save" type="submit">Save</button>
|
||||
<a href="{% url 'common:users_list' %}" class="btn btn-default clear" id="create_user_cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
141
common/templates/list.html
Normal file
141
common/templates/list.html
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="no-gutters row">
|
||||
<div class="col-md-6">
|
||||
<h4>Users</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'common:create_user'%}"><i class="fa fa-plus"></i> Add New User</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title">Filters</div>
|
||||
<form id="users_filter" action="" method="POST">
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">User Name</label>
|
||||
<input type="text" class="form-control" placeholder="Username" name="username" value="{{request.POST.username}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">First Name</label>
|
||||
<input type="text" class="form-control" placeholder="First Name" name="first_name" value="{{request.POST.first_name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email</label>
|
||||
<input type="text" class="form-control" placeholder="Email" name="email" value="{{request.POST.email}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row">
|
||||
<button class="btn btn-primary save" type="submit">Search</button>
|
||||
<a href="{% url 'common:users_list' %}" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title list">
|
||||
List of Users
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Users {{ users|length }}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive ">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.No</th>
|
||||
<th width="20%" style="text-align:center;">First Name</th>
|
||||
<th width="20%" style="text-align:center;">Username</th>
|
||||
<th width="20%" style="text-align:center;">Email Address</th>
|
||||
<th width="15%" style="text-align:center;">Status</th>
|
||||
<th width="20%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page users %}
|
||||
{% else %}
|
||||
{% paginate 10 users %}
|
||||
{% endif %}
|
||||
{% for user in users %}
|
||||
<tr class="text-center">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td>{{ user.first_name }}</td>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td>
|
||||
{% if user.is_active == True %}
|
||||
Active
|
||||
{% else %}
|
||||
InActive
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="actions">
|
||||
<!-- <a href="{% url 'common:view_user' user.id %}" class="btn btn-info view"><i class="fas fa-eye"></i>View</a> -->
|
||||
<a href="{% url 'common:edit_user' user.id %}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a href="{% url 'common:remove_user' user.id %}" class="btn btn-danger trash" {% if request.user.email == user.email or user.role == "ADMIN" %} style="visibility: hidden;" {% endif %}><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% ifequal users|length 0 %}
|
||||
<h6 class="text-center">No User Records Found</h6>
|
||||
{% endifequal %}
|
||||
<div class="marl row text-center">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$('.trash').click(function(e){
|
||||
e.preventDefault()
|
||||
url = $(this).attr('href')
|
||||
if (!confirm('Are you sure you want to delete?'))
|
||||
return;
|
||||
window.location = $(this).attr('href')
|
||||
});
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#users_filter').attr("action", $(this).attr("href"));
|
||||
$('#users_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
|
|
@ -100,7 +100,7 @@ def users_list(request):
|
|||
users_list = users_list.filter(username__icontains=username)
|
||||
if email:
|
||||
users_list = users_list.filter(email__icontains=email)
|
||||
return render(request, "users/list.html", {
|
||||
return render(request, "list.html", {
|
||||
'users': users_list, 'active_users': active_users,
|
||||
'per_page': page, 'inactive_users': inactive_users
|
||||
})
|
||||
|
|
@ -118,9 +118,9 @@ def create_user(request):
|
|||
user.save()
|
||||
return redirect("common:users_list")
|
||||
else:
|
||||
return render(request, 'users/create.html', {'user_form': user_form, "errors": user_form.errors})
|
||||
return render(request, 'create.html', {'user_form': user_form, "errors": user_form.errors})
|
||||
else:
|
||||
return render(request, 'users/create.html', {'user_form': user_form})
|
||||
return render(request, 'create.html', {'user_form': user_form})
|
||||
|
||||
|
||||
@admin_required
|
||||
|
|
@ -129,7 +129,7 @@ def view_user(request, user_id):
|
|||
user_obj = User.objects.filter(id=user_id)
|
||||
active_users = User.objects.filter(is_active=True)
|
||||
inactive_users = User.objects.filter(is_active=False)
|
||||
return render(request, "users/list.html", {
|
||||
return render(request, "list.html", {
|
||||
'users': users_list, 'user_obj': user_obj,
|
||||
'active_users': active_users, 'inactive_users': inactive_users
|
||||
})
|
||||
|
|
@ -148,9 +148,9 @@ def edit_user(request, user_id):
|
|||
else:
|
||||
return redirect("common:users_list")
|
||||
else:
|
||||
return render(request, 'users/create.html', {'user_form': user_form, "errors": user_form.errors})
|
||||
return render(request, 'create.html', {'user_form': user_form, "errors": user_form.errors})
|
||||
else:
|
||||
return render(request, 'users/create.html', {'user_form': user_form, 'user_obj': user_obj})
|
||||
return render(request, 'create.html', {'user_form': user_form, 'user_obj': user_obj})
|
||||
|
||||
|
||||
@admin_required
|
||||
|
|
|
|||
163
contacts/templates/contacts.html
Normal file
163
contacts/templates/contacts.html
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="no-gutters row">
|
||||
<div class="col-md-6">
|
||||
<h4>Contacts</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'contacts:add_contact'%}"><i class="fa fa-plus"></i> Add New Contact</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<form id="contacts_filter" action="" method="POST">
|
||||
<div class="card-body">
|
||||
<div class="card-title">Filters</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">ACCOUNTS</label>
|
||||
<select class="form-control" id="id_account" name="account">
|
||||
<option value="" selected="selected">--Select an Account--</option>
|
||||
{% for account in accounts %}
|
||||
<option value="{{account.id}}" {%ifequal account.id request.POST.account|add:"0"%} selected {%endifequal%}>{{ account.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">NAME</label>
|
||||
<input type="text" class="form-control" placeholder="First Name" name="first_name" value="{{request.POST.first_name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">CITY</label>
|
||||
<input type="text" class="form-control" placeholder="City" name="city" value="{{request.POST.city}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row">
|
||||
<button class="btn btn-primary save" type="submit">Search</button>
|
||||
<a href="{% url 'contacts:list' %}" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<!-- contacts list start -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-title">
|
||||
List of Contacts
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Contacts {{contact_obj_list|length}}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.no</th>
|
||||
<th width="20%" style="text-align:center;">Name</th>
|
||||
<th width="20%" style="text-align:center;">Account</th>
|
||||
<th width="15%" style="text-align:center;">City</th>
|
||||
<th width="15%" style="text-align:center;">State</th>
|
||||
<th width="25%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page contact_obj_list %}
|
||||
{% else%}
|
||||
{% paginate 10 contact_obj_list %}
|
||||
{% endif %}
|
||||
{% for contact in contact_obj_list %}
|
||||
<tr style="text-align:center;">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'contacts:view_contact' contact.id %}">{{contact.first_name}}</a></td>
|
||||
<td>
|
||||
{% if contact.account %}
|
||||
<a href="{% url 'accounts:view_account' contact.account.id %}">{{contact.account}}</a>
|
||||
{% else %}
|
||||
No Related Account
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if contact.address.city %}
|
||||
{{contact.address.city}}
|
||||
{% else %}
|
||||
Not Specified
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if contact.address.state %}
|
||||
{{contact.address.state}}
|
||||
{% else %}
|
||||
Not Specified
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="actions">
|
||||
<a href="{% url 'contacts:view_contact' contact.id %}" class="btn btn-info view"><i class="fas fa-eye"></i> View</a>
|
||||
<a href="{% url 'contacts:edit_contact' contact.id%}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a href="{% url 'contacts:remove_contact' contact.id %}" class="btn btn-danger delete remove_account"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor%}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{%ifequal contact_obj_list|length 0 %}
|
||||
<h6 class="text-center">No Contact Records Found</h6>
|
||||
{%endifequal%}
|
||||
<div class="marl row text-center">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<!-- contacts list end -->
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{%endblock%}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$('.delete').click(function(e){
|
||||
e.preventDefault()
|
||||
url = $(this).attr('href')
|
||||
if (!confirm('Are you sure you want to delete?'))
|
||||
return;
|
||||
window.location = $(this).attr('href')
|
||||
});
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#contacts_filter').attr("action", $(this).attr("href"));
|
||||
$('#contacts_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
38
contacts/templates/contacts_list.html
Normal file
38
contacts/templates/contacts_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal contacts|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO CONTACTS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for contact in contacts %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<a class="cell parentname" id="{{ contact.id }}">
|
||||
{{ contact.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="cell parentemail">
|
||||
{{ contact.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
138
contacts/templates/create_contact.html
Normal file
138
contacts/templates/create_contact.html
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
{% block extralinks %}
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'contacts:list' %}">Contacts</a></li>
|
||||
<li class="breadcrumb-item active">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form id="add_form" method="POST" action='' novalidate>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE CONTACT
|
||||
</div>
|
||||
<div class="row marl no-gutters">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Name{% if contact_form.first_name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<div class="row">
|
||||
<div class="filter_col col-md-6">
|
||||
{{ contact_form.first_name }}
|
||||
<span class="error">{{ contact_form.first_name.errors }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
{{ contact_form.last_name }}
|
||||
<span class="error">{{ contact_form.last_name.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account{% if contact_form.account.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ contact_form.account }}
|
||||
<span class="error">{{ contact_form.account.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" class="required" >Phone{% if contact_form.phone.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ contact_form.phone }}
|
||||
<span class="error">{{ contact_form.phone.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" class="required" >Email Address{% if contact_form.email.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ contact_form.email }}
|
||||
<span class="error">{{ contact_form.email.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="assigned_users form-control" name="assigned_to" multiple="multiple">
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% if user in contact_obj.assigned_to.all or user.id in assignedto_list %} selected="" {% endif %}>{{user.email}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="error">{{ contact_form.assigned_to.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Address</label>
|
||||
{{ address_form.address_line }}
|
||||
<span class="error">{{ address_form.address_line.errors }}</span>
|
||||
</div>
|
||||
{{ address_form.street }}
|
||||
<span class="error">{{ address_form.street.errors }}</span>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="col-md-4">
|
||||
{{ address_form.city }}
|
||||
{{ address_form.city.errors }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ address_form.state }}
|
||||
<span class="error">{{ address_form.state.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ address_form.postcode }}
|
||||
<span class="error">{{ address_form.postcode.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-top: 10px;">
|
||||
{{ address_form.country }}
|
||||
<span class="error">{{ address_form.country.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Description{% if contact_form.description.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ contact_form.description }}
|
||||
<span class="error">{{ contact_form.description.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="save_new_form" name="savenewform">
|
||||
</div>
|
||||
<div class="row marl buttons_row text-center form_btn_row">
|
||||
<button class="btn btn-default save" type="submit">Save</button>
|
||||
{% if not contact_obj %}
|
||||
<button class="btn btn-success save savenew" type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'contacts:list' %}" class="btn btn-default clear" id="create_contact_cancel">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#add_form').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
321
contacts/templates/view_contact.html
Normal file
321
contacts/templates/view_contact.html
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"> <a href="{% url 'contacts:list' %}">Contacts</a></li>
|
||||
<li class="breadcrumb-item active">view</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{%endblock%}
|
||||
{%block content%}
|
||||
<!-- CONTACTS VIEW STARTS -->
|
||||
<div class="main_container" id="maincontainer">
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>
|
||||
overview
|
||||
<span class="float-right" style="margin-top: 0px">
|
||||
<div class="dropdown buttons_row">
|
||||
<button class="btn btn-primary dropdown-toggle save" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'contacts:edit_contact' contact_record.id %}">Edit</a></li>
|
||||
<li class="delete_contact" ><a href="{% url 'contacts:remove_contact' contact_record.id %}" id="remove_contact">REMOVE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12" id="iname">
|
||||
<div class="form-group" >
|
||||
<label class="contact_field_label" for="id_name" data-name="name">Name</label>
|
||||
<div class="contact_field" id="contact_name" data-name="name">{{ contact_record.first_name }} {{ contact_record.last_name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_contact_account" data-name="name">Account</label>
|
||||
<div class="contact_field" id ="contact_account" data-name="name">{{ contact_record.account }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_phone" data-name="name">Phone</label>
|
||||
<div class="contact_field" id="contact_phone" data-name="name">{{ contact_record.phone }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_email" data-name="name">Email</label>
|
||||
<div class="contact_field" id="contact_email" data-name="name">{{ contact_record.email }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{% if contact_record.address.address_line or contact_record.address.street or contact_record.address.city or contact_record.address.state or contact_record.address.postcode or contact_record.address.country %}
|
||||
<label class="contact_field_label" for="id_address" data-name="name" >Billing Address</label>
|
||||
<div class="contact_field" id="contact_address" data-name="name">
|
||||
{% if contact_record.address.address_line %}
|
||||
Address Line:{{contact_record.address.address_line}}</br>
|
||||
{% endif %}
|
||||
{% if contact_record.address.street %}
|
||||
Street:{{ contact_record.address.street }}</br>
|
||||
{% endif %}
|
||||
{% if contact_record.address.city %}
|
||||
City: {{ contact_record.address.city }}</br>
|
||||
{% endif %}
|
||||
{% if contact_record.address.state %}
|
||||
State:{{ contact_record.address.state }}</br>
|
||||
{% endif %}
|
||||
{% if contact_record.address.postcode %}
|
||||
Post Code:{{ contact_record.address.postcode }}</br>
|
||||
{% endif %}
|
||||
{% if contact_record.address.country %}
|
||||
Country: {{ contact_record.address.get_country_display }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{% if contact_record.description %}
|
||||
<label class="contact_field_label" for="id_description" data-name="name">Description</label>
|
||||
<div class="contact_field" id="contact_description" data-name="name">{{ contact_record.description }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section starts-->
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="card-title view-pad">
|
||||
<h5>Comments</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-12">
|
||||
<form id="comment_form" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_comments" name="comment" placeholder="Submit Your Comments Here"></textarea><span><i id="CommentError" style="display:none; color:red"></i></span>
|
||||
</br>
|
||||
<div class="buttons_row">
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit" type="submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value="{{contact_record.id}}" name="contactid">
|
||||
</form>
|
||||
<ul class="list-group" id="comments_div">
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="float-right right-container">
|
||||
<div class="list-row-buttons btn-group float-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu text-center">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})">Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})">Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}"><pre>{{ comment.comment }}</pre></div>
|
||||
<div class="stream-container">
|
||||
<pre class="float-left">{{ comment.commented_by }}</pre>
|
||||
<pre class="float-right">{{ comment.commented_on }}</pre>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="Comments_Contacts_Modal" role="dialog" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Update Your Comment</h4>
|
||||
</div>
|
||||
<form id="comment_edit_form" method="POST" >
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_editcomment" name="comment" placeholder="Submit Your Comments"></textarea>
|
||||
<input type="hidden" value="{{ contact.id }}" name="contactid">
|
||||
<input type="hidden" value="" name="commentid" id="commentid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default save" id="comment_edit" type="submit">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section Ends-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>Label</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{%if contact_record.assigned_to.all %}
|
||||
<label class="contact_field_label" for="id_assigned_user" data-name="name">Assigned User(s)</label>
|
||||
<div class="contact_field" id="contact_assigned_users" data-name="name">
|
||||
{% for user in contact_record.assigned_to.all %}
|
||||
<li>{{ user }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_team" data-name="name">Assigned Team(s)</label>
|
||||
<div class="contact_field" id="contact_team" data-name="name">
|
||||
{%if not contact_record.teams %}
|
||||
Not Assigned Yet
|
||||
{% else %}
|
||||
{% for team in contact_record.teams.all %}
|
||||
<li>{{ team }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_created_on" data-name="name">Created On</label>
|
||||
<div class="contact_field" id="contact_created_on" data-name="name">
|
||||
{{ contact_record.created_on }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="contact_field_label" for="id_created_by" data-name="name">Created by</label>
|
||||
<div class="contact_field" id="contact_created_by" data-name="name">
|
||||
{{ contact_record.created_by }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- CONTACTS VIEW ENDS -->
|
||||
{% endblock%}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#comment_form").submit(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url: "{% url 'contacts:add_comment' %}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentError").html(data.error).show()
|
||||
} else {
|
||||
d = new Date(data.commented_on);
|
||||
$("#comments_div").prepend("<li class='list-group-item list-row' id='comment" + data.comment_id + "'>" +
|
||||
"<div class='float-right right-container'>" +
|
||||
"<div class='list-row-buttons btn-group float-right'>" +
|
||||
"<button class='btn btn-link btn-sm dropdown-toggle' data-toggle='dropdown' type='button'><span class='caret'></span></button>" +
|
||||
"<ul class='dropdown-menu text-center'>" +
|
||||
"<li><a class='action' onclick='edit_comment(" + data.comment_id + ")'>Edit</a></li>" +
|
||||
"<li><a class='action' onclick='remove_comment(" + data.comment_id + ")''>Remove</a></li></ul></div></div>" +
|
||||
"<div class='stream-post-container' id='comment_name"+data.comment_id+"'><pre>"+data.comment+"</pre></div>"+
|
||||
"<div class='stream-container'><pre class='float-left'>"+data.commented_by+"</pre><pre class='float-right'>"+d.toGMTString()+"</pre></div>"
|
||||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function edit_comment(x) {
|
||||
$('#Comments_Contacts_Modal').modal('show');
|
||||
comment = $("#comment_name" + x).text()
|
||||
$("#commentid").val(x)
|
||||
$("#id_editcomment").val(comment)
|
||||
}
|
||||
|
||||
$("#comment_edit").click(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url: "/contacts/comment/edit/",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentEditError").html(data.error).show()
|
||||
} else {
|
||||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Contacts_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function HideError(e) {
|
||||
$("#CommentError").hide()
|
||||
}
|
||||
|
||||
function remove_comment(x) {
|
||||
var con = confirm("Do you want to Delete it for Sure!?")
|
||||
if (con == true) {
|
||||
$.post('/contacts/comment/remove/', {
|
||||
"comment_id": x
|
||||
}, function (data) {
|
||||
if (data.error) {
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment" + data.cid).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$('#remove_contact').click(function(e){
|
||||
var result = confirm("Are You Sure You Want to delete?");
|
||||
if (result==false) {
|
||||
e.preventDefault()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
|
|
@ -47,7 +47,7 @@ class ContactViewsTestCase(ContactObjectsCreation, TestCase):
|
|||
|
||||
def test_contacts_list_html(self):
|
||||
response = self.client.get('/contacts/list/')
|
||||
self.assertTemplateUsed(response, 'contacts/contacts.html')
|
||||
self.assertTemplateUsed(response, 'contacts.html')
|
||||
|
||||
def test_contacts_create(self):
|
||||
response = self.client.post('/contacts/create/', {
|
||||
|
|
@ -59,7 +59,7 @@ class ContactViewsTestCase(ContactObjectsCreation, TestCase):
|
|||
response = self.client.post('/contacts/create/', {
|
||||
'name': 'contact', 'email': 'contact@gmail.com', 'phone': '12345',
|
||||
'account': self.account.id, 'address': self.address, 'description': 'contact'})
|
||||
self.assertTemplateUsed(response, 'contacts/create_contact.html')
|
||||
self.assertTemplateUsed(response, 'create_contact.html')
|
||||
|
||||
def test_contacts_delete(self):
|
||||
Contact.objects.filter(id=self.contact.id).delete()
|
||||
|
|
@ -80,7 +80,7 @@ class ContactViewsTestCase(ContactObjectsCreation, TestCase):
|
|||
response = self.client.post('/contacts/'+ str(self.contact.id) +'/edit/', {
|
||||
'name': 'priya', 'email': 'contact@gmail.com', 'phone': '12345',
|
||||
'pk': self.contact.id, 'account': self.account.id, 'address': self.address.id})
|
||||
self.assertTemplateUsed(response, 'contacts/create_contact.html')
|
||||
self.assertTemplateUsed(response, 'create_contact.html')
|
||||
|
||||
def test_contacts_view(self):
|
||||
response = self.client.get('/contacts/'+ str(self.contact.id) +'/view/')
|
||||
|
|
@ -89,6 +89,6 @@ class ContactViewsTestCase(ContactObjectsCreation, TestCase):
|
|||
|
||||
def test_contacts_view_html(self):
|
||||
response = self.client.get('/contacts/'+ str(self.contact.id) +'/view/')
|
||||
self.assertTemplateUsed(response, 'contacts/view_contact.html')
|
||||
self.assertTemplateUsed(response, 'view_contact.html')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ def contacts_list(request):
|
|||
contact_obj_list = contact_obj_list.filter(phone__icontains=phone)
|
||||
if email:
|
||||
contact_obj_list = contact_obj_list.filter(email__icontains=email)
|
||||
return render(request, 'contacts/contacts.html', {
|
||||
return render(request, 'contacts.html', {
|
||||
'contact_obj_list': contact_obj_list,
|
||||
'accounts': accounts,
|
||||
'per_page': page
|
||||
|
|
@ -71,7 +71,7 @@ def add_contact(request):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'contact_errors': form.errors})
|
||||
return render(request, 'contacts/create_contact.html', {
|
||||
return render(request, 'create_contact.html', {
|
||||
'contact_form': form,
|
||||
'address_form': address_form,
|
||||
'accounts': accounts,
|
||||
|
|
@ -82,7 +82,7 @@ def add_contact(request):
|
|||
'teams_list': teams_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'contacts/create_contact.html', {
|
||||
return render(request, 'create_contact.html', {
|
||||
'contact_form': form,
|
||||
'address_form': address_form,
|
||||
'accounts': accounts,
|
||||
|
|
@ -99,7 +99,7 @@ def view_contact(request, contact_id):
|
|||
contact_record = get_object_or_404(
|
||||
Contact.objects.select_related("address"), id=contact_id)
|
||||
comments = contact_record.contact_comments.all()
|
||||
return render(request, 'contacts/view_contact.html', {
|
||||
return render(request, 'view_contact.html', {
|
||||
'contact_record': contact_record,
|
||||
'comments': comments})
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ def edit_contact(request, pk):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'contact_errors': form.errors})
|
||||
return render(request, 'contacts/create_contact.html', {
|
||||
return render(request, 'create_contact.html', {
|
||||
'contact_form': form,
|
||||
'address_form': address_form,
|
||||
'contact_obj': contact_obj,
|
||||
|
|
@ -146,7 +146,7 @@ def edit_contact(request, pk):
|
|||
'teams_list': teams_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'contacts/create_contact.html', {
|
||||
return render(request, 'create_contact.html', {
|
||||
'contact_form': form,
|
||||
'address_form': address_form,
|
||||
'contact_obj': contact_obj,
|
||||
|
|
@ -239,6 +239,6 @@ def remove_comment(request):
|
|||
def get_contacts(request):
|
||||
if request.method == 'GET':
|
||||
contacts = Contact.objects.filter()
|
||||
return render(request, 'contacts/contacts_list.html', {'contacts': contacts})
|
||||
return render(request, 'contacts_list.html', {'contacts': contacts})
|
||||
else:
|
||||
return HttpResponse('Invalid Method or Not Authanticated in load_calls')
|
||||
|
|
|
|||
163
emails/templates/create_mail.html
Normal file
163
emails/templates/create_mail.html
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- breadcrumb starts here -->
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#">Mails</a></li>
|
||||
<li class="active">Create Mail</li>
|
||||
</ol>
|
||||
<!-- breadcrumb ends here -->
|
||||
<!-- overview starts here -->
|
||||
<form id="email_form" action="." method="POST">
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Compose email
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From *</label>
|
||||
<!--<select class="form-control text-filter">
|
||||
<option>Select</option>
|
||||
<option>aditya@micropyramid.com</option>
|
||||
</select>-->
|
||||
<input type="email" class="form-control" id="from_email" name="from_email"{% if x %} value="{{x.from_email.value}}" {% endif %}
|
||||
{% if form.errors %} value="{{request.POST.from_email}}" {% endif %}
|
||||
value="{{em.from_email}}"/>
|
||||
</div>
|
||||
<span class='error'> {{ form.from_email.errors }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">CC</label>
|
||||
<input type="text" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To *</label>
|
||||
<input type="email" class="form-control" id="to_email" name="to_email"
|
||||
{% if x %} value="{{x.to_email.value}}" {% endif %}
|
||||
{% if form.errors %} value="{{request.POST.to_email}}" {% endif %}
|
||||
value="{{em.to_email}}" />
|
||||
</div>
|
||||
<span class='error'> {{ form.to_email.errors }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">BCC</label>
|
||||
<input type="text" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Subject *</label>
|
||||
<input type="text" class="form-control" id="subject" name="subject"
|
||||
{% if x %} value="{{x.subject.value}}" {% endif %}
|
||||
{% if form.errors %} value="{{request.POST.subject}}" {% endif %}
|
||||
value="{{em.subject}}"/>
|
||||
</div>
|
||||
<span class='error'> {{ form.subject.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Parent</label>
|
||||
<div class="input-group" style="width:100%;">
|
||||
<div class="input-group-btn left-dropdown" style="width:auto;">
|
||||
<select class="form-control">
|
||||
<option>Account</option>
|
||||
</select>
|
||||
</div>
|
||||
<select class="form-control text-filter">
|
||||
<option>Select</option>
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search btn-icon" data-action="search">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Select Template</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Message *</label>
|
||||
<textarea class="input form-control" rows="8" name="message" id="message">
|
||||
{% if x %} {{x.message.value}} {% endif %} {{em.message}}
|
||||
</textarea>
|
||||
</div>
|
||||
<span class='error'> {{ form.message.errors }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<!-- overview ends here -->
|
||||
|
||||
<div class="row marl buttons_row text-center">
|
||||
<div id="extra_hide">
|
||||
<button class="btn btn-default save" type="submit">Send</button>
|
||||
<a href="/emails/email_draft/"><button class="btn btn-default" name="email_draft" value="draft" type="submit">Save As Draft</button></a>
|
||||
</div>
|
||||
<div id="seperated_one">
|
||||
<a href="/emails/list/"><button class="btn btn-default" type="button">Cancel</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
|
||||
<!-- ck editor -->
|
||||
<script src="http://cdn.ckeditor.com/4.5.4/basic/ckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
CKEDITOR.replace( 'job_description',
|
||||
{
|
||||
|
||||
// skin : 'office2003',
|
||||
uiColor: '#ffffff',
|
||||
height: 120
|
||||
//width: 700,
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// CKEDITOR.replace('description', {
|
||||
// customConfig: "{% static 'js/custom/ckeditor_config.js' %}"
|
||||
// });
|
||||
</script>
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
{% if x %}
|
||||
$("#extra_hide").hide();
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
</body>
|
||||
</html>
|
||||
154
emails/templates/emails.html
Normal file
154
emails/templates/emails.html
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="submit" name="compose" id="compose" value="compose"/>
|
||||
</body>
|
||||
|
||||
|
||||
<form method="POST" action="/emails/email_sent/">
|
||||
<input type="submit" name="sent_email" id="sent_mail" value="sent mails"/>
|
||||
</form>
|
||||
|
||||
<form method="POST" action="/emails/email_trash/">
|
||||
<input type="submit" name="trash" id="trash" value="trash"/>
|
||||
</form>
|
||||
|
||||
<form method="POST" action="/emails/email_draft/">
|
||||
<input type="submit" name="draft" id="draft" value="draft"/>
|
||||
</form>
|
||||
|
||||
<div id="table" style="display:none">
|
||||
<form method="POST" id="detail" action="/emails/email/" enctype="multipart/form-data">
|
||||
<table border="1">
|
||||
|
||||
|
||||
FROM:<input type="email" id= "from_email" name="from_email"/>
|
||||
<p class="errors" id="from_errors" style="display:none"> This field is required</p>
|
||||
TO:<input type="email" id="to_email" name="to_email"/>
|
||||
<p class="errors" id="to_errors" style="display:none"> This field is required</p>
|
||||
SUBJECT:<input type="text" name="subject"/>
|
||||
<p class="errors" id="subject_errors" style="display:none"> This field is required</p>
|
||||
MESSAGE:<input type="text" name="message"/>
|
||||
<p class="errors" id="message_errors" style="display:none"> This field is required</p>
|
||||
FILEUPLOAD:<input type="file" name="files"/>
|
||||
|
||||
<input type="submit" id="email_draft" name="email_draft" value="save draft"/>
|
||||
<input type="submit" value="submit"/>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#compose").click(function(){
|
||||
$("#table").show()
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<select>
|
||||
<option value="archive mail">archive mail</option>
|
||||
<option value="email templates">email templates</option>
|
||||
<option value="folders">folders</option>
|
||||
<option value="filters">filters</option>
|
||||
<option value="Group Email Accounts">Group Email Accounts</option>
|
||||
</select>
|
||||
|
||||
|
||||
<table border="1">
|
||||
{% for sent in email_sent %}
|
||||
<tr>
|
||||
<td>TO : {{sent.to_email}}</td>
|
||||
<td>{{sent.subject}}</td>
|
||||
<td>{{sent.message}}</td>
|
||||
<td>{{sent.send_time}}</td>
|
||||
<td>{{sent.file}}</td>
|
||||
<td><a href='/emails/email_delete/{{sent.id}}/'>delete</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<table border="1">
|
||||
{% for trash in email_trash %}
|
||||
<tr>
|
||||
<td>TO : {{trash.to_email}}</td>
|
||||
<td>{{trash.subject}}</td>
|
||||
<td>{{trash.message}}</td>
|
||||
<td>{{trash.send_time}}</td>
|
||||
<td>{{trash.file}}</td>
|
||||
<td><a id="email_trash_delete" href='/emails/email_trash_delete/{{trash.id}}/'>delete</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<table border="1">
|
||||
{% for draft in email_draft %}
|
||||
<tr>
|
||||
<td>TO : {{draft.to_email}}</td>
|
||||
<td>{{draft.subject}}</td>
|
||||
<td>{{draft.message}}</td>
|
||||
<td>{{draft.send_time}}</td>
|
||||
<td>{{draft.file}}</td>
|
||||
<td><a id="email_draft_delete" href='/emails/email_draft_delete/{{draft.id}}/'>delete</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#email_trash_delete").click(function(e){
|
||||
val=confirm("are you sure? do you want to delete permanently?")
|
||||
if(val == false){
|
||||
alert("coming")
|
||||
e.preventDefault()
|
||||
}
|
||||
});
|
||||
|
||||
$("#detail").submit(function(e){
|
||||
from = $("#from_email").val()
|
||||
to = $("#to_email").val()
|
||||
subject = $("#subject").val()
|
||||
message = $("#message").val()
|
||||
alert("hhhhh")
|
||||
|
||||
if(from == "" && to == "" && subject == "" && message == ""){
|
||||
e.preventDefault()
|
||||
$(".errors").show()
|
||||
}
|
||||
if(from == ""){
|
||||
e.preventDefault()
|
||||
$("#from_errors").show()
|
||||
}
|
||||
if(to == ""){
|
||||
e.preventDefault()
|
||||
$("#to_errors").show()
|
||||
}
|
||||
if(subject == ""){
|
||||
e.preventDefault()
|
||||
$("#subject_errors").show()
|
||||
}
|
||||
if(message == ""){
|
||||
e.preventDefault()
|
||||
$("#message_errors").show()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#email_draft').on(click, function() {
|
||||
var data = {some:$(input[name=data]).val()}
|
||||
$.ajax({
|
||||
url:'email_draft/',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
success: function() {
|
||||
alert('success')
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
125
emails/templates/mail_all.html
Normal file
125
emails/templates/mail_all.html
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block breadcrumb %}
|
||||
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
{% include 'mail_center.html' %}
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
|
||||
<div class="table_container_row row marl">
|
||||
<!-- mail_links starts here -->
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li><a href="{% url 'emails:email_sent' %}">Sent Mails</a></li>
|
||||
<li><a href="{% url 'emails:email_draft' %}">Drafts</a></li>
|
||||
<li><a href="{% url 'emails:email_imp_list' %}">Important</a></li>
|
||||
<li class="active"><a href="{% url 'emails:list' %}">All</a></li>
|
||||
<li><a href="{% url 'emails:email_trash' %}">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mail_links ends here -->
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<form method="GET" action="/emails/list/" id="filter_form" >
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" value="{{request.GET.name}}" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From Date</label>
|
||||
<input type="text" class="form-control" id="from_date" placeholder="yyyy-mm-dd" value="{{request.GET.from_date}}" name="from_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To Date</label>
|
||||
<input type="text" class="form-control" id="to_date" placeholder="yyyy-mm-dd" value="{{request.GET.to_date}}" name="to_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col filter_buttons col-md-3"></div>
|
||||
<button class="btn btn-primary save" name="email_f" value="all" type="submit">Search</button>
|
||||
<a href="{% url 'emails:list' %}"><button type="button" class="btn btn-primary btn-default">Clear</button></a>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th ><input type="checkbox"></th>-->
|
||||
<th >To</th>
|
||||
<th >Subject</th>
|
||||
<th >Message</th>
|
||||
<th >Date Sent</th>
|
||||
<th >Status</th>
|
||||
<span class="pull-right total_count">Total Mails :{{filter_list.count}}</span>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% paginate 10 filter_list as filter_list %}
|
||||
{% for fil in filter_list %}
|
||||
<tr>
|
||||
<!-- <td><input type="checkbox"></td>-->
|
||||
<td>{{fil.to_email}}</td>
|
||||
<td>{{fil.subject}}</td>
|
||||
<td><a href="{% url 'emails:email_view' fil.id %}">{{fil.message|stringformat:".5s"}}</a></td>
|
||||
<td>{{fil.send_time}}</td>
|
||||
<td>{{fil.status}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% ifequal filter_list|length 0 %}
|
||||
<h4>
|
||||
<center>No Mails Found</center>
|
||||
</h4>
|
||||
{% else %}
|
||||
<div class="pagination_row marl row text-center">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% show_pages %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{%endifequal%}
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#from_date,#to_date").datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
</body>
|
||||
</html>
|
||||
260
emails/templates/mail_center.html
Normal file
260
emails/templates/mail_center.html
Normal file
|
|
@ -0,0 +1,260 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-2">Mail Center</div>
|
||||
<div class="col-md-7">
|
||||
<div class="row marl search-row">
|
||||
<div class="form-group col-md-8 col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn left-dropdown">
|
||||
<button type="button" class="btn dropdown-toggle filters-button btn-default" title="Filter" data-toggle="dropdown" tabindex="-1" aria-expanded="false"><span class="filters-label">All</span><span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-left filter-menu">
|
||||
<li><a class="preset" tabindex="-1" href="javascript:" data-name="" data-action="selectPreset"><span class="glyphicon glyphicon-ok pull-right"></span><div>All</div></a></li>
|
||||
<li><a class="preset" tabindex="-1" href="javascript:" data-name="portalUsers" data-action="selectPreset"><div>Portal Users</div></a></li>
|
||||
<li class="divider preset-control hidden"></li>
|
||||
<li class="preset-control remove-preset hidden"><a tabindex="-1" href="#" data-action="removePreset">Remove Filter</a></li>
|
||||
<li class="preset-control save-preset hidden"><a tabindex="-1" href="#" data-action="savePreset">Save Filter</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="checkbox"><label><input type="checkbox" data-role="boolFilterCheckbox" name="onlyMy"> Only My</label></li>
|
||||
<li class="checkbox"><label><input type="checkbox" data-role="boolFilterCheckbox" name="followed"> Followed</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" class="form-control text-filter" name="textFilter" value="" tabindex="1">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search btn-icon" data-action="search"><span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-sm-4">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default extra_option_btn" data-action="reset"><span class="glyphicon glyphicon-repeat"></span> Reset
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle extra_option_btn add-filter-button" data-toggle="dropdown" tabindex="-1">Add Field <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li data-name="account" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="account">Account</a></li>
|
||||
<li data-name="address" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="address">Address</a></li>
|
||||
<li data-name="assignedUser" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="assignedUser">Assigned User</a></li>
|
||||
<li data-name="createdAt" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="createdAt">Created At</a></li>
|
||||
<li data-name="emailAddress" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="emailAddress">Email</a></li>
|
||||
<li data-name="phoneNumber" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="phoneNumber">Phone</a></li>
|
||||
<li data-name="title" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="title">Title</a></li>
|
||||
<li data-name="teams" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="teams">Teams</a></li>
|
||||
<li data-name="targetLists" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="targetLists">Target Lists</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="create_new col-md-3 text-right">
|
||||
<a href="{% url 'emails:compose' %}"><i class="fa fa-plus"></i> Compose Email</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
|
||||
<!-- <div class="table_container_row row marl">
|
||||
<! mail_links starts here >
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li class="active"><a href="#">Inbox</a></li>
|
||||
<li><a href="#">Sent Mails</a></li>
|
||||
<li><a href="#">Drafts</a></li>
|
||||
<li><a href="#">Important</a></li>
|
||||
<li><a href="#">All</a></li>
|
||||
<li><a href="#">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<! mail_links ends here >
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="#" class="mark_read">Mark All As Read</a>
|
||||
<span class="pull-right total_count">Total 120 </span>
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ><input type="checkbox"></th>
|
||||
<th ></th>
|
||||
<th >Subject</th>
|
||||
<th >Parent</th>
|
||||
<th >Date Sent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox"></td>
|
||||
<td><a href="#">Edward Stevenson</a></td>
|
||||
<td><a href="#">Introduction - Erika Hellberg</a></td>
|
||||
<td><a href="#"> Erika Hellberg</a></td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Sep 14
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">HTML</a></li>
|
||||
<li><a href="#">CSS</a></li>
|
||||
<li><a href="#">JavaScript</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<! main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_block %}
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
|
||||
{% endblock %}
|
||||
133
emails/templates/mail_drafts.html
Normal file
133
emails/templates/mail_drafts.html
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block breadcrumb %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
{% include 'mail_center.html' %}
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
|
||||
<div class="table_container_row row marl">
|
||||
<!-- mail_links starts here -->
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li><a href="{% url 'emails:email_sent' %}">Sent Mails</a></li>
|
||||
<li class="active"><a href="{% url 'emails:email_draft' %}">Drafts</a></li>
|
||||
<li><a href="{% url 'emails:email_imp_list' %}">Important</a></li>
|
||||
<li><a href="{% url 'emails:list' %}">All</a></li>
|
||||
<li><a href="{% url 'emails:email_trash' %}">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mail_links ends here -->
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<!-- extra-->
|
||||
<div class="filter_row row marl">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<form method="GET" action="/emails/email_draft/" >
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" value="{{request.GET.name}}" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From Date</label>
|
||||
<input type="text" class="form-control" id="from_date" placeholder="From Date" value="{{request.GET.from_date}}" name="from_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To Date</label>
|
||||
<input type="text" class="form-control" id="to_date" placeholder="To Date" value="{{request.GET.to_date}}" name="to_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col filter_buttons col-md-3"></div>
|
||||
<button class="btn btn-primary save" name="email_f" value="draft" type="submit">Search</button>
|
||||
<a href="{% url 'emails:email_draft' %}"><button type="button" class="btn btn-primary btn-default">Clear</button></a>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
<!-- extra-->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th ><input type="checkbox"></th>-->
|
||||
<th >To</th>
|
||||
<th >Subject</th>
|
||||
<th >Message</th>
|
||||
<th >Date Sent</th>
|
||||
<th >Status</th>
|
||||
<span class="pull-right total_count">Total Drafts : {{filter_list.count}}</span>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% paginate 10 filter_list as filter_list %}
|
||||
{% for draft in filter_list %}
|
||||
<tr>
|
||||
<!-- <td><input type="checkbox"></td>-->
|
||||
<td>{{draft.to_email}}</td>
|
||||
<td>{{draft.subject}}</td>
|
||||
<td><a href="{% url 'emails:email_view' draft.id %}">{{draft.message|stringformat:".5s"}}</a></td>
|
||||
<td>{{draft.send_time}}</td>
|
||||
<td>{{draft.status}}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Action<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'emails:email_draft_delete' draft.id %}">Delete</a></li>
|
||||
<li><a href="{% url 'emails:email_imp' draft.id %}">Mark As Important</a></li>
|
||||
<li><a href="{% url 'emails:email_sent_edit' draft.id %}">Edit</a></li>
|
||||
<li><a href="{% url 'emails:email_move_to_trash' draft.id %}">Move To Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% ifequal filter_list|length 0 %}
|
||||
<h4>
|
||||
<center>No Mails Found</center>
|
||||
</h4>
|
||||
{% else %}
|
||||
<div class="pagination_row marl row text-center">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% show_pages %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{%endifequal%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#from_date,#to_date").datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
133
emails/templates/mail_important.html
Normal file
133
emails/templates/mail_important.html
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block breadcrumb %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
{% include 'mail_center.html' %}
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
|
||||
<div class="table_container_row row marl">
|
||||
<!-- mail_links starts here -->
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li><a href="{% url 'emails:email_sent' %}">Sent Mails</a></li>
|
||||
<li><a href="{% url 'emails:email_draft' %}">Drafts</a></li>
|
||||
<li class="active"><a href="{% url 'emails:email_imp_list' %}">Important</a></li>
|
||||
<li><a href="{% url 'emails:list' %}">All</a></li>
|
||||
<li><a href="{% url 'emails:email_trash' %}">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mail_links ends here -->
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<div class="filter_row row marl">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<form method="GET" action="/emails/email_imp_list/" >
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" value="{{request.GET.name}}" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From Date</label>
|
||||
<input type="text" class="form-control" id="from_date" placeholder="From Date" value="{{request.GET.from_date}}" name="from_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To Date</label>
|
||||
<input type="text" class="form-control" id="to_date" placeholder="To Date" value="{{request.GET.to_date}}" name="to_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col filter_buttons col-md-3"></div>
|
||||
<button class="btn btn-primary save" name="email_f" value="True" type="submit">Search</button>
|
||||
<a href="{% url 'emails:email_imp_list' %}"><button type="button" class="btn btn-primary btn-default">Clear</button></a>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th ><input type="checkbox"></th>-->
|
||||
<th >To</th>
|
||||
<th >Subject</th>
|
||||
<th >Message</th>
|
||||
<th >Date Sent</th>
|
||||
<th >Status</th>
|
||||
<th >important</th>
|
||||
<span class="pull-right total_count">Total Mails : {{filter_list.count}}</span>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% paginate 10 filter_list as filter_list %}
|
||||
{% for imp in filter_list %}
|
||||
<tr>
|
||||
<!-- <td><input type="checkbox"></td>-->
|
||||
<td>{{imp.to_email}}</td>
|
||||
<td>{{imp.subject}}</td>
|
||||
<td><a href="{% url 'emails:email_view' imp.id %}">{{imp.message|stringformat:".5s"}}</a></td>
|
||||
<td>{{imp.send_time}}</td>
|
||||
<td>{{imp.status}}</td>
|
||||
<td>{{imp.important}}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'emails:email_unimp' imp.id %}">Mark As Unimportant</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% ifequal filter_list|length 0 %}
|
||||
<h4>
|
||||
<center>No Mails Found</center>
|
||||
</h4>
|
||||
{% else %}
|
||||
<div class="pagination_row marl row text-center">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% show_pages %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{%endifequal%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#from_date,#to_date").datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
</body>
|
||||
</html>
|
||||
136
emails/templates/mail_sent.html
Normal file
136
emails/templates/mail_sent.html
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block breadcrumb %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
{% include 'mail_center.html' %}
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
|
||||
<div class="table_container_row row marl">
|
||||
<!-- mail_links starts here -->
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li class="active"><a href="{% url 'emails:email_sent' %}">Sent Mails</a></li>
|
||||
<li><a href="{% url 'emails:email_draft' %}">Drafts</a></li>
|
||||
<li><a href="{% url 'emails:email_imp_list' %}">Important</a></li>
|
||||
<li><a href="{% url 'emails:list' %}">All</a></li>
|
||||
<li><a href="{% url 'emails:email_trash' %}">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mail_links ends here -->
|
||||
<!-- extra-->
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<div class="filter_row row marl">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<form method="GET" action="/emails/email_sent/" >
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" value="{{request.GET.name}}" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From Date</label>
|
||||
<input type="text" class="form-control" id="from_date" placeholder="From Date" value="{{request.GET.from_date}}" name="from_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To Date</label>
|
||||
<input type="text" class="form-control" id="to_date" placeholder="To Date" value="{{request.GET.to_date}}" name="to_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col filter_buttons col-md-3"></div>
|
||||
<button class="btn btn-primary save" name="email_f" value="sent" type="submit">Search</button>
|
||||
<a href="{% url 'emails:email_sent' %}"><button type="button" class="btn btn-primary btn-default">Clear</button></a>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- extra-->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th ><input type="checkbox"></th>-->
|
||||
<th >TO</th>
|
||||
<th >Subject</th>
|
||||
<th >Message</th>
|
||||
<th >Date Sent</th>
|
||||
<th >Status</th>
|
||||
<span class="pull-right total_count">Total Sent Mails : {{filter_list.count}}</span>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% paginate 10 filter_list as filter_list %}
|
||||
{% for sent in filter_list %}
|
||||
<tr>
|
||||
<td>{{sent.to_email}}</td>
|
||||
<td>{{sent.subject}}</td>
|
||||
<td><a href="{% url 'emails:email_view' sent.id %}">{{sent.message|stringformat:".5s"}}</a></td>
|
||||
<td>{{sent.send_time}}</td>
|
||||
<td>{{sent.status}}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'emails:email_delete' sent.id %}">Remove</a></li>
|
||||
<li><a href="{% url 'emails:email_move_to_trash' sent.id %}">Move To Trash</a></li>
|
||||
<li><a href="{% url 'emails:email_imp' sent.id %}">Mark As Important</a></li>
|
||||
<li><a href="{% url 'emails:email_sent_edit' sent.id %}">Edit</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% ifequal filter_list|length 0 %}
|
||||
<h4>
|
||||
<center>No Mails Found</center>
|
||||
</h4>
|
||||
{% else %}
|
||||
<div class="pagination_row marl row text-center">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% show_pages %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{%endifequal%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#from_date,#to_date").datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
132
emails/templates/mail_trash.html
Normal file
132
emails/templates/mail_trash.html
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block breadcrumb %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
{% include 'mail_center.html' %}
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<!-- mail_links starts here -->
|
||||
<div class="col-md-2 col-sm-3 col-xs-12 mail_menu">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<ul class="mail_options">
|
||||
<li><a href="{% url 'emails:email_sent' %}">Sent Mails</a></li>
|
||||
<li><a href="{% url 'emails:email_draft' %}">Drafts</a></li>
|
||||
<li><a href="{% url 'emails:email_imp_list' %}">Important</a></li>
|
||||
<li><a href="{% url 'emails:list' %}">All</a></li>
|
||||
<li class="active"><a href="{% url 'emails:email_trash' %}">Trash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- mail_links ends here -->
|
||||
<div class="col-md-10 col-sm-9 col-xs-12">
|
||||
<!-- extra-->
|
||||
<div class="filter_row row marl">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<form method="GET" action="/emails/email_trash/" >
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" value="{{request.GET.name}}" name="name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">From Date</label>
|
||||
<input type="text" class="form-control" id="from_date" placeholder="From Date" value="{{request.GET.from_date}}" name="from_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">To Date</label>
|
||||
<input type="text" class="form-control" id="to_date" placeholder="To Date" value="{{request.GET.to_date}}" name="to_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col filter_buttons col-md-3"></div>
|
||||
<button class="btn btn-primary save" name="email_f" value="trash" type="submit">Search</button>
|
||||
<a href="{% url 'emails:email_trash' %}"><button type="button" class="btn btn-primary btn-default">Clear</button></a>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
<!-- extra-->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >TO</th>
|
||||
<th >Subject</th>
|
||||
<th >Message</th>
|
||||
<th >Date Sent</th>
|
||||
<th >Status</th>
|
||||
<span class="pull-right total_count">Total Trash : {{filter_list.count}}</span>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% paginate 10 filter_list as filter_list %}
|
||||
{% for trash in filter_list %}
|
||||
<tr>
|
||||
<td>{{trash.to_email}}</td>
|
||||
<td>{{trash.subject}}</td>
|
||||
<td><a href="{% url 'emails:email_view' trash.id %}">{{trash.message|stringformat:".5s"}}</a></td>
|
||||
<td>{{trash.send_time}}</td>
|
||||
<td>{{trash.status}}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'emails:email_trash_delete' trash.id %}">Delete</a></li>
|
||||
<li><a href="{% url 'emails:email_imp' trash.id %}">Mark As Important</a></li>
|
||||
<li><a href="{% url 'emails:email_sent_edit' trash.id %}">Edit</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% ifequal filter_list|length 0 %}
|
||||
<h4>
|
||||
<center>No Mails Found</center>
|
||||
</h4>
|
||||
{% else %}
|
||||
<div class="pagination_row marl row text-center">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% show_pages %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{%endifequal%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$("#from_date,#to_date").datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -23,7 +23,7 @@ def emails_list(request):
|
|||
if request.GET.get('name', ''):
|
||||
name = request.GET.get('name', '')
|
||||
filter_list = filter_list.filter(to_email__startswith=name)
|
||||
return render(request, 'emails/mail_all.html', {
|
||||
return render(request, 'mail_all.html', {
|
||||
'filter_list': filter_list})
|
||||
|
||||
|
||||
|
|
@ -49,10 +49,10 @@ def email(request):
|
|||
f.save()
|
||||
return HttpResponseRedirect(reverse('emails:list'))
|
||||
else:
|
||||
return render(request, 'emails/create_mail.html', {'form': form})
|
||||
return render(request, 'create_mail.html', {'form': form})
|
||||
else:
|
||||
form = EmailForm()
|
||||
return render(request, 'emails/create_mail.html', {'form': form})
|
||||
return render(request, 'create_mail.html', {'form': form})
|
||||
|
||||
|
||||
def email_sent(request):
|
||||
|
|
@ -69,7 +69,7 @@ def email_sent(request):
|
|||
if request.GET.get('name', ''):
|
||||
name = request.GET.get('name', '')
|
||||
filter_list = filter_list.filter(to_email__startswith=name)
|
||||
return render(request, 'emails/mail_sent.html',
|
||||
return render(request, 'mail_sent.html',
|
||||
{'filter_list': filter_list})
|
||||
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ def email_trash(request):
|
|||
if request.GET.get('name', ''):
|
||||
name = request.GET.get('name', '')
|
||||
filter_list = filter_list.filter(to_email__startswith=name)
|
||||
return render(request, 'emails/mail_trash.html',
|
||||
return render(request, 'mail_trash.html',
|
||||
{'filter_list': filter_list})
|
||||
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ def email_draft(request):
|
|||
if request.GET.get('name', ''):
|
||||
name = request.GET.get('name', '')
|
||||
filter_list = filter_list.filter(to_email__startswith=name)
|
||||
return render(request, 'emails/mail_drafts.html',
|
||||
return render(request, 'mail_drafts.html',
|
||||
{'filter_list': filter_list})
|
||||
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ def email_imp_list(request):
|
|||
if request.GET.get('name', ''):
|
||||
name = request.GET.get('name', '')
|
||||
filter_list = filter_list.filter(to_email__startswith=name)
|
||||
return render(request, 'emails/mail_important.html', {'filter_list': filter_list})
|
||||
return render(request, 'mail_important.html', {'filter_list': filter_list})
|
||||
|
||||
|
||||
def email_sent_edit(request, pk):
|
||||
|
|
@ -180,11 +180,11 @@ def email_sent_edit(request, pk):
|
|||
f.save()
|
||||
return HttpResponseRedirect(reverse('emails:list'))
|
||||
else:
|
||||
return render(request, 'emails/create_mail.html',
|
||||
return render(request, 'create_mail.html',
|
||||
{'form': form, 'em': em})
|
||||
else:
|
||||
form = EmailForm()
|
||||
return render(request, 'emails/create_mail.html',
|
||||
return render(request, 'create_mail.html',
|
||||
{'form': form, 'em': em})
|
||||
|
||||
|
||||
|
|
@ -198,4 +198,4 @@ def email_unimp(request, pk):
|
|||
def email_view(request, pk):
|
||||
email_view = get_object_or_404(Email, pk=pk)
|
||||
x = EmailForm(instance=email_view)
|
||||
return render(request, 'emails/create_mail.html', {'x': x})
|
||||
return render(request, 'create_mail.html', {'x': x})
|
||||
|
|
|
|||
453
leads/templates/checkbox.html
Normal file
453
leads/templates/checkbox.html
Normal file
|
|
@ -0,0 +1,453 @@
|
|||
|
||||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
|
||||
<form id="formid" method='POST' action="{% url 'leads:leads_convert' post.id%}">
|
||||
|
||||
<div class="page-header">
|
||||
<h3>
|
||||
<a href="{% url 'leads:list' %}">Leads</a>
|
||||
>>
|
||||
<a href="{% url 'leads:view_lead' post.id %}">{{post.name}}</a>
|
||||
>>
|
||||
<a href="{% url 'leads:leads_convert' post.id %}">Convert</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<input class="check-scope" id = "accountid" name="accountname" data-scope="Account" type="checkbox"/>Account</br>
|
||||
<input class="check-scope" id = "contactid" name="contactname" data-scope="Contact" type="checkbox"/>Contact</br>
|
||||
<input class="check-scope" id = "opportunityid" name="opportunityname" data-scope="Opportunity" type="checkbox"/>Opportunity</br>
|
||||
|
||||
|
||||
<div class="main_container" style="display:none;">
|
||||
<div class="assigned_teams row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Assigned Users & Teams
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assigned_user" name="assigned_user">
|
||||
<option value="" selected="selected">---------</option>
|
||||
|
||||
{%for u in assigned_user%}
|
||||
<option value="{{u.id}}" {% ifequal u.id post.assigned_user_id %}selected{% endifequal %} {%ifequal u.id request.POST.assigned_user|add:"0"%}selected{%endifequal%}>{{u.username}}</option>
|
||||
{%endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control" id="id_teams" name="teams">
|
||||
<option value="" selected="selected">---------</option>
|
||||
{% for k in teams %}
|
||||
<option value="{{ k.0 }}" {%ifequal k.0 post.teams %}selected {% endifequal %} {%ifequal k.0 request.POST.teams%}selected{%endifequal%}>{{ k.1 }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
<!-- assigned users & teams ends here -->
|
||||
<!-- overview starts here -->
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Overview
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<div class="row">
|
||||
<div class="filter_col col-md-12">
|
||||
<input type="text" class="form-control" placeholder=" Name" id="id_name" name="name" value={%if post%}"{{post.name}}" {% else %}"{{request.POST.name}}"{%endif%}></br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Website</label>
|
||||
<input type="text" class="form-control" name="website" {%if edit%} value="{{edit.website}}" {% else %} value="{% if request.POST %}{{request.POST.website}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Phone</label>
|
||||
<input type="text" class="form-control text-filter" id="id_phone" name="phone"
|
||||
value={%if post%}"{{post.phone}}" {% else %}"{{request.POST.phone}}"{%endif%}>
|
||||
{% if error_lead_form.phone %}/>
|
||||
<p>{{error_lead_form.phone}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1">Email Address</label>
|
||||
<input type="text" class="form-control text-filter" id="id_email" name="email" {% if error_lead_form.email %} value="" {%endif%} value={%if post%}"{{post.email}}" {% else %}"{{request.POST.email}}"{%endif%}>
|
||||
{% if error_lead_form %}
|
||||
<p>{{error_lead_form.email}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col billing_block col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Billing Address</label>
|
||||
<input type="text" class="form-control" placeholder="Street" id="bstreet" name="street" {%if edit1%} value="{{edit1.street}}" {% else %} value="{% if request.POST %}{{request.POST.street}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="City" id="bcity" name="city" {%if edit1%} value="{{edit1.city}}" {% else %} value="{% if request.POST %}{{request.POST.city}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="State" id="bstate" name="state" {%if edit1%} value="{{edit1.state}}" {% else %} value="{% if request.POST %}{{request.POST.state}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="Postcal Code" id="bpostcode" name="postcode" {%if edit1%} value="{{edit1.postcode}}" {% else %} value="{% if request.POST %}{{request.POST.postcode}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control country_class" id="bcountry" name="country">
|
||||
<option value="" >--Country--</option>
|
||||
{% for k in countries%}
|
||||
<option required="required" value="{{ k.id }}" {%ifequal k.id ss.country %}selected {% endifequal %}>{{ k.name }}</option>
|
||||
{% endfor %}
|
||||
{% for k in countries%}
|
||||
<option required="required" value="{{ k.id }}" {%ifequal k.id post.address.country %}selected {% endifequal %}>{{ k.name }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
<!-- <input type="text" class="form-control country_class" placeholder="Country" id="bcountry" name="country" value="{{ edit.billing_address.country }}" /> -->
|
||||
</div>
|
||||
<div>
|
||||
<h6 style="color:white;">shipping address</h6>
|
||||
</div>
|
||||
<div class="filter_col shipping_block col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Shipping Address</label>
|
||||
<input type="text" class="form-control" placeholder="Street" id="id_ship-street" name="ship-street" {%if edit2%} value="{{edit2.street}}" {% else %} value="{% if shipdata.street1 %}{{shipdata.street1}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="City" id="id_ship-city" name="ship-city" {%if edit2%} value="{{edit2.city}}" {% else %} value="{% if shipdata.city1 %}{{shipdata.city1}}{%endif%}" {% endif %}/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="State" id="id_ship-state" name="ship-state" {%if edit2%} value="{{edit2.state}}" {% else %} value="{% if shipdata.state1 %}{{shipdata.state1}}{%endif%}" {% endif %}/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="Postcal Code" id="id_ship-postcode" name="ship-postcode" {%if edit2%} value="{{edit2.postcode}}" {% else %} value="{% if shipdata.postcode1 %}{{shipdata.postcode1}}{%endif%}" {% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control country_class" id="id_ship-country" name="ship-country" value="{{ edit2.country }}">
|
||||
<option value="">--Country--</option>
|
||||
{% for c in form5 %}
|
||||
<option value="{{c.pk}}" {% if edit2%}{%ifequal c.pk edit2.country.pk %}selected {% endifequal %}{% endif %}{% if shipdata.country1 %} {% ifequal c.pk shipdata.country1|add:"0" %}selected{% endifequal %}{% endif %}>{{ c.printable_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<!-- <input type="text" class="form-control country_class" placeholder="Country" id="id_ship-country" name="ship-country" value="{{ edit2.country }}"/> -->
|
||||
</div>
|
||||
<div>
|
||||
<h6 style="color:white;">copy address</h6>
|
||||
</div>
|
||||
<div class="col-md-12" style="text-align:center;">
|
||||
<button type="button" id="copy_billing_btn" class="btn btn-primary">Copy Billing</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<!-- overview ends here -->
|
||||
|
||||
<!-- details_block starts here -->
|
||||
<div class="details_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Details
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account Type</label>
|
||||
<select class="form-control" id="id_account_type" name="account_type" >
|
||||
<option value="" selected="selected">--Select Type of Account--</option>
|
||||
{% for type in types %}
|
||||
<option value="{{type.0}}" {% if edit%}{% ifequal type.0 edit.account_type %}selected{% endifequal %}{% endif %} {% if request.POST.account_type %} {% ifequal type.0 request.POST.account_type %}selected{% endifequal %}{% endif %} >{{type.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">SIC Code</label>
|
||||
<input type="text" class="form-control" placeholder="SIS Code" name="sis_code" {%if edit%} value="{{edit.sis_code}}" {% else %} value="{% if request.POST %}{{request.POST.sis_code}}{%endif%}" {% endif %} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Industry</label>
|
||||
<select class="form-control industry_select" id="id_industry" name="industry" >
|
||||
<option value="" selected="selected">--Select Type of Industry--</option>
|
||||
{% for ind in industries %}
|
||||
<option value="{{ind.0}}" {% if edit%}{% ifequal ind.0 edit.industry %}selected{% endifequal %}{% endif %} {% if request.POST.industry %} {% ifequal ind.0 request.POST.industry %}selected{% endifequal %}{% endif %} >{{ind.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Description</label>
|
||||
|
||||
<textarea class="form-control" rows="3" id="id_description" name="description">{%if post%}{{post.description}} {% else %}{{request.POST.description}}{%endif%}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
<!-- details_block ends here -->
|
||||
<div class="row marl buttons_row text-center">
|
||||
<button class="btn btn-default save" type="submit">Convert</button>
|
||||
<a href="{% url 'leads:view_lead' post.id %}"<button type="button" class="btn btn-default">CANCEL</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<div class="contactconvert" style="display:none;">
|
||||
<div class="assigned_teams row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" >
|
||||
Assigned Users & Teams
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assigned_user" name="assigned_user">
|
||||
<option value="" selected="selected">---------</option>
|
||||
|
||||
{%for u in assigned_user%}
|
||||
<option value="{{u.id}}" {% ifequal u.id post.assigned_user_id %}selected{% endifequal %} {%ifequal u.id request.POST.assigned_user|add:"0"%}selected{%endifequal%}>{{u.username}}</option>
|
||||
{%endfor%}
|
||||
</select>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control" id="id_teams" name="teams" value="{{edit_obj.teams }}">
|
||||
<option value="" selected="selected">---------</option>
|
||||
{% for i in teams%}
|
||||
<option value="{{i.0}}" {% ifequal i.0 edit_obj.teams %}selected{% endifequal %} {%ifequal i.0 request.POST.teams%}selected{%endifequal%}>{{i.1}}</option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Overview
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label> *
|
||||
<div class="row">
|
||||
<div class="filter_col col-md-12">
|
||||
<input type="text" class="form-control" placeholder=" Name" id="id_name" name="name" value={%if post%}"{{post.name}}" {% else %}"{{request.POST.name}}"{%endif%}></br>
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
{% if error_lead_form.name%}
|
||||
{{error_lead_form.name}}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Accounts</label> *
|
||||
<select class="form-control" id="id_account" name="account">
|
||||
<option value="" selected="selected">---------</option>
|
||||
{% for i in acount %}
|
||||
<option value="{{i.id}}" {%ifequal i.id post.account_id %}selected {% endifequal %} {%ifequal i.id request.POST.account|add:"0"%}selected{%endifequal%}>{{ i.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if err_contct_form.account %}
|
||||
<p>{{err_contct_form.account}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" >Phone</label> *
|
||||
<input type="text" class="form-control text-filter" id="id_phone" name="phone"
|
||||
value={%if post%}"{{post.phone}}" {% else %}"{{request.POST.phone}}"{%endif%}>
|
||||
{% if error_lead_form.phone %}
|
||||
<p>{{error_lead_form.phone}}</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" >Email Address</label> *
|
||||
<input type="text" class="form-control text-filter" id="id_email" name="email" {% if error_lead_form.email %} value="" {%endif%} value={%if post%}"{{post.email}}" {% else %}"{{request.POST.email}}"{%endif%}>
|
||||
{% if error_lead_form %}
|
||||
<p>{{error_lead_form.email}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" >address</label>
|
||||
<input type="text" class="form-control" placeholder="Street" name = "street" value = "{{post.address.street}}" id="id_street"/>
|
||||
{% if error_address_form%}
|
||||
<p>{{error_address_form.street}}</p>
|
||||
{% endif %}
|
||||
<div class="row lead_address_col" style="margin-top:10px;">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="City" name="city" value = "{{post.address.city}}" id="id_city" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="State" name="state" value= "{{post.address.state}}" id="id_state"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="Postcal Code" name="postcode" value="{{post.address.postcode}}" id="id_postcode" /></br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>country</label>
|
||||
<select class="form-control" name = "country" value="{{ ss.address.country}} "id = "id_country" />
|
||||
{% for k in countries%}
|
||||
<option required="required" value="{{ k.id }}" {%ifequal k.id ss.country %}selected {% endifequal %}>{{ k.name }}</option>
|
||||
{% endfor %}
|
||||
{% for k in countries%}
|
||||
<option required="required" value="{{ k.id }}" {%ifequal k.id post.address.country %}selected {% endifequal %}>{{ k.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col shiiping_block col-md-12">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="exampleInputEmail1" >Description</label>
|
||||
<textarea class="form-control" rows="3" id="id_description" name="description">{%if post%}{{post.description}} {% else %}{{request.POST.description}}{%endif%}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<div class="row marl buttons_row text-center">
|
||||
<a><button class="btn btn-default save" type="submit">Convert</button></a>
|
||||
<a href="{% url 'leads:view_lead' post.id %}"<button type="button" class="btn btn-default">CANCEL</button></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
{% endblock %}
|
||||
{# {% endblock %} #}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#copy_billing_btn").click(function(){
|
||||
var street = $(".billing_block").find("#bstreet").val()
|
||||
var city = $(".billing_block").find("#bcity").val()
|
||||
var state = $(".billing_block").find("#bstate").val()
|
||||
var postcode = $(".billing_block").find("#bpostcode").val()
|
||||
var country = $(".billing_block").find("#bcountry").val()
|
||||
$(".shipping_block").find("#id_ship-street").val(street)
|
||||
$(".shipping_block").find("#id_ship-city").val(city)
|
||||
$(".shipping_block").find("#id_ship-state").val(state)
|
||||
$(".shipping_block").find("#id_ship-postcode").val(postcode)
|
||||
$(".shipping_block").find("#id_ship-country").val(country)
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
console.log("working");
|
||||
$("#accountid").click(function (){
|
||||
console.log("enteredclickfunction");
|
||||
if ($("#accountid").prop("checked")){
|
||||
console.log("account idis checked");
|
||||
alert("hello")
|
||||
$(".main_container").show();
|
||||
alert("show")
|
||||
console.log("formisshown");
|
||||
}else{
|
||||
$(".main_container").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
console.log("working");
|
||||
$("#contactid").click(function (){
|
||||
console.log("enteredclickfunction");
|
||||
if ($("#contactid").prop("checked")){
|
||||
console.log("account idis checked");
|
||||
alert("hello")
|
||||
$(".contactconvert").show();
|
||||
alert("show")
|
||||
console.log("formisshown");
|
||||
}else{
|
||||
$(".contactconvert").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
|
||||
|
||||
</head>
|
||||
</body>
|
||||
</html>
|
||||
169
leads/templates/create_lead.html
Normal file
169
leads/templates/create_lead.html
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
{% block extralinks %}
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'leads:list' %}">Leads</a></li>
|
||||
<li class="breadcrumb-item active">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
{%block content%}
|
||||
<form id="add_form" method="POST" action="" novalidate>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE LEAD
|
||||
</div>
|
||||
<div class="row marl no-gutters">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="name" >Name{% if lead_form.first_name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<div class="row">
|
||||
<div class="filter_col col-md-6">
|
||||
{{ lead_form.first_name }}
|
||||
<span class="error">{{ lead_form.first_name.errors }}</span>
|
||||
</div>
|
||||
<div class="filter_col col-md-6">
|
||||
{{ lead_form.last_name }}
|
||||
<span class="error">{{ lead_form.last_name.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" {% if request.POST.status == "converted" %} class="required" {% endif %}>Account Name{% if lead_form.account_name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.account_name }}
|
||||
<span class="error">{{ lead_form.account_name.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Title{% if lead_form.title.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.title }}
|
||||
<span class="error">{{ lead_form.title.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1">Phone{% if lead_form.phone.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.phone }}
|
||||
<span class="error">{{ lead_form.phone.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group ">
|
||||
<label for="exampleInputEmail1" class="required">Email Address{% if lead_form.email.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.email }}
|
||||
<span class="error">{{ lead_form.email.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Website{% if lead_form.website.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.website }}
|
||||
<span class="error">{{ lead_form.website.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="assigned_users form-control" name="assigned_to" multiple="multiple">
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% if user in lead_obj.assigned_to.all or user.id in assignedto_list %} selected="" {% endif %}>{{user.email}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="error">{{ lead_form.assigned_to.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"/>Status{% if lead_form.status.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.status }}
|
||||
<span class="error">{{ lead_form.status.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"/>Source{% if lead_form.source.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.source }}
|
||||
<span class="error">{{ lead_form.source.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" >Address</label>
|
||||
{{ address_form.address_line }}
|
||||
<span class="error">{{ address_form.address_line.errors }}</span>
|
||||
</div>
|
||||
{{ address_form.street }}
|
||||
<span class="error">{{ address_form.street.errors }}</span>
|
||||
<div class="row" style="margin-top:10px;">
|
||||
<div class="col-md-4">
|
||||
{{ address_form.city }}
|
||||
<span class="error">{{ address_form.city.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ address_form.state }}
|
||||
<span class="error">{{ address_form.state.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ address_form.postcode }}
|
||||
<span class="error">{{ address_form.postcode.errors }}</span>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-top:10px;">
|
||||
{{ address_form.country }}
|
||||
<span class="error">{{ address_form.country.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="exampleInputEmail1" >Description{% if lead_form.description.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ lead_form.description }}
|
||||
<span class="error">{{ lead_form.description.errors }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="save_new_form" name="savenewform">
|
||||
</div>
|
||||
<div class="row marl buttons_row text-center form_btn_row">
|
||||
<button class="btn btn-default save" type="submit">Save</button>
|
||||
{% if not lead_obj %}
|
||||
<button class="btn btn-success save savenew" type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'leads:list' %}" class="btn btn-default clear" id="create_lead_cancel">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('#add_form').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
156
leads/templates/leads.html
Normal file
156
leads/templates/leads.html
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="no-gutters row">
|
||||
<div class="col-md-6">
|
||||
<h4>Leads</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'leads:add_lead'%}"><i class="fa fa-plus"></i> Add New Lead</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<form id="leads_filter" action="" method="POST">
|
||||
<div class="card-body ">
|
||||
<div class="card-title">Filters</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">First Name</label>
|
||||
<input type="text" class="form-control" placeholder="First Name" name="first_name" value="{{request.POST.first_name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Last Name</label>
|
||||
<input type="text" class="form-control" placeholder="Last Name" name="last_name" value="{{request.POST.last_name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Lead Status</label>
|
||||
<select class="form-control" id="id_status" name="status" >
|
||||
<option value="">--Status of Lead--</option>
|
||||
{% for each_status in status %}
|
||||
<option value="{{each_status.0}}" {% if request.POST.status %} {% ifequal each_status.0 request.POST.status %}selected{% endifequal %}{% endif %} >{{each_status.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row">
|
||||
<button class="btn btn-primary save" type="submit">Search</button>
|
||||
<a href="{% url 'leads:list' %}" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<!-- leads list start-->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-title">
|
||||
List of Leads
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Leads {{ lead_obj|length }}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.no</th>
|
||||
<th width="20%" style="text-align:center;">Name</th>
|
||||
<th width="15%" style="text-align:center;">Status</th>
|
||||
<th width="15%" style="text-align:center;">Assigned User</th>
|
||||
<th width="20%" style="text-align:center;">Created On</th>
|
||||
<th width="25%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page lead_obj %}
|
||||
{% else %}
|
||||
{% paginate 10 lead_obj %}
|
||||
{% endif %}
|
||||
{% for lead in lead_obj %}
|
||||
<tr class="text-center">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'leads:view_lead' lead.id %}">{{ lead.first_name }} {{ lead.last_name }}</a></td>
|
||||
<td>{{ lead.status }}</td>
|
||||
<td>
|
||||
{% with lead_users=lead.assigned_to.all %}
|
||||
{% if lead_users %}
|
||||
{% for user in lead_users %}
|
||||
<li class="text-left">{{ user.email }}</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
Not Assigned to Any
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td>{{ lead.created_on }}</td>
|
||||
<td class="actions">
|
||||
<a href="{% url 'leads:view_lead' lead.id %}" class="btn btn-info view"><i class="fas fa-eye"></i> View</a>
|
||||
<a href="{% url 'leads:edit_lead' lead.id %}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a href="{% url 'leads:remove_lead' lead.id %}" class="btn btn-danger delete remove_account"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{%ifequal lead_obj|length 0%}
|
||||
<h6 class="text-center">No Lead Records Found</h6>
|
||||
{%endifequal%}
|
||||
<div class="marl row text-center">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- leads list end-->
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$('.delete').click(function(e){
|
||||
e.preventDefault()
|
||||
url = $(this).attr('href')
|
||||
if (!confirm('Are you sure you want to delete?'))
|
||||
return;
|
||||
window.location = $(this).attr('href')
|
||||
});
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#leads_filter').attr("action", $(this).attr("href"));
|
||||
$('#leads_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
38
leads/templates/leads_list.html
Normal file
38
leads/templates/leads_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal leads|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO LEADS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for lead in leads %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<a class="cell parentname" id="{{ lead.id }}">
|
||||
{{ lead.first_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="cell parentemail">
|
||||
{{ lead.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
352
leads/templates/view_leads.html
Normal file
352
leads/templates/view_leads.html
Normal file
|
|
@ -0,0 +1,352 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'leads:list' %}">Leads</a></li>
|
||||
<li class="breadcrumb-item active">View</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{%endblock%}
|
||||
{% block content %}
|
||||
<div class="main_container" id="maincontainer">
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="card-title">
|
||||
<h5>
|
||||
Overview
|
||||
<span class="float-right" style="margin-top: 0px">
|
||||
<div class="dropdown buttons_row">
|
||||
<button class="btn btn-primary dropdown-toggle save" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'leads:edit_lead' lead_record.id %}" >Edit</a></li>
|
||||
<li class="delete_contact" ><a href="{% url 'leads:remove_lead' lead_record.id %}" id="remove_contact">REMOVE</a></li>
|
||||
<li><a href="{% url 'leads:leads_convert' lead_record.id %}" class="btn btn-info" role="button">Convert</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12" id="iname">
|
||||
<div class="form-group" >
|
||||
<label class="lead_field_label" for="id_name" data-name="name">Name</label>
|
||||
<div class="lead_field" id="lead_name" data-name="name">{{ lead_record.first_name }} {{ lead_record.last_name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.account_name %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_contact_account" data-name="name">Account Name</label>
|
||||
<div class="lead_field" id ="contact_account" data-name="name">{{ lead_record.account_name }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.title %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_title" data-name="name">Title</label>
|
||||
<div class="lead_field" id="lead_title" data-name="name">{{ lead_record.title }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_phone" data-name="name">Phone</label>
|
||||
<div class="lead_field" id="lead_phone" data-name="name">{{ lead_record.phone }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_email" data-name="name">Email</label>
|
||||
<div class="lead_field" id="lead_email" data-name="name">{{ lead_record.email }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.status %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_status" data-name="name">Status</label>
|
||||
<div class="lead_field" id="lead_status" data-name="name">{{ lead_record.status }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.source %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_source" data-name="name">Source</label>
|
||||
<div class="lead_field" id="lead_source" data-name="name">{{ lead_record.source }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.website %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_website" data-name="name">Website</label>
|
||||
<div class="lead_field" id="lead_website" data-name="name">{{ lead_record.website }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{% if lead_record.address.address_line or lead_record.address.street or lead_record.address.city or lead_record.address.state or lead_record.address.postcode or lead_record.address.country %}
|
||||
<label class="lead_field_label" for="id_address" data-name="name" >Billing Address</label>
|
||||
<div class="lead_field" id="lead_address" data-name="name">
|
||||
{% if lead_record.address.address_line %}
|
||||
Address Line:{{lead_record.address.address_line}}</br>
|
||||
{% endif %}
|
||||
{% if lead_record.address.street %}
|
||||
Street:{{ lead_record.address.street }}</br>
|
||||
{% endif %}
|
||||
{% if lead_record.address.city %}
|
||||
City: {{ lead_record.address.city }}</br>
|
||||
{% endif %}
|
||||
{% if lead_record.address.state %}
|
||||
State:{{ lead_record.address.state }}</br>
|
||||
{% endif %}
|
||||
{% if lead_record.address.postcode %}
|
||||
Post Code:{{ lead_record.address.postcode }}</br>
|
||||
{% endif %}
|
||||
{% if lead_record.address.country %}
|
||||
Country: {{ lead_record.address.get_country_display }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if lead_record.description %}
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_description" data-name="name" >Description</label>
|
||||
<div class="lead_field" id="lead_description" data-name="name">{{ lead_record.description }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section starts-->
|
||||
|
||||
<div class="card-body mar-top" id="datashow">
|
||||
<div class="card-title view-pad">
|
||||
<h5>Comments </h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-12">
|
||||
<form id="comment_form" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group ">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_comments" name="comment" placeholder="Submit Your Comments Here"></textarea><span><i id="CommentError" style="display:none; color:red"></i></span>
|
||||
</br>
|
||||
<div class="buttons_row">
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value="{{lead_record.id}}" name="leadid">
|
||||
</form>
|
||||
<ul class="list-group" id="comments_div">
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="float-right right-container">
|
||||
<div class="list-row-buttons btn-group float-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu text-center">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})">Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})">Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}"><pre>{{ comment.comment }}</pre></div>
|
||||
<div class="stream-container">
|
||||
<pre class="float-left">{{ comment.commented_by }}</pre>
|
||||
<pre class="float-right">{{ comment.commented_on }}</pre>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="Comments_Leads_Modal" role="dialog" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Update Your Comment</h4>
|
||||
</div>
|
||||
<form id="comment_edit_form" method="POST" >
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_editcomment" name="comment" placeholder="Submit Your Comments"></textarea><span><i id="CommentEditError" style="display:none; color:red"></i></span>
|
||||
<input type="hidden" value="{{ lead.id }}" name="leadid">
|
||||
<input type="hidden" value="" name="commentid" id="commentid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default save" id="comment_edit" type="submit">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section Ends-->
|
||||
</div>
|
||||
</div>
|
||||
<tr id="meeting{{ meeting.id }}">
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="card-title">
|
||||
<h5>Label</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{%if lead_record.assigned_to.all %}
|
||||
<label class="lead_field_label" for="id_assigned_user" data-name="name" >Assigned User(s)</label>
|
||||
<div class="lead_field" id="lead_assigned_users" data-name="name">
|
||||
{% for user in lead_record.assigned_to.all %}
|
||||
<li>{{ user }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_team" data-name="name" >Assigned Team(s)</label>
|
||||
<div class="lead_field" id="lead_team" data-name="name">
|
||||
{%if not lead_record.teams %}
|
||||
Not Assigned Yet
|
||||
{% else %}
|
||||
{% for team in lead_record.teams.all %}
|
||||
<li>{{ team }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_created_on" data-name="name">Created On</label>
|
||||
<div class="lead_field" id="lead_created_on" data-name="name">
|
||||
{{lead_record.created_on}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="lead_field_label" for="id_created_by" data-name="name">Created by</label>
|
||||
<div class="lead_field" id="lead_created_by" data-name="name">
|
||||
{{lead_record.created_by}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="{% static 'js/calls.js' %}"></script>
|
||||
<script src="{% static 'js/meetings.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
$("#comment_form").submit(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url: "{% url 'leads:add_comment' %}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentError").html(data.error).show()
|
||||
} else {
|
||||
d = new Date(data.commented_on);
|
||||
$("#comments_div").prepend("<li class='list-group-item list-row' id='comment" + data.comment_id + "'>" +
|
||||
"<div class='float-right right-container'>" +
|
||||
"<div class='list-row-buttons btn-group float-right'>" +
|
||||
"<button class='btn btn-link btn-sm dropdown-toggle' data-toggle='dropdown' type='button'><span class='caret'></span></button>" +
|
||||
"<ul class='dropdown-menu text-center'>" +
|
||||
"<li><a class='action' onclick='edit_comment(" + data.comment_id + ")'>Edit</a></li>" +
|
||||
"<li><a class='action' onclick='remove_comment(" + data.comment_id + ")''>Remove</a></li></ul></div></div>" +
|
||||
"<div class='stream-post-container' id='comment_name"+data.comment_id+"'><pre>"+data.comment+"</pre></div>"+
|
||||
"<div class='stream-container'><pre class='float-left'>"+data.commented_by+"</pre><pre class='float-right'>"+d.toGMTString()+"</pre></div>"+
|
||||
"<div class='stream-date-container' id='comment_file_div"+data.comment_id+"'><div id='new_comment"+data.comment_id+"'</div></div></li>"
|
||||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function edit_comment(x) {
|
||||
$('#Comments_Leads_Modal').modal('show');
|
||||
comment = $("#comment_name" + x).text()
|
||||
$("#commentid").val(x)
|
||||
$("#id_editcomment").val(comment)
|
||||
}
|
||||
|
||||
$("#comment_edit").click(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url: "{% url 'leads:edit_comment' %}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentEditError").html(data.error).show()
|
||||
} else {
|
||||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Leads_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function HideError(e) {
|
||||
$("#CommentError").hide()
|
||||
}
|
||||
|
||||
function remove_comment(x) {
|
||||
var con = confirm("Do you want to Delete it for Sure!?")
|
||||
if (con == true) {
|
||||
$.post('{% url "leads:remove_comment" %}', {
|
||||
"comment_id": x
|
||||
}, function (data) {
|
||||
if (data.error) {
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment" + data.cid).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
|
|
@ -79,7 +79,7 @@ class LeadsPostrequestTestCase(TestLeadModel, TestCase):
|
|||
|
||||
def test_leads_list_html(self):
|
||||
response = self.client.get('/leads/list/')
|
||||
self.assertTemplateUsed(response, 'leads/leads.html')
|
||||
self.assertTemplateUsed(response, 'leads.html')
|
||||
|
||||
|
||||
class LeadsCreateUrlTestCase(TestLeadModel, TestCase):
|
||||
|
|
@ -103,7 +103,7 @@ class LeadsCreateUrlTestCase(TestLeadModel, TestCase):
|
|||
'title': 'LeadCreation', 'name': "kotha", 'email': "anjalikotha1993@gmail.com", 'account': self.account,
|
||||
'address': self.address, 'website': "www.gmail.com", 'status': "assigned",
|
||||
"source": "Call", 'opportunity_amount': "700", 'description': "Iam an Lead", 'created_by': self.user})
|
||||
self.assertTemplateUsed(response, 'leads/create_lead.html')
|
||||
self.assertTemplateUsed(response, 'create_lead.html')
|
||||
|
||||
|
||||
class LeadsEditTestCase(TestLeadModel, TestCase):
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ def leads_list(request):
|
|||
if email:
|
||||
lead_obj = lead_obj.filter(email__icontains=email)
|
||||
|
||||
return render(request, 'leads/leads.html', {
|
||||
return render(request, 'leads.html', {
|
||||
'lead_obj': lead_obj, 'per_page': page})
|
||||
|
||||
|
||||
|
|
@ -80,14 +80,14 @@ def add_lead(request):
|
|||
else:
|
||||
return HttpResponseRedirect(reverse('leads:list'))
|
||||
else:
|
||||
return render(request, 'leads/create_lead.html', {
|
||||
return render(request, 'create_lead.html', {
|
||||
'lead_form': form, 'address_form': address_form,
|
||||
'accounts': accounts, 'countries': COUNTRIES,
|
||||
'teams': teams, 'users': users,
|
||||
'status': LEAD_STATUS, 'source': LEAD_SOURCE,
|
||||
'assignedto_list': [int(user_id) for user_id in assignedto_list], 'teams_list': teams_list})
|
||||
else:
|
||||
return render(request, 'leads/create_lead.html', {
|
||||
return render(request, 'create_lead.html', {
|
||||
'lead_form': form, 'address_form': address_form,
|
||||
'accounts': accounts, 'countries': COUNTRIES, 'teams': teams,
|
||||
'users': users, 'status': LEAD_STATUS, 'source': LEAD_SOURCE,
|
||||
|
|
@ -109,7 +109,7 @@ def view_lead(request, lead_id):
|
|||
'form-MAX_NUM_FORMS': '10',
|
||||
}
|
||||
reminder_form_set = RemindersFormSet(data)
|
||||
return render(request, "leads/view_leads.html", {
|
||||
return render(request, "view_leads.html", {
|
||||
"lead_record": lead_record, 'status': LEAD_STATUS, 'countries': COUNTRIES,
|
||||
'comments': comments, 'reminder_form_set': reminder_form_set,
|
||||
'meetings': meetings, 'calls': calls
|
||||
|
|
@ -159,7 +159,7 @@ def edit_lead(request, lead_id):
|
|||
account_object.save()
|
||||
return HttpResponseRedirect(reverse('leads:list'))
|
||||
else:
|
||||
return render(request, 'leads/create_lead.html', {
|
||||
return render(request, 'create_lead.html', {
|
||||
'lead_obj': lead_obj,
|
||||
'lead_form': form,
|
||||
'address_form': address_form,
|
||||
|
|
@ -168,7 +168,7 @@ def edit_lead(request, lead_id):
|
|||
'status': LEAD_STATUS, 'source': LEAD_SOURCE,
|
||||
'assignedto_list': [int(user_id) for user_id in assignedto_list], 'teams_list': teams_list})
|
||||
else:
|
||||
return render(request, 'leads/create_lead.html', {
|
||||
return render(request, 'create_lead.html', {
|
||||
'lead_form': form, 'address_form': address_form,
|
||||
'lead_obj': lead_obj, 'address_obj': address_obj,
|
||||
'accounts': accounts, 'countries': COUNTRIES, 'teams': teams,
|
||||
|
|
@ -222,7 +222,7 @@ def leads_convert(request, pk):
|
|||
country1 = request.POST.get('country')
|
||||
shipdata = {'street1': street1, 'city1': city1, 'state1': state1,
|
||||
'postcode1': postcode1, 'country1': country1}
|
||||
return render(request, 'leads/checkbox.html', {
|
||||
return render(request, 'checkbox.html', {
|
||||
'account_form': account_form, 'form1': billing_form, 'form2': shipping_form,
|
||||
'form5': COUNTRIES, 'stages': STAGES, 'acc_error': account_form.errors,
|
||||
'shipdata': shipdata, 'sources': LEAD_SOURCE, 'industries': INDCHOICES,
|
||||
|
|
@ -241,7 +241,7 @@ def leads_convert(request, pk):
|
|||
contact_obj.save()
|
||||
return HttpResponseRedirect(reverse('contacts:list'))
|
||||
else:
|
||||
return render(request, 'leads/checkbox.html', {
|
||||
return render(request, 'checkbox.html', {
|
||||
'post': lead_obj, 'accounts': accounts, 'teams': teams,
|
||||
'contact_form': contact_form, 'address_form': address_form})
|
||||
if request.POST.get('opportunityname') == "on":
|
||||
|
|
@ -250,11 +250,11 @@ def leads_convert(request, pk):
|
|||
opportunity_form.save()
|
||||
return HttpResponseRedirect(reverse('opportunities:list'))
|
||||
else:
|
||||
return render(request, 'leads/checkbox.html', {
|
||||
return render(request, 'checkbox.html', {
|
||||
'post': lead_obj, 'accounts': accounts, 'sources': LEAD_SOURCE,
|
||||
'teams': teams, 'stages': STAGES, 'opportunity_form': opportunity_form})
|
||||
else:
|
||||
return render(request, 'leads/checkbox.html', {
|
||||
return render(request, 'checkbox.html', {
|
||||
'form': account_form, 'form1': billing_form, 'form2': shipping_form,
|
||||
'form5': COUNTRIES, 'industries': INDCHOICES, 'teams': teams,
|
||||
'task': lead_objects, 'counties': COUNTRIES,
|
||||
|
|
@ -333,6 +333,6 @@ def remove_comment(request):
|
|||
def get_leads(request):
|
||||
if request.method == 'GET':
|
||||
leads = Lead.objects.all()
|
||||
return render(request, 'leads/leads_list.html', {'leads': leads})
|
||||
return render(request, 'leads_list.html', {'leads': leads})
|
||||
else:
|
||||
return HttpResponse('Invalid Method or No Authanticated in load_calls')
|
||||
|
|
|
|||
279
opportunity/templates/create_opportunity.html
Normal file
279
opportunity/templates/create_opportunity.html
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
{% block extralinks %}
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
|
||||
{% endblock %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'opportunities:list' %}">Opportunities</a></li>
|
||||
<li class="breadcrumb-item active">Create</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form class= "form_user" method="POST" action="" novalidate>
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title text-center">
|
||||
CREATE OPPORTUNITY
|
||||
</div>
|
||||
<div class="row marl no-gutters">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Name{% if opportunity_form.name.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.name }}
|
||||
<span class="error">{{opportunity_form.name.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account{% if opportunity_form.account.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.account }}
|
||||
<span class="error">{{opportunity_form.account.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Amount</label>
|
||||
<div class="input-group" style="width:100%;">
|
||||
<div class="input-group-btn left-dropdown" style="width:auto;">
|
||||
{{ opportunity_form.currency }}
|
||||
<span class="error">{{opportunity_form.currency.errors}}</span>
|
||||
</div>
|
||||
{{ opportunity_form.amount }}
|
||||
<span class="error">{{opportunity_form.amount.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1" class="required">Stage{% if opportunity_form.stage.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.stage }}
|
||||
<span class="error">{{opportunity_form.stage.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Lead Source{% if opportunity_form.lead_source.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.lead_source }}
|
||||
<span class="error">{{opportunity_form.lead_source.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Probability %{% if opportunity_form.probability.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.probability }}
|
||||
<span class="error">{{opportunity_form.probability.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="assigned_users form-control" name="assigned_to" multiple="multiple">
|
||||
{% for user in users %}
|
||||
<option value="{{user.id}}" {% if user in opportunity_obj.assigned_to.all or user.id in assignedto_list %} selected="" {% endif %}>{{user.email}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Contacts{% if opportunity_form.contacts.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.contacts }}
|
||||
<span class="error">{{opportunity_form.contacts.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Close Date{% if opportunity_form.closed_on.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
<div class='input-group date' id='datepicker1'>
|
||||
{{ opportunity_form.closed_on }}
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<span class="error">{{opportunity_form.closed_on.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="exampleInputEmail1" >Description{% if opportunity_form.description.field.required %}<span class="error">*</span>{% endif %}</label>
|
||||
{{ opportunity_form.description }}
|
||||
<span class="error">{{opportunity_form.description.errors}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
<input type="hidden" id="save_new_form" name="savenewform">
|
||||
</div>
|
||||
<!-- overview ends here -->
|
||||
<div class="row marl buttons_row text-center form_btn_row">
|
||||
<button class=" btn btn-default save" type="submit" id="saveform">Save</button>
|
||||
{% if not opportunity_obj %}
|
||||
<button class="btn btn-success save savenew" type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'opportunities:list' %}" class="btn btn-default clear">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var date = new Date();
|
||||
var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
||||
$('#id_closed_on').datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
minDate:today
|
||||
})
|
||||
});
|
||||
|
||||
$(".savenew").on('click', function(e){
|
||||
e.preventDefault()
|
||||
$("#save_new_form").val('true')
|
||||
$('.form_user').submit()
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.assigned_users').select2();
|
||||
});
|
||||
|
||||
$('#id_account').change(function(){
|
||||
var Account= $("#id_account").val()
|
||||
$.get("{% url 'opportunities:contacts' %}", {"Account":Account}, function(data){
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function (index, value) {
|
||||
$("#id_contacts").append("<option value="+index+">"+value+"</option>")
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$("#comment_form").submit(function(e){
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url : "{% url 'opportunities:add_comment' %}",
|
||||
type : "POST",
|
||||
data : formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(data){
|
||||
if(data.error){
|
||||
$("#CommentError").html(data.error).show()
|
||||
}
|
||||
else {
|
||||
$("#comments_div").prepend("<li class='list-group-item list-row' id='comment"+data.com_id+"'>"+
|
||||
"<div class='pull-right right-container'>"+
|
||||
"<div class='list-row-buttons btn-group pull-right'>"+
|
||||
"<button class='btn btn-link btn-sm dropdown-toggle' data-toggle='dropdown' type='button'><span class='caret'></span></button>"+
|
||||
"<ul class='dropdown-menu pull-right'>"+
|
||||
"<li><a class='action' onclick='edit_comment("+data.com_id+")'>Edit</a></li>"+
|
||||
"<li><a class='action' onclick='remove_comment("+data.com_id+")''>Remove</a></li></ul></div></div>"+
|
||||
"<div class='stream-head-container'> "+data.com_user+" Commented</div>"+
|
||||
"<div class='stream-post-container' id='comment_name"+data.com_id+"'>"+data.comment+"</div>"+
|
||||
"<div class='stream-date-container"+data.com_id+"'>"+data.comment_time+"</div></div><div class='stream-date-container' id='comment_file_div"+data.com_id+"'><div id='new_comment"+data.com_id+"'</div></div></li>"
|
||||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function edit_comment(x){
|
||||
$('#myModal_comment').modal('show');
|
||||
comment = $("#comment_name"+x).text()
|
||||
$("#commentid").val(x)
|
||||
$("#id_editcomment").val(comment)
|
||||
}
|
||||
|
||||
$("#comment_edit").click(function(e){
|
||||
alert("Heyyyyyyyyyyy")
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url : "{% url 'opportunities:edit_comment' %}",
|
||||
type : "POST",
|
||||
data : formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success:function(data){
|
||||
if(data.error) {
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment_name"+data.commentid).text(data.comment)
|
||||
$('#myModal_comment').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function remove_comment(x){
|
||||
var warn = confirm("Are You Sure, you Want to Delete this Comment!?")
|
||||
if (warn == true){
|
||||
$.post('{% url "opportunities:remove_comment" %}', {"comment_id":x}, function(data){
|
||||
if(data.error){
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment"+data.oid).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function editFun(x) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/opportunities/editdetails/",
|
||||
data: {tid: x},
|
||||
success: function(data) {
|
||||
$("#viewdiv").hide()
|
||||
$("#editdiv").show()
|
||||
$("#id_name").val(data.name)
|
||||
$("#id_stage").val(data.stage)
|
||||
$("#id_amount").val(data.amount)
|
||||
$("#id_account").val(data.account)
|
||||
$("#id_probability").val(data.probability)
|
||||
$("#id_close_date").val(data.close_date)
|
||||
$("#hiddenval").val(data.eid)
|
||||
$("#id_lead_source").val(data.sources)
|
||||
$("#id_description").val(data.description)
|
||||
contacts = data.contacts.replace("b'", "")
|
||||
contacts = contacts.replace(/\\n/g, '')
|
||||
contacts = contacts.replace(/\\t/g, '')
|
||||
contacts = contacts.replace(/'/g, '')
|
||||
contacts = contacts.replace(/}/g, '')
|
||||
$("#id_contacts").html(contacts)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$('#id_account').change(function() {
|
||||
var Account = $("#id_account").val()
|
||||
$.get("{% url 'opportunities:contacts' %}", {
|
||||
"Account": Account
|
||||
}, function(data) {
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function(index, value) {
|
||||
// console.log(index, value)
|
||||
$("#id_contacts").append("<option value=" + index + ">" + value + "</option>")
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
5
opportunity/templates/opp_contacts.html
Normal file
5
opportunity/templates/opp_contacts.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<select>
|
||||
{% for cont in con %}
|
||||
<option value="{{cont.id}}" {% for sel in selcon %} {% ifequal cont.id sel.id %} selected {% endifequal%}{% endfor %}>{{cont.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
38
opportunity/templates/opportunities_list.html
Normal file
38
opportunity/templates/opportunities_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Stage
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal opportunities|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO OPPORTUNITIES FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for opportunity in opportunities %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<a class="cell parentname" id="{{ opportunity.id }}">
|
||||
{{ opportunity.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="cell parentstage">
|
||||
{{ opportunity.stage }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
179
opportunity/templates/opportunity.html
Normal file
179
opportunity/templates/opportunity.html
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load paginate %}
|
||||
{% block content %}
|
||||
<!-- main_container starts here -->
|
||||
<div class="main_container">
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-12">
|
||||
<div class="row marl no-gutters">
|
||||
<div class="col-md-6">
|
||||
<h4>Opportunities</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'opportunities:save' %}"><i class="fa fa-plus"></i> Add New Opportunity</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<form id="opportunity_filter" method="POST" action="">
|
||||
<div class="card-body ">
|
||||
<div class="card-title">Filters</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" id="id_name" name="name" {% if request.POST %} value="{{request.POST.name}}" {% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account</label>
|
||||
<select class="form-control" id="id_account" name="account">
|
||||
<option value="">---------</option>
|
||||
{% for l in accounts %}
|
||||
<option value="{{l.id}}" {% if request.POST.account %}{%ifequal l.id request.POST.account|add:"0"%}selected{%endifequal%} {% endif %}>{{ l.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Stage</label>
|
||||
<select class="form-control" id="id_stage" name="stage" >
|
||||
<option value="">---------</option>
|
||||
{% for stage in stages %}
|
||||
<option value="{{stage.0}}" {% if request.POST.stage %} {% ifequal stage.0 request.POST.stage %}selected{% endifequal %} {% endif %}>{{stage.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Lead Source</label>
|
||||
<select class="form-control" id="id_lead_source" name="lead_source" >
|
||||
<option value="">---------</option>
|
||||
{% for source in sources %}
|
||||
<option value="{{source.0}}" {% if request.POST.lead_source %} {% ifequal source.0 request.POST.lead_source %}selected{% endifequal %} {% endif %}>{{source.1}} </option>
|
||||
{% endfor%}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col text-center col-12">
|
||||
<div class="form-group buttons_row">
|
||||
<button class="btn btn-primary save" type="submit">Search</button>
|
||||
<a href="{% url 'opportunities:list' %}" class="btn btn-default clear">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<!-- opportunities list start-->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="panel-heading-list card-title ">
|
||||
List of Opportunities
|
||||
<span class="float-right total_count">{% if show_pageitems %} {% show_pageitems %}{% else %}Total Opportunities {{ opportunity_list|length }}{% endif %}</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" style="text-align:center;">S.No</th>
|
||||
<th width="15%" style="text-align:center;">Name</th>
|
||||
<th width="15%" style="text-align:center;">Account</th>
|
||||
<th width="15%" style="text-align:center;">Contact(s)</th>
|
||||
<th width="15%" style="text-align:center;">Stage</th>
|
||||
<th width="10%" style="text-align:center;">Lead Source</th>
|
||||
<th width="25%" style="text-align:center;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if per_page %}
|
||||
{% paginate per_page opportunity_list %}
|
||||
{% else %}
|
||||
{% paginate 10 opportunity_list %}
|
||||
{% endif %}
|
||||
{% for opportunity in opportunity_list %}
|
||||
<tr class="text-center">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'opportunities:opp_view' opportunity.id %}">{{ opportunity.name }}</a></td>
|
||||
<td>
|
||||
{% if opportunity.account %}
|
||||
<a href="{% url 'accounts:view_account' opportunity.account.id %}">{{ opportunity.account }}</a>
|
||||
{% else %}
|
||||
No Related Account
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% with opp_contacts=opportunity.contacts.all %}
|
||||
{% if opp_contacts %}
|
||||
{% for contact in opp_contacts %}
|
||||
<li class="text-left"><a href="{% url 'contacts:view_contact' contact.id %}">{{contact.first_name}} {{contact.last_name}}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
No Related Contact
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td>{% if opportunity.stage %}{{ opportunity.stage }}{% else %}Not Specified {% endif %}</td>
|
||||
<td>{% if opportunity.lead_source %}{{ opportunity.lead_source }}{% else %}Not Specified{% endif %}</td>
|
||||
<td class="actions">
|
||||
<a href="{% url 'opportunities:opp_view' opportunity.id %}" class="btn btn-info view"><i class="fas fa-eye"></i> View</a>
|
||||
<a href="{% url 'opportunities:opp_edit' opportunity.id %}" class="btn btn-success edit"><i class="fas fa-pencil-alt"></i>Edit</a>
|
||||
<a href="{% url 'opportunities:opp_remove' opportunity.id %}" class="btn btn-danger delete remove_account"><i class="fas fa-trash-alt"></i>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% ifequal opportunity_list|length 0 %}
|
||||
<h6 class="text-center">No Opportunity Records Found</h6>
|
||||
{% endifequal %}
|
||||
<div class="marl row text-center">
|
||||
{% show_pages %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
<!-- opportunities list end-->
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$('.delete').click(function(e){
|
||||
e.preventDefault()
|
||||
url = $(this).attr('href')
|
||||
if (!confirm('Are you sure you want to delete?'))
|
||||
return;
|
||||
window.location = $(this).attr('href')
|
||||
});
|
||||
|
||||
$("a[rel='page']").click(function(e){
|
||||
e.preventDefault();
|
||||
$('#opportunity_filter').attr("action", $(this).attr("href"));
|
||||
$('#opportunity_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
17
opportunity/templates/opportunity_comments.html
Normal file
17
opportunity/templates/opportunity_comments.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="pull-right right-container">
|
||||
<div class="list-row-buttons btn-group pull-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<a href="{% url 'comment_remove' pk=comment.pk %}"><button type="submit">Submit</button></a>
|
||||
<span class="glyphicon glyphicon-remove"></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-head-container">{{comment.comment_person}} Commented</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}">{{comment.comment}}</div>
|
||||
<div class="stream-date-container">{{comment.comment_time}}</div>
|
||||
{% endfor %}
|
||||
339
opportunity/templates/view_opportunity.html
Normal file
339
opportunity/templates/view_opportunity.html
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block breadcrumb1 %}
|
||||
<!-- Breadcrumb Starts Here -->
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'opportunities:list' %}">Opportunities</a></li>
|
||||
<li class="breadcrumb-item active">View</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<!-- Breadcrumb Ends Here -->
|
||||
{% endblock%}
|
||||
{% block content%}
|
||||
<!-- OPPORTUNITY VIEW STARTS -->
|
||||
<div class="main_container" id="maincontainer">
|
||||
<div class="overview_form_block row marl">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>
|
||||
OVERVIEW
|
||||
<span class="float-right" style="margin-top: 0px">
|
||||
<div class="dropdown buttons_row">
|
||||
<button class="btn btn-primary dropdown-toggle save" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'opportunities:opp_edit' opportunity_record.id %}" >Edit</a></li>
|
||||
<li class="delete_contact"><a href="{% url 'opportunities:opp_remove' opportunity_record.id %}" id="remove_opportunity">REMOVE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-6">
|
||||
<div class="filter_col col-md-12" id="iname">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_name" data-name="name">Name</label>
|
||||
<div class="opportunity_field" id="opportunity_name" data-name="name">{{ opportunity_record.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_opportunity_account" data-name="name">Account</label>
|
||||
<div class="opportunity_field" id ="opportunity_account" data-name="name">{{ opportunity_record.account }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.contacts.all %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_contact" data-name="name">Contact(s)</label>
|
||||
<div class="opportunity_field" id="opportunity_contact" data-name="name">
|
||||
{% for contact in opportunity_record.contacts.all %}
|
||||
<li>{{ contact }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.amount %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_amount" data-name="name">Amount</label>
|
||||
<div class="opportunity_field" id="opportunity_amount" data-name="name">{{ opportunity_record.currency }} {{ opportunity_record.amount }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.stage %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_stage" data-name="name">Stage</label>
|
||||
<div class="opportunity_field" id="opportunity_stage" data-name="name">{{ opportunity_record.stage }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.lead_source %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_lead_source" data-name="name">Lead Source</label>
|
||||
<div class="opportunity_field" id="opportunity_lead_source" data-name="name">{{ opportunity_record.lead_source }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.probability %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_probability" data-name="name">Probability</label>
|
||||
<div class="opportunity_field" id="opportunity_probability" data-name="name">{{opportunity_record.probability}} %</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_close_date" data-name="name">Close Date</label>
|
||||
<div class="opportunity_field" id="opportunity_close_date" data-name="name">{{opportunity_record.closed_on|date}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="filter_col col-md-12">
|
||||
{% if opportunity_record.description %}
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_description" data-name="name">Description</label>
|
||||
<div class="opportunity_field" id="opportunity_description" data-name="name">{{opportunity_record.description}}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section starts-->
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="card-title view-pad">
|
||||
<h5>Comments</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="col-md-12">
|
||||
<form id="comment_form" method="POST" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_comments" name="comment" placeholder="Submit Your Comments Here"></textarea><span><i id="CommentError" style="display:none; color:red"></i></span>
|
||||
</br>
|
||||
<div class="buttons_row">
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit" type="submit">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value="{{ opportunity_record.id }}" name="opportunityid">
|
||||
</form>
|
||||
<ul class="list-group" id="comments_div">
|
||||
{% for comment in comments %}
|
||||
<li class="list-group-item list-row" id="comment{{comment.id}}">
|
||||
<div class="float-right right-container">
|
||||
<div class="list-row-buttons btn-group float-right">
|
||||
<button class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu text-center">
|
||||
<li>
|
||||
<a class="action" onclick="edit_comment({{comment.id}})">Edit</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="action" onclick="remove_comment({{comment.id}})">Remove</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stream-post-container" id="comment_name{{comment.id}}"><pre>{{ comment.comment }}</pre></div>
|
||||
<div class="stream-container">
|
||||
<pre class="float-left">{{ comment.commented_by }}</pre>
|
||||
<pre class="float-right">{{ comment.commented_on }}</pre>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="Comments_Opportunity_Modal" role="dialog" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Update Your Comment</h4>
|
||||
</div>
|
||||
<form id="comment_edit_form" method="POST" >
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" textarea cols="40" rows="3" id="id_editcomment" name="comment" placeholder="Submit Your Comments"></textarea><span><i id="CommentEditError" style="display:none; color:red"></i></span>
|
||||
<input type="hidden" value="{{ opportunity.id }}" name="opportunityid">
|
||||
<input type="hidden" value="" name="commentid" id="commentid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default save" id="comment_edit" type="submit">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Comments Section Ends-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body" id="datashow">
|
||||
<div class="panel-heading card-title view-pad">
|
||||
<h5>Label</h5>
|
||||
</div>
|
||||
<div class="row marl">
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
{%if opportunity_record.assigned_to.all %}
|
||||
<label class="opportunity_field_label" for="id_assigned_user" data-name="name">Assigned User(s)</label>
|
||||
<div class="opportunity_field" id="opportunity_assigned_users" data-name="name">
|
||||
{% for user in opportunity_record.assigned_to.all %}
|
||||
<li>{{ user }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_team" data-name="name">Assigned Team(s)</label>
|
||||
<div class="opportunity_field" id="opportunity_team" data-name="name">
|
||||
{%if not opportunity_record.teams %}
|
||||
Not Assigned Yet
|
||||
{% else %}
|
||||
{% for team in opportunity_record.teams.all %}
|
||||
<li>{{ team }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_created_on" data-name="name">Created On</label>
|
||||
<div class="opportunity_field" id="opportunity_created_on" data-name="name">{{opportunity_record.created_on}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="opportunity_field_label" for="id_created_by" data-name="name">Created by</label>
|
||||
<div class="opportunity_field" id="opportunity_created_by" data-name="name">{{opportunity_record.created_by}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- OPPORTUNITY VIEW ENDS -->
|
||||
{% endblock %}
|
||||
{% block js_block %}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
'format': 'YYYY-MM-DD',
|
||||
});
|
||||
});
|
||||
$('#remove_opportunity').click(function(e){
|
||||
var result = confirm("Are You Sure You Want to delete?");
|
||||
if (result==false) {
|
||||
e.preventDefault()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#comment_form").submit(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url: "{% url 'opportunities:add_comment' %}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentError").html(data.error).show()
|
||||
} else {
|
||||
d = new Date(data.commented_on);
|
||||
$("#comments_div").prepend("<li class='list-group-item list-row' id='comment" + data.comment_id + "'>" +
|
||||
"<div class='float-right right-container'>" +
|
||||
"<div class='list-row-buttons btn-group float-right'>" +
|
||||
"<button class='btn btn-link btn-sm dropdown-toggle' data-toggle='dropdown' type='button'><span class='caret'></span></button>" +
|
||||
"<ul class='dropdown-menu text-center'>" +
|
||||
"<li><a class='action' onclick='edit_comment(" + data.comment_id + ")'>Edit</a></li>" +
|
||||
"<li><a class='action' onclick='remove_comment(" + data.comment_id + ")''>Remove</a></li></ul></div></div>" +
|
||||
"<div class='stream-post-container' id='comment_name"+data.comment_id+"'><pre>"+data.comment+"</pre></div>"+
|
||||
"<div class='stream-container'><pre class='float-left'>"+data.commented_by+"</pre><pre class='float-right'>"+d.toGMTString()+"</pre></div>"
|
||||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function edit_comment(x) {
|
||||
$('#Comments_Opportunity_Modal').modal('show');
|
||||
comment = $("#comment_name" + x).text()
|
||||
$("#commentid").val(x)
|
||||
$("#id_editcomment").val(comment)
|
||||
}
|
||||
|
||||
$("#comment_edit").click(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url: "{% url 'opportunities:edit_comment' %}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.error) {
|
||||
$("#CommentEditError").html(data.error).show()
|
||||
} else {
|
||||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Opportunity_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").val("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function HideError(e) {
|
||||
$("#CommentError").hide()
|
||||
}
|
||||
|
||||
function remove_comment(x) {
|
||||
var con = confirm("Do you want to Delete it for Sure!?")
|
||||
if (con == true) {
|
||||
$.post('{% url "opportunities:remove_comment" %}', {
|
||||
"comment_id": x
|
||||
}, function (data) {
|
||||
if (data.error) {
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment" + data.cid).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
|
|
@ -35,7 +35,7 @@ def opp_list(request):
|
|||
opportunity_list = opportunity_list.filter(account=opp_account)
|
||||
if opp_contact:
|
||||
opportunity_list = opportunity_list.filter(contacts=opp_contact)
|
||||
return render(request, "opportunity/opportunity.html", {
|
||||
return render(request, "opportunity.html", {
|
||||
'opportunity_list': opportunity_list,
|
||||
'accounts': accounts,
|
||||
'contacts': contacts,
|
||||
|
|
@ -75,7 +75,7 @@ def opp_create(request):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'opportunity_errors': form.errors})
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
return render(request, 'create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -88,7 +88,7 @@ def opp_create(request):
|
|||
'contacts_list': contacts_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
return render(request, 'create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -107,7 +107,7 @@ def opp_view(request, pk):
|
|||
opportunity_record = get_object_or_404(
|
||||
Opportunity.objects.prefetch_related("contacts", "account"), id=pk)
|
||||
comments = opportunity_record.opportunity_comments.all()
|
||||
return render(request, 'opportunity/view_opportunity.html', {
|
||||
return render(request, 'view_opportunity.html', {
|
||||
'opportunity_record': opportunity_record,
|
||||
'comments': comments
|
||||
})
|
||||
|
|
@ -148,7 +148,7 @@ def opp_edit(request, pk):
|
|||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'opportunity_errors': form.errors})
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
return render(request, 'create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'opportunity_obj': opportunity_obj,
|
||||
'accounts': accounts,
|
||||
|
|
@ -162,7 +162,7 @@ def opp_edit(request, pk):
|
|||
'contacts_list': contacts_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
return render(request, 'create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'opportunity_obj': opportunity_obj,
|
||||
'accounts': accounts,
|
||||
|
|
@ -267,6 +267,6 @@ def remove_comment(request):
|
|||
def get_opportunity(request):
|
||||
if request.method == 'GET':
|
||||
opportunities = Opportunity.objects.all()
|
||||
return render(request, 'opportunity/opportunities_list.html', {'opportunities': opportunities})
|
||||
return render(request, 'opportunities_list.html', {'opportunities': opportunities})
|
||||
else:
|
||||
return HttpResponse('Invalid Method or Not Authanticated in load_calls')
|
||||
|
|
|
|||
614
planner/templates/calls.html
Normal file
614
planner/templates/calls.html
Normal file
|
|
@ -0,0 +1,614 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block content %}
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-2">CALLS</div>
|
||||
<div class="col-md-7">
|
||||
<div class="row marl search-row">
|
||||
<form id="filter-form" method="get">
|
||||
<div class="form-group col-md-8 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input placeholder="Search Calls" type="text" class="form-control text-filter"
|
||||
name="event_name" value="" tabindex="1">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search searchmeetings btn-icon"
|
||||
data-action="search">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="event_type" value="Call"/>
|
||||
<div class="addedFilters">
|
||||
<div class="input-group parent-filter">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control input-sm" id="parent_type-filter" name="parent_type"
|
||||
style="width:100px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input placeholder="Select" autocomplete="off" value="" name="parent_name"
|
||||
class="main-element form-control input-sm parent_name" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="selectparent">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<input type="hidden" value="" class="parent_id" name="parent_id">
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group assigned-user-filter">
|
||||
<input placeholder="Select Assigned User" autocomplete="off"
|
||||
id="assigned_username-filter"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="assign-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i class="assigned_users_error"></i>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group attendees-users-filter" data-name="attendees-users-filter">
|
||||
<input placeholder="Select Attendee Users" autocomplete="off"
|
||||
class="main-element form-control input-sm attendees-users-user_name" value=""
|
||||
name="username" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="selectusers">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
|
||||
<i id="attendees_user_error"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="input-group date startdatepicker created_at-filter">
|
||||
<input name="created_at" class="form-control"
|
||||
placeholder="Created Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i>
|
||||
<div class="input-group date startdatepicker updated_at-filter">
|
||||
<input name="updated_at" class="form-control"
|
||||
placeholder="Modified Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter"></span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<i id="updated_at_error"></i>
|
||||
|
||||
<div class="input-group date startdatepicker start_date-filter">
|
||||
<input name="start_date" class="form-control"
|
||||
placeholder="Start Date MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="created_at_error"></i>
|
||||
<div class="input-group created_user-filter">
|
||||
<input placeholder="Select Created User" autocomplete="off" id="created_user_username"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="created-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selected-created-user"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group attendees-contacts-filter" data-name="attendees-contacts">
|
||||
<input placeholder="Select Attending Contacts" autocomplete="off" id="contact_name"
|
||||
value=""
|
||||
class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="select-attendee-contacts">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selectedcontacts"></div>
|
||||
</div>
|
||||
|
||||
<i class="attendees_contacts_error"></i>
|
||||
</div>
|
||||
<div class="input-group teams-filter">
|
||||
<select class="form-control" id="teams" name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group status-filter">
|
||||
<select class="form-control main-element input-sm" id="status" name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-sm-4">
|
||||
<div class="btn-group">
|
||||
{# <button type="button" class="btn btn-default extra_option_btn reset-filters"#}
|
||||
{# data-action="reset">#}
|
||||
{# <span class="glyphicon glyphicon-repeat"></span> Reset#}
|
||||
{# </button>#}
|
||||
<button type="button"
|
||||
class="btn btn-default dropdown-toggle extra_option_btn add-filter-button"
|
||||
data-toggle="dropdown" tabindex="-1">
|
||||
Add Field <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li class="filterfield" id="faccount"><a href="#" class="parent-filter">Parent</a></li>
|
||||
<li class="filterfield" id="fassignedUser"><a href="#" class="assigned-user-filter">Assigned
|
||||
User</a></li>
|
||||
<li class="filterfield" id="fcreatedAt"><a class="created_at-filter" href="#">Created
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fcreatedBy"><a class="created_user-filter" href="#">Created
|
||||
By</a></li>
|
||||
<li class="filterfield" id="fdateStart"><a class="start_date-filter" href="#">Date
|
||||
Start</a>
|
||||
</li>
|
||||
<li class="filterfield" id="fmodifiedAt"><a class="updated_at-filter" href="#">Modified
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fstatus"><a class="status-filter" href="#">Status</a></li>
|
||||
<li class="filterfield" id="fteams"><a class="teams-filter" href="#">Teams</a></li>
|
||||
<li class="filterfield" id="fusers"><a class="attendees-users-filter" href="#">Attending
|
||||
Users</a>
|
||||
</li>
|
||||
<li class="filterfield" id="fcontacts"><a class="attendees-contacts-filter" href="#">Contacts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="create_new col-md-3 text-right">
|
||||
<a href="#" id="createcall" data-toggle="modal" data-target="#call-create-model"><i
|
||||
class="fa fa-plus"></i> Create Call</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account</label>
|
||||
<input type="text" class="form-control" placeholder="Account">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Created</label>
|
||||
<input type="text" class="form-control" placeholder="Created">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Phone</label>
|
||||
<input type="text" class="form-control" placeholder="Phone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email</label>
|
||||
<input type="text" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Title</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content for-pagination">
|
||||
{% include 'planner/calls_list.html' %}
|
||||
</div>
|
||||
<!-- CREATE CALL MODEL -->
|
||||
<form id="model-form" method="post">
|
||||
<div class="modal fade" id="call-create-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="create-call-dialog-title" class="modal-title">Create New Call</h4>
|
||||
</div>
|
||||
<div id="modelbody" class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group inline-group" data-name="name">
|
||||
<label class="control-label" data-name="name">
|
||||
Name *
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="event_type" value="Call"/>
|
||||
<input id="name" class="main-element form-control input-sm" type="text"
|
||||
autocomplete="off"
|
||||
name="name" required/>
|
||||
<i id="name_error"></i>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group inline-group" data-name="teams">
|
||||
<div class="field" data-name="teams">
|
||||
<label for="teams">Teams</label>
|
||||
<select class="form-control input-sm" id="teams"
|
||||
name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="assigned-user"
|
||||
style="border-left: 1px">
|
||||
<div class="field" data-name="assigned_user">
|
||||
<label for="assigned_user">Assigned User </label>
|
||||
<div class="form-group" data-name="assigned_user">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="assigned_username" value="" name="username"
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm" id="assign-user"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i id="assigned_users_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="parent">
|
||||
<div class="field" data-name="parent">
|
||||
<label for="parent">Parent </label>
|
||||
<div data-name="parent" class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control input-sm" id="parent_type" name="parent_type" style="width:100px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input placeholder="Select" autocomplete="off"
|
||||
id="parent_name" value="" name="parent_name"
|
||||
class="main-element form-control input-sm"
|
||||
type="text">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default btn-sm" id="selectparent"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
<button tabindex="-1" type="button" class="btn btn-default btn-sm" id="clearparent">
|
||||
<i class="glyphicon glyphicon-remove"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<i id="parent_error"></i>
|
||||
<input type="hidden" name="parent_id" id="parent_id"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="status">
|
||||
<label class="control-label" data-name="status"> Status</label>
|
||||
<div class="field" data-name="status">
|
||||
<select class="form-control main-element" id="status" name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<i id="status_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-contacts">
|
||||
<div class="field" data-name="attendees-contacts">
|
||||
<label for="attendees-contacts">Attendees Contacts </label>
|
||||
<div class="form-group" data-name="attendees-contacts">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="contact_name" value=""
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm"
|
||||
id="select-attendee-contacts"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selectedcontacts"></div>
|
||||
<i id="attendees_contacts_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="direction">
|
||||
<label class="control-label" data-name="direction"> Direction </label>
|
||||
<div class="field" data-name="direction">
|
||||
<select class="form-control main-element" id="direction"
|
||||
name="direction">
|
||||
<option value="Inbound">Inbound</option>
|
||||
<option value="Outbound">Outbound</option>
|
||||
</select>
|
||||
<i id="direction_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="duration">
|
||||
<label class="control-label" data-name="duration"> Duration </label>
|
||||
<div class="field" data-name="duration">
|
||||
<select class="form-control main-element" name="duration">
|
||||
<option selected="" value="300">5m</option>
|
||||
<option value="600">10m</option>
|
||||
<option value="900">15m</option>
|
||||
<option value="1800">30m</option>
|
||||
<option value="2700">45m</option>
|
||||
<option value="3600">1h</option>
|
||||
<option value="7200">2h</option>
|
||||
</select> <i id="duration_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-leads">
|
||||
<div class="field" data-name="attendees-leads">
|
||||
<label for="attendees-leads">Attendees Leads </label>
|
||||
<div class="form-group" data-name="attendees-leads">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="leads_name" value=""
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm"
|
||||
id="select-attendee-leads"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<i id="attendees_leads_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="dateStart">
|
||||
<label class="control-label" data-name="dateEnd"> Date Start * </label>
|
||||
<div class="form-group">
|
||||
<div class='input-group input-group-sm date startdatepicker'>
|
||||
<input type='text' class="form-control" id="start_date"
|
||||
name="start_date"
|
||||
required placeholder="MM/DD/YYYY HH:MM:SS"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i><br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="reminders">
|
||||
<label class="control-label" data-name="reminders"> Reminders </label>
|
||||
<a type="button" id="addreminder" style="padding-top: 5px;border: none">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<div id="reminders" class="field" data-name="reminders">
|
||||
<div class="reminders-container">
|
||||
<div class="input-group reminder">
|
||||
<input type="hidden" id="pushreminder"/>
|
||||
<div id="reminder1">
|
||||
{{ reminder_form_set.management_form }}
|
||||
<div class="reminderslist"
|
||||
style="display: inline-flex;">
|
||||
{% for form in reminder_form_set %}
|
||||
{{ form.reminder_type }}
|
||||
{{ form.reminder_time }}
|
||||
{{ form.DELETE }}
|
||||
{{ form.id }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-users"
|
||||
style="border-left: 1px">
|
||||
<div class="field" data-name="attendees-users">
|
||||
<label for="attendees-users">Attendees Users </label>
|
||||
<div class="form-group" data-name="attendees-users">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="user_name" value="" name="username"
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm" id="selectusers"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selectedusers"></div>
|
||||
<i id="attendees_users_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-12 form-group" data-name="description">
|
||||
<label class="control-label" data-name="description">
|
||||
Description </label>
|
||||
<div class="field" data-name="description">
|
||||
<textarea id="description" class="main-element form-control" rows="4"
|
||||
name="description"
|
||||
required></textarea>
|
||||
<i id="description_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button id="modeldialogclosed" type="button" class="btn btn-default">Close
|
||||
</button>
|
||||
<button id="gocreatecall" type="submit" class="btn btn-success">Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!--END CREATE CALL MODEL-->
|
||||
<!--START SUCCESS CALL MODEL-->
|
||||
<div class="modal fade" id="call-success-model" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="success-call-dialog-title" class="modal-title">Success!!!</h4>
|
||||
</div>
|
||||
<div id="call-created-alert" class="alert alert-success">
|
||||
<strong class="center-block">Call Created Successfully</strong>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="successmodeldialogclosed" class="btn btn-default" type="button"> Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SUCCESS MEETING MODEL-->
|
||||
</div>
|
||||
</div>
|
||||
<!--START DELETECONFORMATION MODEL-->
|
||||
<div class="modal fade" id="call-delete-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="delete-dialog-title" class="modal-title">Confirmation.</h4>
|
||||
</div>
|
||||
<div id="call-delete-alert" class="alert alert-success">
|
||||
<strong class="center-block">Are you soure to Delete??</strong>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-default" data-dismiss="modal"> No</button>
|
||||
<button id="deletecall" class="btn btn-default" type="button"> Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END DELETECONFORMATION MODEL-->
|
||||
<!--SELECT PARENT MODEL-->
|
||||
<div class="modal fade model-sm" id="selectparentmodel" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
</div>
|
||||
<div class="model-body" id="selectcontact-modal-body">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="closeselectparentmodel" class="btn btn-default" data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT PARENT MODEL-->
|
||||
{% include 'planner/dialog_models.html' %}
|
||||
<script src="{% static 'js/calls.js' %}"></script>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
{% endblock %}
|
||||
61
planner/templates/calls_list.html
Normal file
61
planner/templates/calls_list.html
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{% load staticfiles %}
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<th width="20%">Name</th>
|
||||
<th width="20%">Parent</th>
|
||||
<th width="15%">Status</th>
|
||||
<th width="20%">Date Start</th>
|
||||
<!--<th width="20%">Assigned User</th>-->
|
||||
<th width="8%">Actions</th>
|
||||
</thead>
|
||||
<tbody id="callslist">
|
||||
{% for call in calls %}
|
||||
<tr id="call{{ call.id }}">
|
||||
<td><a id="call{{ call.id }}name" href="#">{{ call.name }}</a></td>
|
||||
<td><a id="call{{ call.id }}parent" href="#">{{ call.parent }}</a></td>
|
||||
<td><a id="call{{ call.id }}status" href="#">{{ call.status }}</a></td>
|
||||
<td><a id="call{{ call.id }}start_date" href="#">{{ call.start_date }}</a></td>
|
||||
<!--<td><a href="#">{{ task.assigned_user }}</a></a>-->
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="viewthis" href="#">View</a></li>
|
||||
<li><a class="editthis" href="#">Edit</a></li>
|
||||
<li><a class="removethis" href="#">Remove</a></li>
|
||||
<li><a class="setstatus" value="Held" href="#">Set Held</a></li>
|
||||
<li><a class="setstatus" value="Not Held" href="#">Set Not Held</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if calls|length == 0 %}
|
||||
<div class="heading text-center"> No Calls found</div>
|
||||
{% endif %}
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if calls.has_previous %}
|
||||
<a class="paginate-me" href="?page={{ calls.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in calls.paginator.page_range %}
|
||||
<li class="{% if calls.number == page %}active{% endif %}"><a class="paginate-me"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if calls.has_next %}
|
||||
<a class="paginate-me" href="?page={{ calls.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
63
planner/templates/contacts.html
Normal file
63
planner/templates/contacts.html
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<table class="table for-pagination-contacts">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="cell">
|
||||
</td>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal contacts|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO CONTACTS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for contact in contacts %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<input type="checkbox" class="checkcontact" value="{{ contact.id }}"/>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<a class="cell contactname" id="{{ contact.id }}">{{ contact.name }}</a>
|
||||
</td>
|
||||
<td class="cell contactemail">
|
||||
{{ contact.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if contacts.has_previous %}
|
||||
<a class="paginate-me-contacts" href="?page={{ contacts.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in contacts.paginator.page_range %}
|
||||
<li class="{% if contacts.number == page %}active{% endif %}"><a class="paginate-me-contacts"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if contacts.has_next %}
|
||||
<a class="paginate-me-contacts" href="?page={{ contacts.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
108
planner/templates/dialog_models.html
Normal file
108
planner/templates/dialog_models.html
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{% load staticfiles %}
|
||||
<!--SELECT USERS MODEL-->
|
||||
<div class="modal fade model-sm" id="selectusersmodel" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select User to assign Event</h4>
|
||||
</div>
|
||||
<div class="model-body" id="selectusers-modal-body" style="padding:4% ">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="closeselectusersmodel" class="btn btn-default" data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT USERS MODEL-->
|
||||
<!--SELECT CONTSCTS MODEL-->
|
||||
<div class="modal fade model-sm" id="select-contacts-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select Contacts</h4>
|
||||
</div>
|
||||
<div class="model-body" id="select-contacts-modal-body" style="padding:4% ">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close-attendees-contacts-model" class="btn btn-default"
|
||||
data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT CONTACTS MODEL-->
|
||||
<!--SELECT Leads MODEL-->
|
||||
<div class="modal fade model-sm" id="select-leads-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select Leads</h4>
|
||||
</div>
|
||||
<div class="model-body" id="select-leads-modal-body" style="padding:4% ">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close-attendees-leads-model" class="btn btn-default"
|
||||
data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT USERS MODEL-->
|
||||
|
||||
<!--SELECT ASSIGNED USER MODEL-->
|
||||
<div class="modal fade model-sm" id="select-assigned-user-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select User</h4>
|
||||
</div>
|
||||
<div class="model-body" id="assigned-user-modal-body" style="padding:4% ">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close-assigned-user-model" class="btn btn-default"
|
||||
data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT ASSIGNED USER MODEL-->
|
||||
|
||||
<!--SELECT CREATED USER MODEL-->
|
||||
<div class="modal fade model-sm" id="select-created-user-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select a User</h4>
|
||||
</div>
|
||||
<div class="model-body" id="created-user-modal-body" style="padding:4% ">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close-created-user-model" class="btn btn-default"
|
||||
data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT CREATED USER MODEL-->
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
164
planner/templates/events_base.html
Normal file
164
planner/templates/events_base.html
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-2">Contacts</div>
|
||||
<div class="col-md-7">
|
||||
<div class="row marl search-row">
|
||||
<div class="form-group col-md-8 col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn left-dropdown">
|
||||
<button type="button" class="btn dropdown-toggle filters-button btn-default" title="Filter" data-toggle="dropdown" tabindex="-1" aria-expanded="false">
|
||||
<span class="filters-label">All</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-left filter-menu">
|
||||
|
||||
<li><a class="preset" tabindex="-1" href="javascript:" data-name="" data-action="selectPreset"><span class="glyphicon glyphicon-ok pull-right"></span><div>All</div></a></li>
|
||||
<li><a class="preset" tabindex="-1" href="javascript:" data-name="portalUsers" data-action="selectPreset"><div>Portal Users</div></a></li>
|
||||
<li class="divider preset-control hidden"></li>
|
||||
|
||||
|
||||
<li class="preset-control remove-preset hidden"><a tabindex="-1" href="#" data-action="removePreset">Remove Filter</a></li>
|
||||
<li class="preset-control save-preset hidden"><a tabindex="-1" href="#" data-action="savePreset">Save Filter</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li class="checkbox"><label><input type="checkbox" data-role="boolFilterCheckbox" name="onlyMy">
|
||||
Only My</label></li>
|
||||
<li class="checkbox"><label><input type="checkbox" data-role="boolFilterCheckbox" name="followed"> Followed</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" class="form-control text-filter" name="textFilter" value="" tabindex="1">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search btn-icon" data-action="search">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-sm-4">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default extra_option_btn" data-action="reset">
|
||||
<span class="glyphicon glyphicon-repeat"></span> Reset
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle extra_option_btn add-filter-button" data-toggle="dropdown" tabindex="-1">
|
||||
Add Field <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li data-name="account" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="account">Account</a></li>
|
||||
<li data-name="address" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="address">Address</a></li>
|
||||
<li data-name="assignedUser" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="assignedUser">Assigned User</a></li>
|
||||
<li data-name="createdAt" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="createdAt">Created At</a></li>
|
||||
<li data-name="emailAddress" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="emailAddress">Email</a></li>
|
||||
<li data-name="phoneNumber" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="phoneNumber">Phone</a></li>
|
||||
<li data-name="title" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="title">Title</a></li>
|
||||
<li data-name="teams" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="teams">Teams</a></li>
|
||||
<li data-name="targetLists" class=""><a href="#" class="add-filter" data-action="addFilter" data-name="targetLists">Target Lists</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="create_new col-md-3 text-right">
|
||||
{% block addnew %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account</label>
|
||||
<input type="text" class="form-control" placeholder="Account">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Created</label>
|
||||
<input type="text" class="form-control" placeholder="Created">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Phone</label>
|
||||
<input type="text" class="form-control" placeholder="Phone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email</label>
|
||||
<input type="text" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Title</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Actions
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Edit</a></li>
|
||||
<li><a href="#">Delete</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="pull-right total_count">{% block eventcount %}{% endblock %}</span>
|
||||
</div>
|
||||
<div class="panel-content" name="ListDate">
|
||||
|
||||
{% block eventslist %}{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- main_container ends here -->
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
63
planner/templates/leads.html
Normal file
63
planner/templates/leads.html
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<table class="table for-pagination-leads">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="cell">
|
||||
</td>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal leads|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO LEADS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for lead in leads %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<input type="checkbox" class="checklead" value="{{ lead.id }}"/>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<a class="cell leadname" id="{{ lead.id }}">{{ lead.first_name }}</a>
|
||||
</td>
|
||||
<td class="cell leademail">
|
||||
{{ lead.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if leads.has_previous %}
|
||||
<a class="paginate-me-leads" href="?page={{ leads.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in leads.paginator.page_range %}
|
||||
<li class="{% if leads.number == page %}active{% endif %}"><a class="paginate-me-leads"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if leads.has_next %}
|
||||
<a class="paginate-me-leads" href="?page={{ leads.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
549
planner/templates/meetings.html
Normal file
549
planner/templates/meetings.html
Normal file
|
|
@ -0,0 +1,549 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block content %}
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-2">MEETINGS</div>
|
||||
<div class="col-md-7">
|
||||
<div class="row marl search-row">
|
||||
<form id="filter-form" method="get">
|
||||
<div class="form-group col-md-8 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input placeholder="Search Meetings" type="text" class="form-control text-filter"
|
||||
name="event_name" value="" tabindex="1">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search searchmeetings btn-icon"
|
||||
data-action="search">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="event_type" value="Meeting"/>
|
||||
<div class="addedFilters">
|
||||
<div class="input-group parent-filter">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control input-sm" id="parent_type-filter" name="parent_type"
|
||||
style="width:100px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input placeholder="Select" autocomplete="off" value="" name="parent_name"
|
||||
class="main-element form-control input-sm parent_name" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="assign-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<input type="hidden" value="" class="parent_id" name="parent_id">
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group assigned-user-filter">
|
||||
<input placeholder="Select Assigned User" autocomplete="off"
|
||||
id="assigned_username-filter"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="assign-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i class="assigned_users_error"></i>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group attendees-users-filter" data-name="attendees-users-filter">
|
||||
<input placeholder="Select Attendee Users" autocomplete="off"
|
||||
class="main-element form-control input-sm attendees-users-user_name" value=""
|
||||
name="username" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="selectusers">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selectedusers"></div>
|
||||
<i id="attendees_user_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group date startdatepicker created_at-filter">
|
||||
<input name="created_at" class="form-control"
|
||||
placeholder="Created Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i>
|
||||
<div class="input-group date startdatepicker updated_at-filter">
|
||||
<input name="updated_at" class="form-control"
|
||||
placeholder="Modified Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter"></span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<i id="updated_at_error"></i>
|
||||
|
||||
<div class="input-group date startdatepicker start_date-filter">
|
||||
<input name="start_date" class="form-control"
|
||||
placeholder="Start Date MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="created_at_error"></i>
|
||||
<div class="input-group created_user-filter">
|
||||
<input placeholder="Select Created User" autocomplete="off" id="created_user_username"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="created-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selected-created-user"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group attendees-contacts-filter" data-name="attendees-contacts">
|
||||
<input placeholder="Select Attending Contacts" autocomplete="off" id="contact_name"
|
||||
value=""
|
||||
class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="select-attendee-contacts">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selectedcontacts"></div>
|
||||
</div>
|
||||
|
||||
<i class="attendees_contacts_error"></i>
|
||||
</div>
|
||||
<div class="input-group teams-filter">
|
||||
<select class="form-control" id="teams" name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group status-filter">
|
||||
<select class="form-control main-element input-sm" id="status" name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-sm-4">
|
||||
<div class="btn-group">
|
||||
{# <button type="button" class="btn btn-default extra_option_btn reset-filters"#}
|
||||
{# data-action="reset">#}
|
||||
{# <span class="glyphicon glyphicon-repeat"></span> Reset#}
|
||||
{# </button>#}
|
||||
<button type="button"
|
||||
class="btn btn-default dropdown-toggle extra_option_btn add-filter-button"
|
||||
data-toggle="dropdown" tabindex="-1">
|
||||
Add Field <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li class="filterfield" id="faccount"><a href="#" class="parent-filter">Parent</a></li>
|
||||
<li class="filterfield" id="fassignedUser"><a href="#" class="assigned-user-filter">Assigned
|
||||
User</a></li>
|
||||
<li class="filterfield" id="fcreatedAt"><a class="created_at-filter" href="#">Created
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fcreatedBy"><a class="created_user-filter" href="#">Created
|
||||
By</a></li>
|
||||
<li class="filterfield" id="fdateStart"><a class="start_date-filter" href="#">Date
|
||||
Start</a>
|
||||
</li>
|
||||
<li class="filterfield" id="fmodifiedAt"><a class="updated_at-filter" href="#">Modified
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fstatus"><a class="status-filter" href="#">Status</a></li>
|
||||
<li class="filterfield" id="fteams"><a class="teams-filter" href="#">Teams</a></li>
|
||||
<li class="filterfield" id="fusers"><a class="attendees-users-filter" href="#">Attenging
|
||||
Users</a>
|
||||
</li>
|
||||
<li class="filterfield" id="fcontacts"><a class="attendees-contacts-filter" href="#">Contacts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="create_new col-md-3 text-right">
|
||||
<a href="#" id="createmeeting" data-toggle="modal" data-target="#meeting-create-model"><i
|
||||
class="fa fa-plus"></i> Create Meeting</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- heading_create ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content for-pagination">
|
||||
{% include 'planner/meetings_list.html' %}
|
||||
</div>
|
||||
<!-- CREATE MEETING MODEL -->
|
||||
<form id="model-form" method="POST" novalidate >
|
||||
<div class="modal fade" id="meeting-create-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="create-meeting-dialog-title" class="modal-title">Create New Meeting</h4>
|
||||
</div>
|
||||
<div id="modelbody" class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group inline-group" data-name="name">
|
||||
<label class="control-label" data-name="name">
|
||||
Name *
|
||||
</label>
|
||||
<div class="field" data-name="name">
|
||||
<input type="hidden" name="event_type" value="Meeting"/>
|
||||
<input id="name" class="form-control input-sm" type="text"
|
||||
autocomplete="off"
|
||||
name="name" required/>
|
||||
</div>
|
||||
<i id="name_error"></i>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group inline-group" data-name="teams">
|
||||
<div class="field" data-name="teams">
|
||||
<label for="teams">Teams</label>
|
||||
<select class="form-control input-sm" id="teams"
|
||||
name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-users"
|
||||
style="border-left: 1px">
|
||||
<div class="field" data-name="attendees-users">
|
||||
<label for="attendees-users">Attendees Users </label>
|
||||
<div class="form-group" data-name="attendees-users">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
value="" name="username"
|
||||
class="main-element form-control input-sm attendees-users-user_name">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm" id="selectusers"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selectedusers"></div>
|
||||
<i id="attendees_user_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="parent">
|
||||
<div class="field" data-name="parent">
|
||||
<label for="parent">Parent </label>
|
||||
<div class="form-group" data-name="parent">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control input-sm" id="parent_type" name="parent_type" style="width:100px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
value="" name="parent_name"
|
||||
class="main-element form-control input-sm parent_name">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default btn-sm" id="selectparent"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
<button tabindex="-1" type="button" class="btn btn-default btn-sm" id="clearparent">
|
||||
<i class="glyphicon glyphicon-remove"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<i id="parent_error"></i>
|
||||
<input type="hidden" value="" class="parent_id"
|
||||
name="parent_id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="status">
|
||||
<label class="control-label" data-name="status"> Status</label>
|
||||
<div class="field" data-name="status">
|
||||
<select class="form-control main-element input-sm" id="status"
|
||||
name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<i id="status_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-contacts">
|
||||
<div class="field" data-name="attendees-contacts">
|
||||
<label for="attendees-contacts">Attendees Contacts </label>
|
||||
<div class="form-group" data-name="attendees-contacts">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="contact_name" value=""
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm"
|
||||
id="select-attendee-contacts"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selectedcontacts"></div>
|
||||
<i class="attendees_contacts_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="dateStart">
|
||||
<label class="control-label" data-name="dateEnd"> Date Start * </label>
|
||||
<div class="form-group">
|
||||
<div class="input-group date startdatepicker">
|
||||
<input name="start_date" class="form-control" id="start_date"
|
||||
placeholder="MM/DD/YYYY HH:MM:SS" required=""
|
||||
type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="dateEnd">
|
||||
<label class="control-talabel" data-name="dateEnd"> Date End *</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group input-group-sm date enddatepicker'>
|
||||
<input type='text' id="close_date" name="close_date"
|
||||
class="form-control input-sm"
|
||||
required
|
||||
placeholder="MM/DD/YYYY HH:MM:SS"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="close_date_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="attendees-leads">
|
||||
<div class="field" data-name="attendees-leads">
|
||||
<label for="attendees-leads">Attendees Leads </label>
|
||||
<div class="form-group" data-name="attendees-leads">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="leads_name" value=""
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm"
|
||||
id="select-attendee-leads"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div id="selectedleads"></div>
|
||||
<i id="attendees_leads_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-4 form-group" data-name="duration">
|
||||
<label class="control-label" data-name="duration"> Duration </label>
|
||||
<div class="field" data-name="duration">
|
||||
<select class="form-control main-element input-sm" id="duration"
|
||||
name="duration">
|
||||
<option value="900">15m</option>
|
||||
<option value="1800">30m</option>
|
||||
<option value="3600">1h</option>
|
||||
<option value="7200">2h</option>
|
||||
<option value="10800">3h</option>
|
||||
<option value="86400">1d</option>
|
||||
</select>
|
||||
<i id="duration_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="reminders">
|
||||
<label class="control-label" data-name="reminders"> Reminders </label>
|
||||
<a type="button" id="addreminder"
|
||||
style="padding-top: 5px;border: none">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<div id="reminders" class="field" data-name="reminders">
|
||||
<div class="reminders-container">
|
||||
<div class="input-group reminder">
|
||||
<input type="hidden" id="pushreminder"/>
|
||||
<div id="reminder1">
|
||||
{{ reminder_form_set.management_form }}
|
||||
<div class="reminderslist"
|
||||
style="display: inline-flex;">
|
||||
{% for form in reminder_form_set %}
|
||||
{{ form.reminder_type }}
|
||||
{{ form.reminder_time }}
|
||||
{{ form.DELETE }}
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
{{ form.id }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<i id="reminder_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-4 form-group" data-name="assigned-user"
|
||||
style="border-left: 1px">
|
||||
<div class="field" data-name="assigned_user">
|
||||
<label for="assigned_user">Assigned User </label>
|
||||
<div class="form-group" data-name="assigned_user">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
id="assigned_username" value="" name="username"
|
||||
class="main-element form-control input-sm">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm" id="assign-user"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i class="assigned_users_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-12 form-group" data-name="description">
|
||||
<label class="control-label" data-name="description">
|
||||
Description </label>
|
||||
<div class="field" data-name="description">
|
||||
<textarea id="description" class="main-element form-control input-sm" rows="4"
|
||||
name="description"
|
||||
required></textarea>
|
||||
<i id="description_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="modeldialogclosed" type="button" class="btn btn-default btn-sm">
|
||||
Close
|
||||
</button>
|
||||
<button id="gocreatemeeting" type="submit" class="btn btn-success btn-sm">
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--END CREATE MEETING MODEL-->
|
||||
<!--START SUCCESS MEETING MODEL-->
|
||||
<div class="modal fade" id="meeting-success-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="success-meeting-dialog-title" class="modal-title">Success!!!</h4>
|
||||
</div>
|
||||
<div id="meeting-created-alert" class="alert alert-success">
|
||||
<strong class="center-block">Meeting Created Successfully</strong>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="successmodeldialogclosed" class="btn btn-default" type="button"> Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SUCCESS MEETING MODEL-->
|
||||
<!--START DELETECONFORMATION MODEL-->
|
||||
<div class="modal fade" id="meeting-delete-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button class="close" data-dismiss="modal" type="button">×</button>
|
||||
<h4 id="delete-dialog-title" class="modal-title">Confirmation.</h4>
|
||||
</div>
|
||||
<div id="meeting-delete-alert" class="alert alert-success">
|
||||
<strong class="center-block">Are you soure to Delete??</strong>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="deletemeeting" class="btn btn-default" type="button"> Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END DELETECONFORMATION MODEL-->
|
||||
<!--SELECT PARENT MODEL-->
|
||||
<div class="modal fade model-sm" id="selectparentmodel" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select Contact</h4>
|
||||
</div>
|
||||
<div class="model-body" id="selectcontact-modal-body">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="closeselectparentmodel" class="btn btn-default" data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT PARENT MODEL-->
|
||||
{% include 'planner/dialog_models.html' %}
|
||||
<script src="{% static 'js/meetings.js' %}"></script>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
{% endblock %}
|
||||
81
planner/templates/meetings_list.html
Normal file
81
planner/templates/meetings_list.html
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{% load staticfiles %}
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Name</th>
|
||||
<th width="10%">Parent</th>
|
||||
<th width="15%">Status</th>
|
||||
<th width="20%">Date Start</th>
|
||||
<!--<th width="20%">Assigned User</th>-->
|
||||
<th width="8%">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="meetingslist">
|
||||
{% for meeting in meetings %}
|
||||
<tr id="meeting{{ meeting.id }}">
|
||||
<td><a id="meeting{{ meeting.id }}name" href="#">{{ meeting.name }}</a></td>
|
||||
<td id="meeting{{ meeting.id }}parent">{{ meeting.parent }}</td>
|
||||
<td id="meeting{{ meeting.id }}status">{{ meeting.status }}</td>
|
||||
<td id="meeting{{ meeting.id }}startdate">{{ meeting.start_date }}</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a id="meeting{{ meeting.id }}view" class="viewthis" href="#">View</a></li>
|
||||
<li><a id="meeting{{ meeting.id }}edit" class="editthis" href="#">Edit</a></li>
|
||||
<li><a id="meeting{{ meeting.id }}remove" class="removethis" href="#">Remove</a>
|
||||
<li><a class="setstatus" value="Held" href="#">Set Held</a></li>
|
||||
<li><a class="setstatus" value="Not Held" href="#">Set Not Held</a></li>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if meetings|length == 0 %}
|
||||
<div class="heading text-center"> No Meetings found</div>
|
||||
{% endif %}
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if meetings.has_previous %}
|
||||
<a class="paginate-me" href="?page={{ meetings.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in meetings.paginator.page_range %}
|
||||
<li class="{% if meetings.number == page %}active{% endif %}"><a class="paginate-me"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if meetings.has_next %}
|
||||
<a class="paginate-me" href="?page={{ meetings.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
$('body').on('click', '.pagination li a', function (e) {
|
||||
e.preventDefault();
|
||||
URL = window.location.pathname + $(this).context.search
|
||||
$('.for-pagination').animate({width: '20px'})
|
||||
$.get(
|
||||
URL,
|
||||
function (data, status, xhr) {
|
||||
if (status == 'success') {
|
||||
$('.for-pagination').html(data).animate({width: '100%'})
|
||||
}
|
||||
else if (status == 'error') {
|
||||
$('.for-pagination').html('Something Went Wrong Try Again Later...')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
13
planner/templates/reminder.html
Normal file
13
planner/templates/reminder.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% load staticfiles %}
|
||||
<div id="reminder1">
|
||||
{{ reminder_form_set.management_form }}
|
||||
{% for form in reminder_form_set %}
|
||||
<div class="reminderslist" style="display: inline-flex;">
|
||||
{{ form.reminder_type }}
|
||||
{{ form.reminder_time }}
|
||||
{{ form.DELETE }} <span class="btn glyphicon glyphicon-trash"></span>
|
||||
{{ form.id }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
469
planner/templates/tasks.html
Normal file
469
planner/templates/tasks.html
Normal file
|
|
@ -0,0 +1,469 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% block content %}
|
||||
<!-- heading_create starts here -->
|
||||
<div class="row marl heading_create">
|
||||
<div class="heading col-md-2">TASKS</div>
|
||||
<div class="col-md-7">
|
||||
<div class="row marl search-row">
|
||||
<form id="filter-form" method="get">
|
||||
<div class="form-group col-md-8 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input placeholder="Search Tasks" type="text" class="form-control text-filter"
|
||||
name="event_name" value="" tabindex="1">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary search searchmeetings btn-icon"
|
||||
data-action="search">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="event_type" value="Task"/>
|
||||
<div class="addedFilters">
|
||||
<div class="input-group parent-filter">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control input-sm" id="parent_type-filter" name="parent_type"
|
||||
style="width:100px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input placeholder="Select" autocomplete="off" value="" name="parent_name"
|
||||
class="main-element form-control input-sm parent_name" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="selectparent">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<input type="hidden" value="" class="parent_id" name="parent_id">
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group assigned-user-filter">
|
||||
<input placeholder="Select Assigned User" autocomplete="off"
|
||||
id="assigned_username-filter"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="assign-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i class="assigned_users_error"></i>
|
||||
</div>
|
||||
<div class="input-group date startdatepicker created_at-filter">
|
||||
<input name="created_at" class="form-control"
|
||||
placeholder="Created Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i>
|
||||
<div class="input-group date startdatepicker updated_at-filter">
|
||||
<input name="updated_at" class="form-control"
|
||||
placeholder="Modified Time MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter"></span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<i id="updated_at_error"></i>
|
||||
<div class="input-group date startdatepicker start_date-filter">
|
||||
<input name="start_date" class="form-control"
|
||||
placeholder="Start Date MM/DD/YYYY HH:MM:SS" required="" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar">
|
||||
</span>
|
||||
<span class="glyphicon glyphicon-remove remove-this-filter">
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="created_at_error"></i>
|
||||
<div class="input-group created_user-filter">
|
||||
<input placeholder="Select Created User" autocomplete="off" id="created_user_username"
|
||||
value=""
|
||||
name="username" class="main-element form-control input-sm" type="text">
|
||||
<span class="input-group-addon">
|
||||
<span title="Select" id="created-user">
|
||||
<i class="glyphicon glyphicon-arrow-up"></i>
|
||||
</span>
|
||||
<span class="remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="selected-created-user"></div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="input-group teams-filter">
|
||||
<select class="form-control" id="teams" name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group status-filter">
|
||||
<select class="form-control main-element input-sm" id="status" name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<span class="input-group-addon remove-this-filter">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-sm-4">
|
||||
<div class="btn-group">
|
||||
{# <button type="button" class="btn btn-default extra_option_btn reset-filters"#}
|
||||
{# data-action="reset">#}
|
||||
{# <span class="glyphicon glyphicon-repeat"></span> Reset#}
|
||||
{# </button>#}
|
||||
<button type="button"
|
||||
class="btn btn-default dropdown-toggle extra_option_btn add-filter-button"
|
||||
data-toggle="dropdown" tabindex="-1">
|
||||
Add Field <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right filter-list">
|
||||
<li class="filterfield" id="faccount"><a href="#" class="parent-filter">Parent</a></li>
|
||||
<li class="filterfield" id="fassignedUser"><a href="#" class="assigned-user-filter">Assigned
|
||||
User</a></li>
|
||||
<li class="filterfield" id="fcreatedAt"><a class="created_at-filter" href="#">Created
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fcreatedBy"><a class="created_user-filter" href="#">Created
|
||||
By</a></li>
|
||||
<li class="filterfield" id="fdateStart"><a class="start_date-filter" href="#">Date
|
||||
Start</a>
|
||||
</li>
|
||||
<li class="filterfield" id="fmodifiedAt"><a class="updated_at-filter" href="#">Modified
|
||||
At</a></li>
|
||||
<li class="filterfield" id="fstatus"><a class="status-filter" href="#">Status</a></li>
|
||||
<li class="filterfield" id="fteams"><a class="teams-filter" href="#">Teams</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="create_new col-md-3 text-right">
|
||||
<a href="#" id="createtask" data-toggle="modal" data-target="#task-create-model"><i
|
||||
class="fa fa-plus"></i> Create Task</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- heading_create ends here -->
|
||||
<!-- filter_row starts here -->
|
||||
<div class="filter_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
filters
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Account</label>
|
||||
<input type="text" class="form-control" placeholder="Account">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Created</label>
|
||||
<input type="text" class="form-control" placeholder="Created">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Phone</label>
|
||||
<input type="text" class="form-control" placeholder="Phone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email</label>
|
||||
<input type="text" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Assigned User</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter_col col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Title</label>
|
||||
<label for="exampleInputEmail1">Teams</label>
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br clear="all">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- filter_row ends here -->
|
||||
<div class="table_container_row row marl">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-content for-pagination">
|
||||
{% include 'planner/tasks_list.html' %}
|
||||
</div>
|
||||
|
||||
<!-- CREATE TASK MODEL -->
|
||||
<form id="model-form" method="post">
|
||||
<div class="modal fade" id="task-create-model" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="create-task-dialog-title" class="modal-title">Create New Task</h4>
|
||||
</div>
|
||||
<div id="modelbody" class="modal-body">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group inline-group" data-name="name">
|
||||
<label class="control-label" data-name="name" style="display: inline">
|
||||
Name *
|
||||
</label>
|
||||
<div class="field" data-name="name">
|
||||
<input type="hidden" name="event_type" value="Task"/>
|
||||
<input id="name" class="main-element form-control" type="text"
|
||||
autocomplete="off"
|
||||
name="name" required/>
|
||||
</div>
|
||||
<i id="name_error"></i>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="parent">
|
||||
<div class="field" data-name="parent">
|
||||
<label for="parent">Parent </label>
|
||||
<div class="form-group" data-name="parent">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<select class="form-control" id="parent_type" name="parent_type" style="width:150px">
|
||||
<option value="Account">Account</option>
|
||||
<option value="Contact">Contact</option>
|
||||
<option value="Lead">Lead</option>
|
||||
<option value="Opportunity">Opportunity</option>
|
||||
<option value="Case">Case</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" placeholder="Select" autocomplete="off"
|
||||
value="" name="parent_name"
|
||||
class=" parent_name main-element form-control">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default" id="selectparent"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
<button tabindex="-1" type="button" class="btn btn-default" id="clearparent"><i
|
||||
class="glyphicon glyphicon-remove"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<i id="parent_error"></i>
|
||||
<input type="hidden" value="" id="parent_id" name="parent_id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="status">
|
||||
<label class="control-label" data-name="status"> Status</label>
|
||||
<div class="field" data-name="status">
|
||||
<select class="form-control main-element" id="status"
|
||||
name="status">
|
||||
<option selected="" value="Planned">Planned</option>
|
||||
<option value="Held">Held</option>
|
||||
<option value="Not Held">Not Held</option>
|
||||
</select>
|
||||
<i id="status_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="priority">
|
||||
<label class="control-label" data-name="priority"> Priority </label>
|
||||
<div class="field" data-name="duration">
|
||||
<select class="form-control main-element" id="priority"
|
||||
name="priority">
|
||||
<option value="Low">Low</option>
|
||||
<option value="Normal">Normal</option>
|
||||
<option value="High">High</option>
|
||||
<option value="Urgent">Urgent</option>
|
||||
</select>
|
||||
<i id="priority_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group" data-name="dateStart">
|
||||
<label class="control-label" data-name="dateEnd"> Date Start
|
||||
* </label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date startdatepicker'>
|
||||
<input type='text' name="start_date" class="form-control"
|
||||
id="start_date"
|
||||
placeholder="MM/DD/YYYY HH:MM:SS" required/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="start_date_error"></i><br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group" data-name="dateEnd">
|
||||
<label class="control-label" data-name="dateEnd"> Date End *</label>
|
||||
<div class="form-group">
|
||||
<div class='input-group date enddatepicker'>
|
||||
<input type='text' id="close_date" name="close_date"
|
||||
class="form-control"
|
||||
placeholder="MM/DD/YYYY HH:MM:SS" required/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<i id="close_date_error"></i><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-6 form-group">
|
||||
<div class="field" data-name="assigned_user">
|
||||
<label for="assigned_user">Assigned User </label>
|
||||
<div class="form-group" data-name="assigned_user">
|
||||
<div class="input-group">
|
||||
<input placeholder="Select" autocomplete="off"
|
||||
id="assigned_username" value="" name="username"
|
||||
class="main-element form-control input-sm"
|
||||
type="text">
|
||||
<span class="input-group-btn">
|
||||
<button title="Select" tabindex="-1" type="button" class="btn btn-default input-sm" id="assign-user"><i
|
||||
class="glyphicon glyphicon-arrow-up"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected-assigned-users"></div>
|
||||
<i id="assigned_user_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell col-sm-6 form-group">
|
||||
<div class="field" data-name="teams">
|
||||
<label for="teams">Teams</label>
|
||||
<select class="form-control input-sm" id="teams" name="teams">
|
||||
<option></option>
|
||||
<option value="Sales Department">Sales Department</option>
|
||||
<option value="Support">Support</option>
|
||||
<option value="Top Management">Top Management</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell col-sm-12 form-group" data-name="description">
|
||||
<label class="control-label" data-name="description">
|
||||
Description </label>
|
||||
<div class="field" data-name="description">
|
||||
<textarea id="description" class="main-element form-control" rows="4" name="description"
|
||||
required></textarea>
|
||||
<i id="description_error"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="modeldialogclosed" class="btn btn-default">Close
|
||||
</button>
|
||||
<button type="submit" id="gocreatetask" class="btn btn-success">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<!--END CREATE TASK MODEL-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--START SUCCESS TASK MODEL-->
|
||||
<div class="modal fade" id="task-success-model" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 id="success-task-dialog-title" class="modal-title">Success!!!</h4>
|
||||
</div>
|
||||
<div id="task-created-alert" class="alert alert-success">
|
||||
<strong class="center-block">Task Created Successfully</strong>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="successmodeldialogclosed" class="btn btn-default" type="button"> Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SUCCESS TASK MODEL-->
|
||||
<!--SELECT PARENT MODEL-->
|
||||
<div class="modal fade model-sm" id="selectparentmodel" role="dialog" data-keyboard="false"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Select Contact</h4>
|
||||
</div>
|
||||
<div class="model-body" id="selectcontact-modal-body">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="closeselectparentmodel" class="btn btn-default" data-dismiss="modal">Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SELECT PARENT MODEL-->
|
||||
{% include 'planner/dialog_models.html' %}
|
||||
<script src="{% static 'js/tasks.js' %}"></script>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
65
planner/templates/tasks_list.html
Normal file
65
planner/templates/tasks_list.html
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{% load staticfiles %}
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Name</th>
|
||||
<th width="15%">Status</th>
|
||||
<th width="15%">Priority</th>
|
||||
<th width="20%">Date Due</th>
|
||||
<!--<th width="20%">Assigned User</th>-->
|
||||
<!--<th width="8%">Created At</th>-->
|
||||
<th width="8%">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="taskslist">
|
||||
{% for task in tasks %}
|
||||
<tr id="task{{ task.id }}">
|
||||
<td><a id="task{{ task.id }}name" href="#">{{ task.name }}</a></td>
|
||||
<td><a id="task{{ task.id }}status" href="#">{{ task.status }}</a></td>
|
||||
<td id="task{{ task.id }}priority">{{ task.priority }}</td>
|
||||
<td id="task{{ task.id }}start_date">{{ task.start_date }}</td>
|
||||
<!--<td><a href="#">{{ task.assigned_user }}</a></a>-->
|
||||
<!--<td><a href="#">{{ task.created_at }}</a></a>-->
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
Action
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="viewthis" href="#">View</a></li>
|
||||
<li><a class="editthis" href="#">Edit</a></li>
|
||||
<li><a class="removethis" href="#">Remove</a></li>
|
||||
{# <li><a href="#">Complete</a></li>#}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
{% if tasks|length == 0 %}
|
||||
<div class="heading text-center"> No Tasks found</div>
|
||||
{% endif %}
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if tasks.has_previous %}
|
||||
<a class="paginate-me" href="?page={{ tasks.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in tasks.paginator.page_range %}
|
||||
<li class="{% if tasks.number == page %}active{% endif %}"><a class="paginate-me"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if tasks.has_next %}
|
||||
<a class="paginate-me" href="?page={{ tasks.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
64
planner/templates/users.html
Normal file
64
planner/templates/users.html
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{% load staticfiles %}
|
||||
<table class="table for-pagination-users">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="cell">
|
||||
</td>
|
||||
<th width="50%">
|
||||
<a href='#'>
|
||||
Name
|
||||
</a>
|
||||
<span class="caret"></span>
|
||||
</th>
|
||||
<th>
|
||||
<a href="#">
|
||||
Email
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% ifequal users|length 0 %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
NO USERS FOUND!!
|
||||
</td>
|
||||
</tr>
|
||||
{% endifequal %}
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td class="cell">
|
||||
<input type="checkbox" class="checkuser" value="{{ user.id }}"/>
|
||||
</td>
|
||||
<td class="cell">
|
||||
<a class="cell username" id="{{ user.id }}">{{ user.username }}</a>
|
||||
</td>
|
||||
<td class="cell useremail">
|
||||
{{ user.email }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination_row text-center row marl">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
{% if users.has_previous %}
|
||||
<a class="paginate-me-users" href="?page={{ users.previous_page_number }}">Previous</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% for page in users.paginator.page_range %}
|
||||
<li class="{% if users.number == page %}active{% endif %}"><a class="paginate-me-users"
|
||||
href="?page={{ page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</li>
|
||||
<li>
|
||||
{% if users.has_next %}
|
||||
<a class="paginate-me-users" href="?page={{ users.next_page_number }}">Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{% static 'js/setstatus.js' %}"></script>
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
# paginator = Paginator(meetings, 5)
|
||||
# try:
|
||||
# meetings = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/meetings_list.html',
|
||||
# return render(request, 'meetings_list.html',
|
||||
# {'meetings': meetings})
|
||||
# except PageNotAnInteger:
|
||||
# meetings = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# meetings = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/meetings.html',
|
||||
# return render(request, 'meetings.html',
|
||||
# {'meetings': meetings, 'reminder_form_set': reminder_form_set})
|
||||
# else:
|
||||
# return HttpResponse('Invalid Method or Not Authanticated in load_meetings')
|
||||
|
|
@ -52,13 +52,13 @@
|
|||
# paginator = Paginator(tasks, 3)
|
||||
# try:
|
||||
# tasks = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/tasks_list.html',
|
||||
# return render(request, 'tasks_list.html',
|
||||
# {'tasks': tasks})
|
||||
# except PageNotAnInteger:
|
||||
# tasks = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# tasks = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/tasks.html', {'tasks': tasks})
|
||||
# return render(request, 'tasks.html', {'tasks': tasks})
|
||||
# else:
|
||||
# return HttpResponse('Invalid Method or Not Authanticated in load_tasks')
|
||||
|
||||
|
|
@ -78,13 +78,13 @@
|
|||
# paginator = Paginator(calls, 3)
|
||||
# try:
|
||||
# calls = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/calls_list.html',
|
||||
# return render(request, 'calls_list.html',
|
||||
# {'calls': calls})
|
||||
# except PageNotAnInteger:
|
||||
# calls = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# calls = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/calls.html', {'calls': calls, 'reminder_form_set': reminder_form_set})
|
||||
# return render(request, 'calls.html', {'calls': calls, 'reminder_form_set': reminder_form_set})
|
||||
# else:
|
||||
# return HttpResponse('Invalid Method or Not Authanticated in load_calls')
|
||||
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
# meeting = Event.objects.get(id=int(request.POST.get('meetingID')), created_user=request.user)
|
||||
# ReminderFormSet = modelformset_factory(Reminder, ReminderForm, can_delete=True, extra=0)
|
||||
# reminder_form_set = ReminderFormSet(queryset=meeting.reminders.all())
|
||||
# remindersHtML = render(request, 'planner/reminder.html', {'reminder_form_set': reminder_form_set})
|
||||
# remindersHtML = render(request, 'reminder.html', {'reminder_form_set': reminder_form_set})
|
||||
# data = {}
|
||||
# if meeting.parent:
|
||||
# data['parent_type'] = meeting.parent.__class__.__name__
|
||||
|
|
@ -517,35 +517,35 @@
|
|||
# if request.GET.get('event_type') == 'Meeting':
|
||||
# try:
|
||||
# event = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/meetings_list.html',
|
||||
# return render(request, 'meetings_list.html',
|
||||
# {'meetings': event})
|
||||
# except PageNotAnInteger:
|
||||
# event = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# event = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/meetings_list.html',
|
||||
# return render(request, 'meetings_list.html',
|
||||
# {'meetings': event})
|
||||
# elif request.GET.get('event_type') == 'Call':
|
||||
# try:
|
||||
# event = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/calls_list.html',
|
||||
# return render(request, 'calls_list.html',
|
||||
# {'calls': event})
|
||||
# except PageNotAnInteger:
|
||||
# event = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# event = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/calls_list.html',
|
||||
# return render(request, 'calls_list.html',
|
||||
# {'calls': event})
|
||||
# elif request.GET.get('event_type') == 'Task':
|
||||
# try:
|
||||
# event = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/tasks_list.html',
|
||||
# return render(request, 'tasks_list.html',
|
||||
# {'tasks': event})
|
||||
# except PageNotAnInteger:
|
||||
# event = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# event = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/tasks_list.html',
|
||||
# return render(request, 'tasks_list.html',
|
||||
# {'tasks': event})
|
||||
# except models.Event.DoesNotExist:
|
||||
# return JsonResponse({'Event': 'DoesNotExist'})
|
||||
|
|
@ -563,7 +563,7 @@
|
|||
# 'form-MAX_NUM_FORMS': '10',
|
||||
# }
|
||||
# reminder_form_set = RemindersFormSet(data)
|
||||
# return render(request, 'planner/reminder.html', {'reminder_form_set': reminder_form_set})
|
||||
# return render(request, 'reminder.html', {'reminder_form_set': reminder_form_set})
|
||||
# else:
|
||||
# return JsonResponse({'METHOD': 'INVALID'})
|
||||
|
||||
|
|
@ -661,13 +661,13 @@
|
|||
# paginator = Paginator(users, 5)
|
||||
# try:
|
||||
# users = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/users.html',
|
||||
# return render(request, 'users.html',
|
||||
# {'users': users})
|
||||
# except PageNotAnInteger:
|
||||
# users = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# users = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/users.html', {'users': users})
|
||||
# return render(request, 'users.html', {'users': users})
|
||||
# else:
|
||||
# return JsonResponse({'METHOD': 'INVALID'})
|
||||
|
||||
|
|
@ -678,13 +678,13 @@
|
|||
# paginator = Paginator(contacts, 5)
|
||||
# try:
|
||||
# contacts = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/contacts.html',
|
||||
# return render(request, 'contacts.html',
|
||||
# {'contacts': contacts})
|
||||
# except PageNotAnInteger:
|
||||
# contacts = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# contacts = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/contacts.html', {'contacts': contacts})
|
||||
# return render(request, 'contacts.html', {'contacts': contacts})
|
||||
# else:
|
||||
# return JsonResponse({'METHOD': 'INVALID'})
|
||||
|
||||
|
|
@ -695,12 +695,12 @@
|
|||
# paginator = Paginator(leads, 5)
|
||||
# try:
|
||||
# leads = paginator.page(request.GET.get('page'))
|
||||
# return render(request, 'planner/leads.html',
|
||||
# return render(request, 'leads.html',
|
||||
# {'leads': leads})
|
||||
# except PageNotAnInteger:
|
||||
# leads = paginator.page(1)
|
||||
# except EmptyPage:
|
||||
# leads = paginator.page(paginator.num_pages)
|
||||
# return render(request, 'planner/leads.html', {'leads': leads})
|
||||
# return render(request, 'leads.html', {'leads': leads})
|
||||
# else:
|
||||
# return JsonResponse({'METHOD': 'INVALID'})
|
||||
|
|
|
|||
|
|
@ -385,20 +385,21 @@ $color_2: #000;
|
|||
.card-title{
|
||||
background: #e5e5e5;
|
||||
padding:6px 10px;
|
||||
font-size: 13px;
|
||||
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.form-group{
|
||||
margin-bottom: 10px;
|
||||
label{
|
||||
color: $text_color;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
text-transform: none;
|
||||
}
|
||||
.form-control{
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -415,9 +416,10 @@ $color_2: #000;
|
|||
.card-title{
|
||||
padding:5px 10px;
|
||||
background: #e5e5e5;
|
||||
padding:6px 10px;
|
||||
font-size: 13px;
|
||||
padding:6px 10px;
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
font-weight: 600;
|
||||
.dropdown{
|
||||
display: inline-block;
|
||||
.dropdown-toggle{
|
||||
|
|
@ -453,9 +455,9 @@ $color_2: #000;
|
|||
th{
|
||||
background: #5b646d;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
/* text-transform: uppercase; */
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
border: none;
|
||||
padding:6px;
|
||||
}
|
||||
|
|
@ -466,9 +468,12 @@ $color_2: #000;
|
|||
td{
|
||||
vertical-align: middle;
|
||||
color: #454545;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
padding:7px 0;
|
||||
@media(min-width: $large){
|
||||
font-size:1rem;
|
||||
}
|
||||
a{
|
||||
color: #454545;
|
||||
}
|
||||
|
|
@ -484,12 +489,13 @@ $color_2: #000;
|
|||
&.actions{
|
||||
.btn{
|
||||
border-radius: 0;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
padding:3px 5px;
|
||||
color: #fff;
|
||||
svg{
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -599,7 +605,7 @@ $color_2: #000;
|
|||
.form-control{
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
margin-top:0;
|
||||
.country_class{
|
||||
|
|
@ -639,7 +645,8 @@ $color_2: #000;
|
|||
margin-bottom: 20px;
|
||||
button{
|
||||
border-radius: 0;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
&.save{
|
||||
background: $dark_sky;
|
||||
color: #fff;
|
||||
|
|
@ -680,19 +687,19 @@ $color_2: #000;
|
|||
.view-pad{
|
||||
padding:0px !important;
|
||||
h5{
|
||||
width: 79%;
|
||||
width: 90%;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
font-size: 13px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
padding-top: 0px;
|
||||
}
|
||||
a{
|
||||
float: right;
|
||||
margin-right: 95px;
|
||||
border-radius: 0;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
padding: 3px 10px;
|
||||
color: #fff;
|
||||
margin-top: -4px;
|
||||
|
|
@ -702,3 +709,13 @@ padding:0px !important;
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
.select2-container{
|
||||
width: 100% !important;
|
||||
border-radius: 0;
|
||||
border: 1px solid #ced4da;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple{
|
||||
border-radius: 0 important;
|
||||
border: none !important;
|
||||
}
|
||||
|
|
@ -36,7 +36,8 @@ $mob_min:240px;
|
|||
margin-top: 23px;
|
||||
button{
|
||||
border-radius: 0;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
&.save{
|
||||
background: $dark_sky;
|
||||
color: #fff;
|
||||
|
|
@ -47,7 +48,7 @@ $mob_min:240px;
|
|||
border:1px solid $dark_sky;
|
||||
border-radius: 0;
|
||||
color: $dark_sky;
|
||||
font-size: 12px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
&.form_btn_row{
|
||||
display: block;
|
||||
|
|
@ -58,7 +59,7 @@ $mob_min:240px;
|
|||
}
|
||||
select{
|
||||
&.form-control{
|
||||
height: 32px !important;
|
||||
height: 32px ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue