mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
remove: service provider pages
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 1,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:title",
|
||||
"autoname": "",
|
||||
"beta": 0,
|
||||
"creation": "2017-02-24 12:09:23.744409",
|
||||
"custom": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -46,6 +48,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -78,6 +81,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -110,6 +114,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -141,6 +146,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -172,6 +178,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -203,6 +210,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -234,6 +242,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -264,6 +273,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -295,6 +305,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -325,6 +336,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -356,6 +368,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -387,6 +400,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -417,6 +431,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -448,6 +463,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -479,6 +495,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -510,6 +527,7 @@
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -540,7 +558,7 @@
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 1,
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
@@ -552,7 +570,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-03-09 17:08:21.803622",
|
||||
"modified": "2018-10-02 15:12:31.902994",
|
||||
"modified_by": "Administrator",
|
||||
"module": "ERPNext Foundation",
|
||||
"name": "Service Provider",
|
||||
@@ -561,7 +579,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -587,5 +604,6 @@
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -4,32 +4,12 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
from frappe.utils import get_datetime
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ServiceProvider(WebsiteGenerator):
|
||||
website = frappe._dict(
|
||||
condition_field = "show_in_website",
|
||||
)
|
||||
def validate(self):
|
||||
if not self.route:
|
||||
self.route = 'service-providers/' + self.scrub(self.name)
|
||||
|
||||
def get_context(self, context):
|
||||
context.parents = [dict(label='All Service Providers',
|
||||
route='service-providers',
|
||||
title='All Service Providers')]
|
||||
if self.member:
|
||||
context.membership_type = frappe.get_value('Member', self.member, 'membership_type')
|
||||
if context.website and not context.website.startswith('http'):
|
||||
context.website = 'http://' + context.website
|
||||
if not context.image:
|
||||
if context.membership_type == "Gold":
|
||||
context.image = "/assets/foundation/img/gold.png"
|
||||
elif context.membership_type == "Silver":
|
||||
context.image = "/assets/foundation/img/silver.png"
|
||||
else:
|
||||
context.image = "/assets/foundation/img/default-membership-logo.png"
|
||||
class ServiceProvider(Document):
|
||||
def autoname(self):
|
||||
self.name = self.title
|
||||
|
||||
def send_alert_to_inactive_service_providers():
|
||||
for service_provider in frappe.get_all("Service Provider", fields=['email', 'title']):
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block page_content %}
|
||||
<h1 class="media-heading">{{ title }}</h1>
|
||||
{% if membership_type %}
|
||||
<p><span class='badge badge-light'>{{ membership_type }} Member<span></p>
|
||||
{% endif %}
|
||||
<section>
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<a href="#">
|
||||
<img class="media-img media-object"
|
||||
src="{{ image }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
{{ introduction }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<table class='table table-bordered small'>
|
||||
<tr>
|
||||
<td style='width: 38.2%'>Country</td>
|
||||
<td>{{ country }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Address</td>
|
||||
<td>{{ (address or '').replace('\n', '<br>') }}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Phone</td>
|
||||
<td>{{ phone }}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Email</td>
|
||||
<td><a href="mailto:{{ email }}" target="_blank">
|
||||
{{ email }}</a></td>
|
||||
</tr>
|
||||
{% if website_url %}
|
||||
</tr>
|
||||
<td>Website</td>
|
||||
<td><a href="{{ website_url }}" target="_blank">{{ website_url }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</section>
|
||||
<section>
|
||||
{{ details }}
|
||||
</section>
|
||||
<section>
|
||||
<p><a class='mt-4 btn-dark btn' href="mailto:{{ email }}">Contact {{ title }}</a></p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -1,4 +0,0 @@
|
||||
<div>
|
||||
<a href={{ route }}>{{ title }}</a>
|
||||
</div>
|
||||
<!-- this is a sample default list template -->
|
||||
Reference in New Issue
Block a user