Selaa lähdekoodia

Merge branch 'develop'

version-14
Rushabh Mehta 9 vuotta sitten
vanhempi
commit
3b8f3a5cf7
8 muutettua tiedostoa jossa 36 lisäystä ja 6 poistoa
  1. +1
    -1
      frappe/__init__.py
  2. +1
    -1
      frappe/docs/user/en/bench/guides/lets-encrypt-ssl-setup.md
  3. +0
    -0
      frappe/docs/user/en/guides/desk/__init__.py
  4. +17
    -0
      frappe/docs/user/en/guides/desk/formatter_for_link_fields.md
  5. +5
    -0
      frappe/docs/user/en/guides/desk/index.md
  6. +2
    -1
      frappe/limits.py
  7. +9
    -2
      frappe/public/js/frappe/form/formatters.js
  8. +1
    -1
      frappe/website/doctype/blog_post/blog_post.py

+ 1
- 1
frappe/__init__.py Näytä tiedosto

@@ -13,7 +13,7 @@ import os, importlib, inspect, json
from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template

__version__ = "7.0.6"
__version__ = "7.0.7"

local = Local()



+ 1
- 1
frappe/docs/user/en/bench/guides/lets-encrypt-ssl-setup.md Näytä tiedosto

@@ -12,7 +12,7 @@
Just run:
sudo bench setup lets-encrypt [site-name]
sudo -H bench setup lets-encrypt [site-name]
You will be faced with several prompts, respond to them accordingly. This command will also add an entry to the crontab of the user that will attempt to renew the certificate every month.


+ 0
- 0
frappe/docs/user/en/guides/desk/__init__.py Näytä tiedosto


+ 17
- 0
frappe/docs/user/en/guides/desk/formatter_for_link_fields.md Näytä tiedosto

@@ -0,0 +1,17 @@
In case where a code and a name is maintained for an entity, (for example for Employee there may be an Employee Code and Employee Name) and we want to show both the ID and name in a link field, we can make a formatter.

#### Example:

frappe.form.link_formatters['Employee'] = function(value, doc) {
if(doc.employee_name && doc.employee_name !== value) {
return value + ': ' + doc.employee_name;
} else {
return value;
}
}

Notes:

1. Both the primary key (`name) and the descriptive name (e.g. `employee_name`) must be present in the document. The descriptive name field could be hidden
1. This needs to be loaded before the document is loaded and can be re-used for all forms. You can also add it in `build.json`


+ 5
- 0
frappe/docs/user/en/guides/desk/index.md Näytä tiedosto

@@ -0,0 +1,5 @@
# Desk Customization

Articles related to customization of Frappe Desk

{index}

+ 2
- 1
frappe/limits.py Näytä tiedosto

@@ -120,7 +120,8 @@ def get_upgrade_url(upgrade_url):
params.update({
'site': frappe.local.site,
'email': frappe.session.user,
'full_name': get_fullname()
'full_name': get_fullname(),
'country': frappe.db.get_value("System Settings", "System Settings", 'country')
})

query = urllib.urlencode(params, doseq=True)


+ 9
- 2
frappe/public/js/frappe/form/formatters.js Näytä tiedosto

@@ -5,6 +5,8 @@

frappe.provide("frappe.form.formatters");

frappe.form.link_formatters = {};

frappe.form.formatters = {
_right: function(value, options) {
if(options && options.inline) {
@@ -60,11 +62,16 @@ frappe.form.formatters = {
return '<i class="icon-ban-circle text-extra-muted" style="margin-right: 3px;"></i>';
}
},
Link: function(value, docfield, options) {
Link: function(value, docfield, options, doc) {
var doctype = docfield._options || docfield.options;
if(value && value.match(/^['"].*['"]$/)) {
return value.replace(/^.(.*).$/, "$1");
value.replace(/^.(.*).$/, "$1");
}

if(frappe.form.link_formatters[doctype]) {
value = frappe.form.link_formatters[doctype](value, doc);
}

if(options && options.for_print) {
return value;
}


+ 1
- 1
frappe/website/doctype/blog_post/blog_post.py Näytä tiedosto

@@ -21,7 +21,7 @@ class BlogPost(WebsiteGenerator):

def make_route(self):
if not self.route:
return 'blog/' + frappe.db.get_value('Blog Category', self.blog_category,
return frappe.db.get_value('Blog Category', self.blog_category,
'route') + '/' + self.scrub(self.title)

def get_feed(self):


Ladataan…
Peruuta
Tallenna