Model changes (#13)
* updated changes for heroku * updated changes for heroku * updated changes for heroku * updated changes for heroku * updated settings file * update changes for opportunities * update rst file
This commit is contained in:
parent
aeb5f6af35
commit
bf61041e85
43 changed files with 233 additions and 95 deletions
1
Procfile
Normal file
1
Procfile
Normal file
|
|
@ -0,0 +1 @@
|
|||
web: sh -c 'gunicorn crm.wsgi && pip install -r requirements.txt'
|
||||
|
|
@ -42,8 +42,16 @@ If you cloned the package from git use virtualenv to install requirements::
|
|||
|
||||
Visit our Django web development page [Here](https://micropyramid.com/django-ecommerce-development/)
|
||||
|
||||
`Demo`_ Available Here.
|
||||
|
||||
Credentials to CRM Dashboard:
|
||||
|
||||
* **Email:** admin@micropyramid.com
|
||||
* **Password:** admin
|
||||
|
||||
|
||||
We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? `Contact us here`_
|
||||
|
||||
.. _contact us here: https://micropyramid.com/contact-us/
|
||||
.. _Demo: https://test-django-crm-app.herokuapp.com
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from django.contrib.auth.decorators import login_required
|
|||
from accounts.models import Account
|
||||
from common.models import User, Address, Team, Comment
|
||||
from common.utils import INDCHOICES, TYPECHOICES, COUNTRIES, CURRENCY_CODES, CASE_TYPE, PRIORITY_CHOICE, STATUS_CHOICE
|
||||
from oppurtunity.models import Opportunity, STAGES, SOURCES
|
||||
from opportunity.models import Opportunity, STAGES, SOURCES
|
||||
from contacts.models import Contact
|
||||
from cases.models import Case
|
||||
from accounts.forms import AccountForm, AccountCommentForm
|
||||
|
|
|
|||
10
app.json
Normal file
10
app.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "Django-CRM",
|
||||
"description": "Customer Relationship Management Dashboard",
|
||||
"repository": "https://github.com/MicroPyramid/Django-CRM.git",
|
||||
"addons": ["heroku-postgresql:hobby-dev"],
|
||||
"scripts": {
|
||||
"postdeploy": "python manage.py makemigrations && python manage.py migrate && echo \"from common.models import User; User.objects.create_superuser('Admin001', 'admin001')\" | python manage.py shell"
|
||||
},
|
||||
"env": {}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ class Migration(migrations.Migration):
|
|||
|
||||
dependencies = [
|
||||
('auth', '0008_alter_user_username_max_length'),
|
||||
('oppurtunity', '0001_initial'),
|
||||
('opportunity', '0001_initial'),
|
||||
('contacts', '0001_initial'),
|
||||
('common', '0001_initial'),
|
||||
('leads', '0001_initial'),
|
||||
|
|
@ -32,7 +32,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='comment',
|
||||
name='opportunity',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='opportunity_comments', to='oppurtunity.Opportunity'),
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='opportunity_comments', to='opportunity.Opportunity'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Comment(models.Model):
|
|||
'accounts.Account', blank=True, null=True, related_name="accounts_comments", on_delete=models.CASCADE)
|
||||
lead = models.ForeignKey('leads.Lead', blank=True, null=True, related_name="leads", on_delete=models.CASCADE)
|
||||
opportunity = models.ForeignKey(
|
||||
'oppurtunity.Opportunity', blank=True, null=True, related_name="opportunity_comments", on_delete=models.CASCADE)
|
||||
'opportunity.Opportunity', blank=True, null=True, related_name="opportunity_comments", on_delete=models.CASCADE)
|
||||
contact = models.ForeignKey(
|
||||
'contacts.Contact', blank=True, null=True, related_name="contact_comments", on_delete=models.CASCADE)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import dj_database_url
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
|
@ -12,7 +13,7 @@ SECRET_KEY = 'mwx@&97%!$fx_*zgj(2ygi^(s=oh5j(cqb$=+-mkd9scbt!0v0'
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
|
@ -34,7 +35,7 @@ INSTALLED_APPS = [
|
|||
'contacts',
|
||||
'emails',
|
||||
'leads',
|
||||
'oppurtunity',
|
||||
'opportunity',
|
||||
'planner',
|
||||
'simple_pagination'
|
||||
]
|
||||
|
|
@ -71,13 +72,26 @@ WSGI_APPLICATION = 'crm.wsgi.application'
|
|||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
if 'DATABASE_URL' in os.environ:
|
||||
DATABASES = {
|
||||
'default': dj_database_url.config(
|
||||
default='sqlite:////{0}'.format(
|
||||
os.path.join(BASE_DIR, 'db.sqlite3'))
|
||||
)
|
||||
}
|
||||
}
|
||||
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
|
||||
|
||||
STATIC_ROOT = (os.path.join(BASE_DIR, "static"))
|
||||
else:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"), ]
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
|
||||
|
|
@ -115,8 +129,6 @@ USE_TZ = True
|
|||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"), ]
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
|
||||
EMAIL_HOST = 'localhost'
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ urlpatterns = [
|
|||
url(r'^accounts/', include('accounts.urls', namespace='accounts')),
|
||||
url(r'^leads/', include('leads.urls', namespace='leads')),
|
||||
url(r'^contacts/', include('contacts.urls', namespace='contacts')),
|
||||
url(r'^oppurtunities/', include('oppurtunity.urls', namespace='oppurtunities')),
|
||||
url(r'^opportunities/', include('opportunity.urls', namespace='opportunities')),
|
||||
url(r'^cases/', include('cases.urls', namespace='cases')),
|
||||
# url(r'^emails/', include('emails.urls', namespace='emails')),
|
||||
# url(r'^planner/', include('planner.urls', namespace='planner')),
|
||||
|
|
|
|||
19
crm/wsgi.py
19
crm/wsgi.py
|
|
@ -1,17 +1,14 @@
|
|||
"""
|
||||
WSGI config for crm project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
import sys
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
from whitenoise.django import DjangoWhiteNoise
|
||||
|
||||
|
||||
PROJECT_DIR = os.path.abspath(__file__)
|
||||
sys.path.append(PROJECT_DIR)
|
||||
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "crm.settings")
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
||||
application = DjangoWhiteNoise(application)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ This project contains the following modules.
|
|||
* Accounts
|
||||
* Cases
|
||||
* Leads
|
||||
* Oppurtunity
|
||||
* Opportunity
|
||||
* Planner
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ def leads_convert(request, pk):
|
|||
opportunity_form = OpportunityForm(request.POST)
|
||||
if opportunity_form.is_valid():
|
||||
opportunity_form.save()
|
||||
return HttpResponseRedirect(reverse('oppurtunities:list'))
|
||||
return HttpResponseRedirect(reverse('opportunities:list'))
|
||||
else:
|
||||
return render(request, 'leads/checkbox.html', {
|
||||
'post': lead_obj, 'accounts': accounts, 'sources': LEAD_SOURCE,
|
||||
|
|
@ -271,7 +271,7 @@ def add_comment(request):
|
|||
data = {
|
||||
"comment_id": lead_comment.id, "comment": lead_comment.comment,
|
||||
"commented_on": lead_comment.commented_on,
|
||||
"commented_by": lead_comment.commented_by.user.email
|
||||
"commented_by": lead_comment.commented_by.email
|
||||
}
|
||||
return JsonResponse(data)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from django.contrib import admin
|
||||
from oppurtunity.models import Opportunity
|
||||
from opportunity.models import Opportunity
|
||||
|
||||
admin.site.register(Opportunity)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from django import forms
|
||||
from oppurtunity.models import Opportunity
|
||||
from opportunity.models import Opportunity
|
||||
from common.models import Comment
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from django.conf.urls import url
|
||||
from oppurtunity import views
|
||||
from opportunity import views
|
||||
|
||||
app_name = 'oppurtunity'
|
||||
|
||||
|
|
@ -10,8 +10,8 @@ from common.models import User, Comment, Team
|
|||
from common.utils import STAGES, SOURCES, CURRENCY_CODES
|
||||
from accounts.models import Account
|
||||
from contacts.models import Contact
|
||||
from oppurtunity.models import Opportunity
|
||||
from oppurtunity.forms import OpportunityForm, OpportunityCommentForm
|
||||
from opportunity.models import Opportunity
|
||||
from opportunity.forms import OpportunityForm, OpportunityCommentForm
|
||||
|
||||
# CRUD Operations Start
|
||||
|
||||
|
|
@ -37,7 +37,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, "oppurtunity/opportunity.html", {
|
||||
return render(request, "opportunity/opportunity.html", {
|
||||
'opportunity_list': opportunity_list,
|
||||
'accounts': accounts,
|
||||
'contacts': contacts,
|
||||
|
|
@ -71,13 +71,13 @@ def opp_create(request):
|
|||
if request.is_ajax():
|
||||
return JsonResponse({'error': False})
|
||||
if request.POST.get("savenewform"):
|
||||
return HttpResponseRedirect(reverse("oppurtunities:save"))
|
||||
return HttpResponseRedirect(reverse("opportunities:save"))
|
||||
else:
|
||||
return HttpResponseRedirect(reverse('oppurtunities:list'))
|
||||
return HttpResponseRedirect(reverse('opportunities:list'))
|
||||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'opportunity_errors': form.errors})
|
||||
return render(request, 'oppurtunity/create_opportunity.html', {
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -90,7 +90,7 @@ def opp_create(request):
|
|||
'contacts_list': contacts_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'oppurtunity/create_opportunity.html', {
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'accounts': accounts,
|
||||
'users': users,
|
||||
|
|
@ -109,7 +109,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, 'oppurtunity/view_opportunity.html', {
|
||||
return render(request, 'opportunity/view_opportunity.html', {
|
||||
'opportunity_record': opportunity_record,
|
||||
'comments': comments
|
||||
})
|
||||
|
|
@ -146,11 +146,11 @@ def opp_edit(request, pk):
|
|||
opportunity_obj.contacts.add(*request.POST.getlist("contacts"))
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': False})
|
||||
return HttpResponseRedirect(reverse('oppurtunities:list'))
|
||||
return HttpResponseRedirect(reverse('opportunities:list'))
|
||||
else:
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': True, 'opportunity_errors': form.errors})
|
||||
return render(request, 'oppurtunity/create_opportunity.html', {
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'opportunity_obj': opportunity_obj,
|
||||
'accounts': accounts,
|
||||
|
|
@ -164,7 +164,7 @@ def opp_edit(request, pk):
|
|||
'contacts_list': contacts_list
|
||||
})
|
||||
else:
|
||||
return render(request, 'oppurtunity/create_opportunity.html', {
|
||||
return render(request, 'opportunity/create_opportunity.html', {
|
||||
'opportunity_form': form,
|
||||
'opportunity_obj': opportunity_obj,
|
||||
'accounts': accounts,
|
||||
|
|
@ -185,7 +185,7 @@ def opp_remove(request, pk):
|
|||
opportunity_record.delete()
|
||||
if request.is_ajax():
|
||||
return JsonResponse({'error': False})
|
||||
return HttpResponseRedirect(reverse('oppurtunities:list'))
|
||||
return HttpResponseRedirect(reverse('opportunities:list'))
|
||||
|
||||
|
||||
def contacts(request):
|
||||
|
|
@ -273,6 +273,6 @@ def remove_comment(request):
|
|||
def get_opportunity(request):
|
||||
if request.method == 'GET':
|
||||
opportunities = Opportunity.objects.all()
|
||||
return render(request, 'oppurtunity/opportunities_list.html', {'opportunities': opportunities})
|
||||
return render(request, 'opportunity/opportunities_list.html', {'opportunities': opportunities})
|
||||
else:
|
||||
return HttpResponse('Invalid Method or Not Authanticated in load_calls')
|
||||
|
|
@ -23,7 +23,7 @@ class Reminder(models.Model):
|
|||
class Event(models.Model):
|
||||
limit = models.Q(app_label='account', model='Account', id=10) | \
|
||||
models.Q(app_label='leads', model='Lead', id=13) | \
|
||||
models.Q(app_label='oppurtunity', model='Opportunity', id=14) | \
|
||||
models.Q(app_label='opportunity', model='Opportunity', id=14) | \
|
||||
models.Q(app_label='cases', model='Case', id=11)
|
||||
name = models.CharField(
|
||||
pgettext_lazy("Name of the Event", "Event"),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# from django.contrib.auth.models import User
|
||||
# from accounts.models import Account
|
||||
# from cases.models import Case
|
||||
# from oppurtunity.models import Opportunity
|
||||
# from opportunity.models import Opportunity
|
||||
# from contacts.models import Contact
|
||||
# from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
# from django.db.models import Q
|
||||
|
|
|
|||
|
|
@ -2,3 +2,6 @@ Django==1.11.5
|
|||
django-simple-pagination==1.1.8
|
||||
pytz==2017.2
|
||||
psycopg2==2.7.3.1
|
||||
gunicorn==19.6.0
|
||||
whitenoise==3.1
|
||||
dj-database-url==0.4.1
|
||||
|
|
@ -42,6 +42,7 @@ $("#comment_form").submit(function (e) {
|
|||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html('')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -73,7 +74,7 @@ $("#comment_edit").click(function (e) {
|
|||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Accounts_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").hide()
|
||||
$("#CommentEditError").html('')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ $("#comment_form").submit(function (e) {
|
|||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html('')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -72,7 +73,7 @@ $("#comment_edit").click(function (e) {
|
|||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Cases_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").hide()
|
||||
$("#CommentEditError").html('')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ $('body').on('click', '#selectparent', function (e) {
|
|||
gURL = '/leads/get/list/'
|
||||
}
|
||||
else if ($('#parent_type').val() == 'Opportunity') {
|
||||
gURL = '/oppurtunities/get/list/'
|
||||
gURL = '/opportunities/get/list/'
|
||||
}
|
||||
else if ($('#parent_type').val() == 'Case') {
|
||||
gURL = '/cases/get/list/'
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ $("#comment_form").submit(function (e) {
|
|||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -72,7 +73,7 @@ $("#comment_edit").click(function (e) {
|
|||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Contacts_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").hide()
|
||||
$("#CommentEditError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function getCookie(name) {
|
|||
$('#id_account').change(function(){
|
||||
var csrftoken = getCookie('csrftoken');
|
||||
var Account= $("#id_account").val()
|
||||
$.get("/oppurtunities/contacts/", {"Account":Account, "csrfmiddlewaretoken": csrftoken}, function(data){
|
||||
$.get("/opportunities/contacts/", {"Account":Account, "csrfmiddlewaretoken": csrftoken}, function(data){
|
||||
$("#id_contacts").html("")
|
||||
$.each(data, function (index, value) {
|
||||
$("#id_contacts").append("<option value="+index+">"+value+"</option>")
|
||||
|
|
@ -28,7 +28,7 @@ $("#comment_form").submit(function(e){
|
|||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url : "/oppurtunities/comment_add/",
|
||||
url : "/opportunities/comment_add/",
|
||||
type : "POST",
|
||||
data : formData,
|
||||
cache: false,
|
||||
|
|
@ -70,7 +70,7 @@ $("#comment_edit").click(function(e){
|
|||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url : "/oppurtunities/comment_edit/",
|
||||
url : "/opportunities/comment_edit/",
|
||||
type : "POST",
|
||||
data : formData,
|
||||
cache: false,
|
||||
|
|
@ -92,7 +92,7 @@ function remove_comment(x){
|
|||
var csrftoken = getCookie('csrftoken');
|
||||
var warn = confirm("Are You Sure, you Want to Delete this Comment!?")
|
||||
if (warn == true){
|
||||
$.post('/oppurtunities/comment_remove/', {"comment_id":x, "csrfmiddlewaretoken": csrftoken, }, function(data){
|
||||
$.post('/opportunities/comment_remove/', {"comment_id":x, "csrfmiddlewaretoken": csrftoken, }, function(data){
|
||||
if(data.error){
|
||||
alert(data.error)
|
||||
} else {
|
||||
|
|
@ -107,7 +107,7 @@ function editFun(x) {
|
|||
alert("Heloooooooooooooo")
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/oppurtunities/editdetails/",
|
||||
url: "/opportunities/editdetails/",
|
||||
data: {
|
||||
csrfmiddlewaretoken: csrftoken,
|
||||
tid: x
|
||||
|
|
@ -137,7 +137,7 @@ function editFun(x) {
|
|||
$('#id_account').change(function() {
|
||||
var Account = $("#id_account").val()
|
||||
var csrftoken = getCookie('csrftoken');
|
||||
$.get("/oppurtunities/contacts/", {
|
||||
$.get("/opportunities/contacts/", {
|
||||
"Account": Account,
|
||||
"csrfmiddlewaretoken": csrftoken
|
||||
}, function(data) {
|
||||
|
|
@ -149,4 +149,4 @@ function editFun(x) {
|
|||
})
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ $("#comment_form").submit(function (e) {
|
|||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url: "/oppurtunities/comment/add/",
|
||||
url: "/opportunities/comment/add/",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
|
|
@ -42,6 +42,7 @@ $("#comment_form").submit(function (e) {
|
|||
)
|
||||
$("#id_comments").val("")
|
||||
alert("Comment Submitted")
|
||||
$("#CommentError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -59,7 +60,7 @@ $("#comment_edit").click(function (e) {
|
|||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_edit_form")[0]);
|
||||
$.ajax({
|
||||
url: "/oppurtunities/comment/edit/",
|
||||
url: "/opportunities/comment/edit/",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
|
|
@ -72,7 +73,7 @@ $("#comment_edit").click(function (e) {
|
|||
$("#comment_name" + data.commentid).html('<pre>' + data.comment + '</pre>')
|
||||
$('#Comments_Opportunity_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").hide()
|
||||
$("#CommentEditError").val("")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -87,7 +88,7 @@ function remove_comment(x) {
|
|||
var csrftoken = getCookie('csrftoken');
|
||||
var con = confirm("Do you want to Delete it for Sure!?")
|
||||
if (con == true) {
|
||||
$.post('/oppurtunities/comment/remove/', {
|
||||
$.post('/opportunities/comment/remove/', {
|
||||
"comment_id": x,
|
||||
"csrfmiddlewaretoken": csrftoken,
|
||||
}, function (data) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ $('body').on('click', '#selectparent', function (e) {
|
|||
gURL = '/leads/get/list/'
|
||||
}
|
||||
else if ($('#parent_type').val() == 'Opportunity') {
|
||||
gURL = '/oppurtunities/get/list/'
|
||||
gURL = '/opportunities/get/list/'
|
||||
}
|
||||
else if ($('#parent_type').val() == 'Case') {
|
||||
gURL = '/cases/get/list/'
|
||||
|
|
@ -644,4 +644,4 @@ $('body').on('click', '#created-user-modal-body .paginate-me-users', function (e
|
|||
}
|
||||
});
|
||||
});
|
||||
//////////////////////////////////end created user/////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////end created user/////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
102
static/js/view_lead.js
Normal file
102
static/js/view_lead.js
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
function getCookie(name) {
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
|
||||
$("#comment_form").submit(function (e) {
|
||||
e.preventDefault()
|
||||
var formData = new FormData($("#comment_form")[0]);
|
||||
$.ajax({
|
||||
url: "/leads/comment/add/",
|
||||
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='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.comment_id + ")'>Edit</a></li>" +
|
||||
"<li><a class='action' onclick='remove_comment(" + data.comment_id + ")''>Remove</a></li></ul></div></div>" +
|
||||
"<div class='stream-head-container'> " + data.commented_by + " Commented</div>" +
|
||||
"<div class='stream-post-container' id='comment_name" + data.comment_id + "'><pre>" + data.comment + "</pre></div>" +
|
||||
"<div class='stream-date-container" + data.comment_id + "'>" + d.toGMTString() + "</div></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: "/leads/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_Leads_Modal').modal('hide');
|
||||
$("#id_editcomment").val("")
|
||||
$("#CommentEditError").html("")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function HideError(e) {
|
||||
$("#CommentError").hide()
|
||||
}
|
||||
|
||||
function remove_comment(x) {
|
||||
var csrftoken = getCookie('csrftoken');
|
||||
var con = confirm("Do you want to Delete it for Sure!?")
|
||||
if (con == true) {
|
||||
$.post('/leads/comment/remove/', {
|
||||
"comment_id": x,
|
||||
"csrfmiddlewaretoken": csrftoken,
|
||||
}, function (data) {
|
||||
if (data.error) {
|
||||
alert(data.error)
|
||||
} else {
|
||||
$("#comment" + data.cid).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
1
static/staticfiles.json
Normal file
1
static/staticfiles.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"paths": {"admin/js/vendor/xregexp/xregexp.min.js": "admin/js/vendor/xregexp/xregexp.min.c95393b8ca4d.js", "admin/js/vendor/xregexp/xregexp.js": "admin/js/vendor/xregexp/xregexp.1865b1cf5085.js", "admin/js/vendor/xregexp/LICENSE-XREGEXP.txt": "admin/js/vendor/xregexp/LICENSE-XREGEXP.d64cecf4f157.txt", "admin/js/vendor/jquery/jquery.min.js": "admin/js/vendor/jquery/jquery.min.33cabfa15c10.js", "admin/js/vendor/jquery/LICENSE-JQUERY.txt": "admin/js/vendor/jquery/LICENSE-JQUERY.a158210a2737.txt", "admin/js/vendor/jquery/jquery.js": "admin/js/vendor/jquery/jquery.aacc43d6f308.js", "admin/img/gis/move_vertex_off.svg": "admin/img/gis/move_vertex_off.7a23bf31ef8a.svg", "admin/img/gis/move_vertex_on.svg": "admin/img/gis/move_vertex_on.0047eba25b67.svg", "admin/js/admin/DateTimeShortcuts.js": "admin/js/admin/DateTimeShortcuts.1536fb6bea1d.js", "admin/js/admin/RelatedObjectLookups.js": "admin/js/admin/RelatedObjectLookups.d2bdb1018963.js", "admin/fonts/Roboto-Light-webfont.woff": "admin/fonts/Roboto-Light-webfont.b446c2399bb6.woff", "admin/fonts/LICENSE.txt": "admin/fonts/LICENSE.d273d63619c9.txt", "admin/fonts/Roboto-Regular-webfont.woff": "admin/fonts/Roboto-Regular-webfont.ec39515ae8c6.woff", "admin/fonts/Roboto-Bold-webfont.woff": "admin/fonts/Roboto-Bold-webfont.2ad99072841e.woff", "admin/fonts/README.txt": "admin/fonts/README.2c3d0bcdede2.txt", "admin/img/selector-icons.svg": "admin/img/selector-icons.b4555096cea2.svg", "admin/img/LICENSE": "admin/img/LICENSE.2c54f4e1ca1c", "admin/img/icon-yes.svg": "admin/img/icon-yes.d2f9f035226a.svg", "admin/img/icon-changelink.svg": "admin/img/icon-changelink.18d2fd706348.svg", "admin/img/icon-calendar.svg": "admin/img/icon-calendar.ac7aea671bea.svg", "admin/img/sorting-icons.svg": "admin/img/sorting-icons.3a097b59f104.svg", "admin/img/icon-deletelink.svg": "admin/img/icon-deletelink.564ef9dc3854.svg", "admin/img/tooltag-add.svg": "admin/img/tooltag-add.e59d620a9742.svg", "admin/img/icon-clock.svg": "admin/img/icon-clock.e1d4dfac3f2b.svg", "admin/img/icon-unknown-alt.svg": "admin/img/icon-unknown-alt.81536e128bb6.svg", "admin/img/calendar-icons.svg": "admin/img/calendar-icons.39b290681a8b.svg", "admin/img/search.svg": "admin/img/search.7cf54ff789c6.svg", "admin/img/icon-addlink.svg": "admin/img/icon-addlink.d519b3bab011.svg", "admin/img/icon-no.svg": "admin/img/icon-no.439e821418cd.svg", "admin/img/tooltag-arrowright.svg": "admin/img/tooltag-arrowright.bbfb788a849e.svg", "admin/img/inline-delete.svg": "admin/img/inline-delete.fec1b761f254.svg", "admin/img/README.txt": "admin/img/README.837277fa1908.txt", "admin/img/icon-unknown.svg": "admin/img/icon-unknown.a18cb4398978.svg", "admin/img/icon-alert.svg": "admin/img/icon-alert.034cc7d8a67f.svg", "admin/css/forms.css": "admin/css/forms.2003a066ae02.css", "admin/css/dashboard.css": "admin/css/dashboard.7ac78187c567.css", "admin/css/widgets.css": "admin/css/widgets.5e372b41c483.css", "admin/css/login.css": "admin/css/login.a846c0e2ef65.css", "admin/css/rtl.css": "admin/css/rtl.4c867197b256.css", "admin/css/fonts.css": "admin/css/fonts.494e4ec545c9.css", "admin/css/changelists.css": "admin/css/changelists.f6dc691f8d62.css", "admin/css/base.css": "admin/css/base.6b517d0d5813.css", "admin/js/inlines.min.js": "admin/js/inlines.min.d75b9ed03975.js", "admin/js/SelectBox.js": "admin/js/SelectBox.b49f008d186b.js", "admin/js/popup_response.js": "admin/js/popup_response.6ce3197f8fc8.js", "admin/js/actions.js": "admin/js/actions.32861b6cbdf9.js", "admin/js/timeparse.js": "admin/js/timeparse.51258861a46a.js", "admin/js/actions.min.js": "admin/js/actions.min.f51f04edab28.js", "admin/js/core.js": "admin/js/core.fd861d43f0f5.js", "admin/js/prepopulate.min.js": "admin/js/prepopulate.min.f4057ebb9b62.js", "admin/js/inlines.js": "admin/js/inlines.eda404ee376d.js", "admin/js/change_form.js": "admin/js/change_form.9e85003a1a38.js", "admin/js/SelectFilter2.js": "admin/js/SelectFilter2.17009b6d4428.js", "admin/js/jquery.init.js": "admin/js/jquery.init.95b62fa19378.js", "admin/js/prepopulate_init.js": "admin/js/prepopulate_init.0d3b53c37074.js", "admin/js/cancel.js": "admin/js/cancel.1d69cba4b4bf.js", "admin/js/urlify.js": "admin/js/urlify.411bc3bb651c.js", "admin/js/collapse.min.js": "admin/js/collapse.min.dc930adb2821.js", "admin/js/prepopulate.js": "admin/js/prepopulate.ff9208865444.js", "admin/js/collapse.js": "admin/js/collapse.17d715df2104.js", "admin/js/calendar.js": "admin/js/calendar.9ac94d055fbd.js"}, "version": "1.0"}
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
<td>
|
||||
<button type="button" class="conview btn-info" id="con_view" data-toggle="modal" data-dismiss="modal" data-target="#conViewModal_{{contact.id}}">VIEW</button>
|
||||
<button type="button" class="conedit btn-success" id="con_edit" data-toggle="modal" data-dismiss="modal" data-target="#conEditModal_{{contact.id}}">EDIT</button>
|
||||
<button type="button" class="con_remove btn-danger" id="{{ contact.id }}" data-href="{% url 'contacts:delete_contact' pk=contact.id %}">REMOVE</button>
|
||||
<button type="button" class="con_remove btn-danger" id="{{ contact.id }}" data-href="{% url 'contacts:remove_contact' pk=contact.id %}">REMOVE</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to">
|
||||
{%for each_user in users %}
|
||||
<option value="{{ each_user.id }}">{{ each_user.user }}</option>
|
||||
<option value="{{ each_user.id }}">{{each_user}}</option>
|
||||
{%endfor%}
|
||||
</select>
|
||||
{{ contact_form.assigned_to.errors }}
|
||||
|
|
@ -638,7 +638,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to" >
|
||||
{% for each_user in users %}
|
||||
<option value="{{ each_user.id }}" {% if each_user in contact.assigned_to.all %} selected {% endif %} >{{ each_user.user }}</option>
|
||||
<option value="{{ each_user.id }}" {% if each_user in contact.assigned_to.all %} selected {% endif %} >{{ each_user }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ contact_form.assigned_to.errors }}
|
||||
|
|
@ -803,7 +803,7 @@
|
|||
<td>
|
||||
<button type="button" class="oppview btn-info" id="opp_view" data-toggle="modal" data-dismiss="modal1_view" data-target="#oppViewModal_{{opportunity.id}}">VIEW</button>
|
||||
<button type="button" class="oppedit btn-success" id="opp_edit" data-toggle="modal" data-dismiss="modal1_edit" data-target="#oppEditModal_{{opportunity.id}}">EDIT</button>
|
||||
<button type="button" class="opp_remove btn-danger" id="{{ opportunity.id }}" data-href="{% url 'oppurtunities:opp_delete' pk=opportunity.id %}">REMOVE</button>
|
||||
<button type="button" class="opp_remove btn-danger" id="{{ opportunity.id }}" data-href="{% url 'opportunities:opp_remove' pk=opportunity.id %}">REMOVE</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
@ -838,7 +838,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to" >
|
||||
{% for each_user in users %}
|
||||
<option value="{{ each_user.id }}">{{ each_user.user }}</option>
|
||||
<option value="{{ each_user.id }}">{{ each_user }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ opportunity_form.assigned_to.errors }}
|
||||
|
|
@ -991,7 +991,7 @@
|
|||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background:lightblue;">
|
||||
<h5 class="modal-title" id="myLargeModalLabel" style="text-align:center;">OPPURTUNITY VIEW
|
||||
<h5 class="modal-title" id="myLargeModalLabel" style="text-align:center;">OPPORTUNITY VIEW
|
||||
</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
|
@ -1164,7 +1164,7 @@
|
|||
<div class="modal fade" id="oppEditModal_{{opportunity.id}}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<form class= "form_opp_edit" id="form_opp_edit" method="POST" action="{% url 'oppurtunities:opp_edit' pk=opportunity.id %}">
|
||||
<form class= "form_opp_edit" id="form_opp_edit" method="POST" action="{% url 'opportunities:opp_edit' pk=opportunity.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-header" style="background:lightblue;">
|
||||
<h4 class="modal-title" id="myLargeModalLabel" style="text-align:center;">OPPORTUNITIES</h4>
|
||||
|
|
@ -1182,7 +1182,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to" >
|
||||
{% for each_user in users %}
|
||||
<option value="{{ each_user.id }}" {% if each_user in opportunity.assigned_to.all %} selected {% endif %}>{{ each_user.user}}</option>
|
||||
<option value="{{ each_user.id }}" {% if each_user in opportunity.assigned_to.all %} selected {% endif %}>{{ each_user}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ opportunity_form.assigned_to.errors }}
|
||||
|
|
@ -1360,7 +1360,7 @@
|
|||
<td>
|
||||
<button type="button" class="caseview btn-info" id="case_view" data-toggle="modal" data-dismiss="modal" data-target="#caseViewModal_{{case.id}}">VIEW</button>
|
||||
<button type="button" class="caseedit btn-success" id="case_edit" data-toggle="modal" data-dismiss="modal" data-target="#caseEditModal_{{case.id}}">EDIT</button>
|
||||
<button type="button" class="case_remove btn-danger" id="{{ case.id }}" data-href="{% url 'cases:delete_case' case_id=case.id %}">REMOVE</button>
|
||||
<button type="button" class="case_remove btn-danger" id="{{ case.id }}" data-href="{% url 'cases:remove_case' case_id=case.id %}">REMOVE</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
@ -1395,7 +1395,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to">
|
||||
{%for each_user in users %}
|
||||
<option value="{{ each_user.id }}">{{ each_user.user }}</option>
|
||||
<option value="{{ each_user.id }}">{{ each_user }}</option>
|
||||
{%endfor%}
|
||||
</select>
|
||||
{{ case_form.assigned_to.errors }}
|
||||
|
|
@ -1704,7 +1704,7 @@
|
|||
<label for="exampleInputEmail1">Assigned Users</label>
|
||||
<select class="form-control" id="id_assignedto" multiple name="assigned_to">
|
||||
{% for each_user in users %}
|
||||
<option value="{{ each_user.id }}" {% if each_user in case.assigned_to.all %} selected {% endif %}>{{ each_user.user}}</option>
|
||||
<option value="{{ each_user.id }}" {% if each_user in case.assigned_to.all %} selected {% endif %}>{{ each_user }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -1844,7 +1844,7 @@
|
|||
$("#form_opp").submit(function(e) {
|
||||
e.preventDefault();
|
||||
$this = $(this)
|
||||
url = "{% url 'oppurtunities:save' %}"
|
||||
url = "{% url 'opportunities:save' %}"
|
||||
$.post(url, $this.serialize(), function(response){
|
||||
if(response.error){
|
||||
$(".error").remove();
|
||||
|
|
@ -1932,7 +1932,7 @@
|
|||
$("#form_case").submit(function(e) {
|
||||
e.preventDefault();
|
||||
$this = $(this)
|
||||
url = "{% url 'cases:case_add' %}"
|
||||
url = "{% url 'cases:add_case' %}"
|
||||
$.post(url, $this.serialize(), function(response){
|
||||
if(response.error){
|
||||
$(".error").remove();
|
||||
|
|
@ -2001,4 +2001,4 @@
|
|||
document.getElementById("form_case").reset();
|
||||
}
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
{% endblock js_block %}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@
|
|||
<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>
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit" type="submit">Submit</button>
|
||||
<button class="btn btn-default save" style="text-align: center;" id="comment_submit">Submit</button>
|
||||
</div>
|
||||
<input type="hidden" value="{{lead_record.id}}" name="leadid">
|
||||
</form>
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
<form id="comment_edit_form" method="POST" >{% csrf_token %}
|
||||
<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>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<li><a href="{% url 'accounts:list' %}">ACCOUNTS</a></li>
|
||||
<li><a href="{% url 'contacts:list' %}">CONTACTS</a></li>
|
||||
<li><a href="{% url 'leads:list' %}">LEADS</a></li>
|
||||
<li><a href="{% url 'oppurtunities:list' %}">OPPORTUNITY</a></li>
|
||||
<li><a href="{% url 'opportunities:list' %}">OPPORTUNITY</a></li>
|
||||
<li><a href="{% url 'cases:list' %}">CASES</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{% load staticfiles %}
|
||||
{% block breadcrumb %}
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'oppurtunities:list' %}">Opportunities</a></li>
|
||||
<li><a href="{% url 'opportunities:list' %}">Opportunities</a></li>
|
||||
<li class="active">Create</li>
|
||||
</ol>
|
||||
{% endblock %}
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
{% if not opportunity_obj %}
|
||||
<button class="btn btn-success save savenew" type="submit">Save & New</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'oppurtunities:list' %}" class="btn btn-default">Cancel</a>
|
||||
<a href="{% url 'opportunities:list' %}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -35,4 +35,4 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="create_new text-right">
|
||||
<a href="{% url 'oppurtunities:save' %}"><i class="fa fa-plus"></i> Add New Opportunity</a>
|
||||
<a href="{% url 'opportunities:save' %}"><i class="fa fa-plus"></i> Add New Opportunity</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<div class="filter_col text-center">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
<a href="{% url 'oppurtunities:list' %}" class="btn btn-default">Clear</a>
|
||||
<a href="{% url 'opportunities:list' %}" class="btn btn-default">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
{% for opportunity in opportunity_list %}
|
||||
<tr class="text-center">
|
||||
<td scope="row">{{ forloop.counter }}</td>
|
||||
<td><a href="{% url 'oppurtunities:opp_view' opportunity.id %}">{{ opportunity.name }}</a></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>
|
||||
|
|
@ -130,9 +130,9 @@
|
|||
<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>
|
||||
<a href="{% url 'oppurtunities:opp_view' opportunity.id %}" class="btn btn-info ">View</a>
|
||||
<a href="{% url 'oppurtunities:opp_edit' opportunity.id %}" class="btn btn-success ">Edit</a>
|
||||
<a href="{% url 'oppurtunities:opp_remove' opportunity.id %}" class="btn btn-danger delete">Delete</a>
|
||||
<a href="{% url 'opportunities:opp_view' opportunity.id %}" class="btn btn-info ">View</a>
|
||||
<a href="{% url 'opportunities:opp_edit' opportunity.id %}" class="btn btn-success ">Edit</a>
|
||||
<a href="{% url 'opportunities:opp_remove' opportunity.id %}" class="btn btn-danger delete">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
@ -169,4 +169,4 @@
|
|||
$('#opportunity_filter').submit();
|
||||
});
|
||||
</script>
|
||||
{% endblock js_block %}
|
||||
{% endblock js_block %}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
{% block breadcrumb1 %}
|
||||
<!-- Breadcrumb Starts Here -->
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'oppurtunities:list' %}">OPPORTUNITIES</a></li>
|
||||
<li><a href="{% url 'opportunities:list' %}">OPPORTUNITIES</a></li>
|
||||
<li class="active">VIEW</li>
|
||||
</ol>
|
||||
<!-- Breadcrumb Ends Here -->
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
<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="{% url 'oppurtunities:opp_edit' opportunity_record.id %}" >Edit</a></li>
|
||||
<li class="delete_contact"><a href="{% url 'oppurtunities:opp_remove' opportunity_record.id %}" id="remove_contact">REMOVE</a></li>
|
||||
<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_contact">REMOVE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
<form id="comment_edit_form" method="POST" >{% csrf_token %}
|
||||
<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>
|
||||
<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>
|
||||
Loading…
Reference in a new issue