mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
chore: mass trailing whitespace and EOF fixes
This commit is contained in:
@@ -96,6 +96,6 @@
|
||||
.search-container {
|
||||
margin-top: 1.2rem;
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{%- endblock -%}
|
||||
|
||||
@@ -8,7 +8,7 @@ def get_context(context):
|
||||
|
||||
context.greeting_title = setting.greeting_title
|
||||
context.greeting_subtitle = setting.greeting_subtitle
|
||||
|
||||
|
||||
# Support content
|
||||
favorite_articles = get_favorite_articles_by_page_view()
|
||||
if len(favorite_articles) < 6:
|
||||
@@ -16,15 +16,15 @@ def get_context(context):
|
||||
if favorite_articles:
|
||||
for article in favorite_articles:
|
||||
name_list.append(article.name)
|
||||
for record in (frappe.get_all("Help Article",
|
||||
fields=["title", "content", "route", "category"],
|
||||
filters={"name": ['not in', tuple(name_list)], "published": 1},
|
||||
for record in (frappe.get_all("Help Article",
|
||||
fields=["title", "content", "route", "category"],
|
||||
filters={"name": ['not in', tuple(name_list)], "published": 1},
|
||||
order_by="creation desc", limit=(6-len(favorite_articles)))):
|
||||
favorite_articles.append(record)
|
||||
|
||||
|
||||
context.favorite_article_list = get_favorite_articles(favorite_articles)
|
||||
context.help_article_list = get_help_article_list()
|
||||
|
||||
|
||||
def get_favorite_articles_by_page_view():
|
||||
return frappe.db.sql(
|
||||
"""
|
||||
@@ -34,13 +34,13 @@ def get_favorite_articles_by_page_view():
|
||||
t1.content as content,
|
||||
t1.route as route,
|
||||
t1.category as category,
|
||||
count(t1.route) as count
|
||||
FROM `tabHelp Article` AS t1
|
||||
count(t1.route) as count
|
||||
FROM `tabHelp Article` AS t1
|
||||
INNER JOIN
|
||||
`tabWeb Page View` AS t2
|
||||
ON t1.route = t2.path
|
||||
`tabWeb Page View` AS t2
|
||||
ON t1.route = t2.path
|
||||
WHERE t1.published = 1
|
||||
GROUP BY route
|
||||
GROUP BY route
|
||||
ORDER BY count DESC
|
||||
LIMIT 6;
|
||||
""", as_dict=True)
|
||||
@@ -71,4 +71,4 @@ def get_help_article_list():
|
||||
'articles': help_articles,
|
||||
}
|
||||
help_article_list.append(help_aricles_per_caetgory)
|
||||
return help_article_list
|
||||
return help_article_list
|
||||
|
||||
Reference in New Issue
Block a user