From 3a73cbab59fca267ec19753cf17a7da1048c5d11 Mon Sep 17 00:00:00 2001 From: Anand Doshi <anand@erpnext.com> Date: Tue, 5 Jan 2016 19:07:56 +0530 Subject: [PATCH] [docs] --- .../api/core/frappe.core.notifications.html | 16 +++ .../current/api/desk/frappe.desk.like.html | 96 +++++++++++++ .../api/desk/frappe.desk.notifications.html | 32 +++++ frappe/docs/current/api/desk/index.txt | 2 +- frappe/docs/current/api/frappe.sessions.html | 2 +- .../api/model/frappe.model.db_query.html | 16 ++- .../api/model/frappe.model.document.html | 18 +-- .../api/utils/frappe.utils.bench_helper.html | 2 +- .../current/api/utils/frappe.utils.data.html | 16 +++ .../api/website/frappe.website.template.html | 131 ------------------ frappe/docs/current/api/website/index.txt | 1 - frappe/docs/current/index.html | 2 +- frappe/docs/current/models/core/comment.html | 3 +- .../current/models/core/communication.html | 14 -- frappe/docs/current/models/core/user.html | 6 +- frappe/docs/current/models/desk/feed.html | 66 ++++++++- 16 files changed, 257 insertions(+), 166 deletions(-) create mode 100644 frappe/docs/current/api/desk/frappe.desk.like.html delete mode 100644 frappe/docs/current/api/website/frappe.website.template.html diff --git a/frappe/docs/current/api/core/frappe.core.notifications.html b/frappe/docs/current/api/core/frappe.core.notifications.html index c2e7eb079..a8fe2071e 100644 --- a/frappe/docs/current/api/core/frappe.core.notifications.html +++ b/frappe/docs/current/api/core/frappe.core.notifications.html @@ -77,6 +77,22 @@ + + + + + <p class="docs-attr-name"> + <a name="frappe.core.notifications.get_unseen_likes" href="#frappe.core.notifications.get_unseen_likes" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.core.notifications.<b>get_unseen_likes</b> + <i class="text-muted">()</i> + </p> + <div class="docs-attr-desc"><p>Returns count of unseen likes</p> +</div> + <br> + + + <!-- autodoc --> \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.like.html b/frappe/docs/current/api/desk/frappe.desk.like.html new file mode 100644 index 000000000..d1b364d46 --- /dev/null +++ b/frappe/docs/current/api/desk/frappe.desk.like.html @@ -0,0 +1,96 @@ +<!-- title: frappe.desk.like --><div class="dev-header"> + +<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;"> + Version 6.x.x</a> + + + <a class="btn btn-default btn-sm" href="https://github.com/frappe/frappe/blob/develop/frappe/desk/like.py" + target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a> + +</div> + + + + + + + + + + <p class="docs-attr-name"> + <a name="frappe.desk.like._toggle_like" href="#frappe.desk.like._toggle_like" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.like.<b>_toggle_like</b> + <i class="text-muted">(doctype, name, add, user=None)</i> + </p> + <div class="docs-attr-desc"><p>Same as toggle_like but hides param <code>user</code> from API</p> +</div> + <br> + + + + + + + + <p class="docs-attr-name"> + <a name="frappe.desk.like.add_comment" href="#frappe.desk.like.add_comment" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.like.<b>add_comment</b> + <i class="text-muted">(doctype, name)</i> + </p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> +</div> + <br> + + + + + + + + <p class="docs-attr-name"> + <a name="frappe.desk.like.remove_like" href="#frappe.desk.like.remove_like" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.like.<b>remove_like</b> + <i class="text-muted">(doctype, name)</i> + </p> + <div class="docs-attr-desc"><p>Remove previous Like</p> +</div> + <br> + + + + + + + <p><span class="label label-info">Public API</span> + <br><code>/api/method/frappe.desk.like.toggle_like</code> + </p> + <p class="docs-attr-name"> + <a name="frappe.desk.like.toggle_like" href="#frappe.desk.like.toggle_like" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.like.<b>toggle_like</b> + <i class="text-muted">(doctype, name, add=False)</i> + </p> + <div class="docs-attr-desc"><p>Adds / removes the current user in the <code>__liked_by</code> property of the given document. +If column does not exist, will add it in the database.</p> + +<p>The <code>_liked_by</code> property is always set from this function and is ignored if set via +Document API</p> + +<p><strong>Parameters:</strong></p> + +<ul> +<li><strong><code>doctype</code></strong> - DocType of the document to like</li> +<li><strong><code>name</code></strong> - Name of the document to like</li> +<li><strong><code>add</code></strong> - <code>Yes</code> if like is to be added. If not <code>Yes</code> the like will be removed.</li> +</ul> +</div> + <br> + + + + + +<!-- autodoc --> \ No newline at end of file diff --git a/frappe/docs/current/api/desk/frappe.desk.notifications.html b/frappe/docs/current/api/desk/frappe.desk.notifications.html index 799d78174..81727789f 100644 --- a/frappe/docs/current/api/desk/frappe.desk.notifications.html +++ b/frappe/docs/current/api/desk/frappe.desk.notifications.html @@ -131,6 +131,22 @@ + <p class="docs-attr-name"> + <a name="frappe.desk.notifications.get_notifications_for" href="#frappe.desk.notifications.get_notifications_for" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.notifications.<b>get_notifications_for</b> + <i class="text-muted">(notification_type, config, notification_count)</i> + </p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> +</div> + <br> + + + + + + + <p class="docs-attr-name"> <a name="frappe.desk.notifications.get_notifications_for_doctypes" href="#frappe.desk.notifications.get_notifications_for_doctypes" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> @@ -159,6 +175,22 @@ + + + + + <p class="docs-attr-name"> + <a name="frappe.desk.notifications.get_notifications_for_other" href="#frappe.desk.notifications.get_notifications_for_other" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.desk.notifications.<b>get_notifications_for_other</b> + <i class="text-muted">(config, notification_count)</i> + </p> + <div class="docs-attr-desc"><p>Notifications for other items</p> +</div> + <br> + + + <!-- autodoc --> \ No newline at end of file diff --git a/frappe/docs/current/api/desk/index.txt b/frappe/docs/current/api/desk/index.txt index 439207c27..dba8734fe 100644 --- a/frappe/docs/current/api/desk/index.txt +++ b/frappe/docs/current/api/desk/index.txt @@ -1,6 +1,7 @@ frappe.desk.calendar frappe.desk.desk_page frappe.desk +frappe.desk.like frappe.desk.moduleview frappe.desk.notifications frappe.desk.query_builder @@ -8,5 +9,4 @@ frappe.desk.query_report frappe.desk.report_dump frappe.desk.reportview frappe.desk.search -frappe.desk.star frappe.desk.tags \ No newline at end of file diff --git a/frappe/docs/current/api/frappe.sessions.html b/frappe/docs/current/api/frappe.sessions.html index 84690315b..21f51c17c 100644 --- a/frappe/docs/current/api/frappe.sessions.html +++ b/frappe/docs/current/api/frappe.sessions.html @@ -284,7 +284,7 @@ <a name="frappe.sessions.clear_sessions" href="#frappe.sessions.clear_sessions" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> frappe.sessions.<b>clear_sessions</b> - <i class="text-muted">(user=None, keep_current=False)</i> + <i class="text-muted">(user=None, keep_current=False, device=None)</i> </p> <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> </div> diff --git a/frappe/docs/current/api/model/frappe.model.db_query.html b/frappe/docs/current/api/model/frappe.model.db_query.html index 25bc99f50..f71e6a54c 100644 --- a/frappe/docs/current/api/model/frappe.model.db_query.html +++ b/frappe/docs/current/api/model/frappe.model.db_query.html @@ -40,6 +40,20 @@ + <p class="docs-attr-name"> + <a name="add_comment_count" href="#add_comment_count" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + <b>add_comment_count</b> + <i class="text-muted">(self, result)</i> + </p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> +</div> + <br> + + + + + <p class="docs-attr-name"> <a name="add_limit" href="#add_limit" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> @@ -156,7 +170,7 @@ <a name="execute" href="#execute" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> <b>execute</b> - <i class="text-muted">(self, query=None, fields=None, filters=None, or_filters=None, docstatus=None, group_by=None, order_by=None, limit_start=False, limit_page_length=None, as_list=False, with_childnames=False, debug=False, ignore_permissions=False, user=None)</i> + <i class="text-muted">(self, query=None, fields=None, filters=None, or_filters=None, docstatus=None, group_by=None, order_by=None, limit_start=False, limit_page_length=None, as_list=False, with_childnames=False, debug=False, ignore_permissions=False, user=None, with_comment_count=False)</i> </p> <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> </div> diff --git a/frappe/docs/current/api/model/frappe.model.document.html b/frappe/docs/current/api/model/frappe.model.document.html index 970a493bd..73bcd32ea 100644 --- a/frappe/docs/current/api/model/frappe.model.document.html +++ b/frappe/docs/current/api/model/frappe.model.document.html @@ -110,7 +110,7 @@ all values (including child documents) from the database.</p> <a name="add_comment" href="#add_comment" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> <b>add_comment</b> - <i class="text-muted">(self, comment_type, text=None, comment_by=None)</i> + <i class="text-muted">(self, comment_type, text=None, comment_by=None, reference_doctype=None, reference_name=None)</i> </p> <div class="docs-attr-desc"><p>Add a comment to this document.</p> @@ -281,9 +281,9 @@ timestamps don't match.</p> <p class="docs-attr-name"> - <a name="get_permlevel_access" href="#get_permlevel_access" class="text-muted small"> + <a name="get_liked_by" href="#get_liked_by" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> - <b>get_permlevel_access</b> + <b>get_liked_by</b> <i class="text-muted">(self)</i> </p> <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> @@ -295,12 +295,12 @@ timestamps don't match.</p> <p class="docs-attr-name"> - <a name="get_signature" href="#get_signature" class="text-muted small"> + <a name="get_permlevel_access" href="#get_permlevel_access" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> - <b>get_signature</b> + <b>get_permlevel_access</b> <i class="text-muted">(self)</i> </p> - <div class="docs-attr-desc"><p>Returns signature (hash) for private URL.</p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> </div> <br> @@ -309,12 +309,12 @@ timestamps don't match.</p> <p class="docs-attr-name"> - <a name="get_starred_by" href="#get_starred_by" class="text-muted small"> + <a name="get_signature" href="#get_signature" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> - <b>get_starred_by</b> + <b>get_signature</b> <i class="text-muted">(self)</i> </p> - <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> + <div class="docs-attr-desc"><p>Returns signature (hash) for private URL.</p> </div> <br> diff --git a/frappe/docs/current/api/utils/frappe.utils.bench_helper.html b/frappe/docs/current/api/utils/frappe.utils.bench_helper.html index c5a73083d..28066aa7b 100644 --- a/frappe/docs/current/api/utils/frappe.utils.bench_helper.html +++ b/frappe/docs/current/api/utils/frappe.utils.bench_helper.html @@ -21,7 +21,7 @@ <a name="frappe.utils.bench_helper.app_group" href="#frappe.utils.bench_helper.app_group" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> frappe.utils.bench_helper.<b>app_group</b> - <i class="text-muted">(ctx, site=False, force=False, verbose=False, profile=False)</i> + <i class="text-muted">()</i> </p> <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> </div> diff --git a/frappe/docs/current/api/utils/frappe.utils.data.html b/frappe/docs/current/api/utils/frappe.utils.data.html index 0198f26d6..d0b5eabc2 100644 --- a/frappe/docs/current/api/utils/frappe.utils.data.html +++ b/frappe/docs/current/api/utils/frappe.utils.data.html @@ -926,6 +926,22 @@ Ported from PrettyDate by John Resig</p> + <p class="docs-attr-name"> + <a name="frappe.utils.data.to_markdown" href="#frappe.utils.data.to_markdown" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + frappe.utils.data.<b>to_markdown</b> + <i class="text-muted">(html)</i> + </p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> +</div> + <br> + + + + + + + <p class="docs-attr-name"> <a name="frappe.utils.data.to_timedelta" href="#frappe.utils.data.to_timedelta" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> diff --git a/frappe/docs/current/api/website/frappe.website.template.html b/frappe/docs/current/api/website/frappe.website.template.html deleted file mode 100644 index b154b8fc0..000000000 --- a/frappe/docs/current/api/website/frappe.website.template.html +++ /dev/null @@ -1,131 +0,0 @@ -<!-- title: frappe.website.template --><div class="dev-header"> - -<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;"> - Version 6.x.x</a> - - - <a class="btn btn-default btn-sm" href="https://github.com/frappe/frappe/blob/develop/frappe/website/template.py" - target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a> - -</div> - - - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.add_hero" href="#frappe.website.template.add_hero" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>add_hero</b> - <i class="text-muted">(out, context)</i> - </p> - <div class="docs-attr-desc"><p>Add a hero element if specified in content or hooks. -Hero elements get full page width.</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.add_index" href="#frappe.website.template.add_index" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>add_index</b> - <i class="text-muted">(out, context)</i> - </p> - <div class="docs-attr-desc"><p>Add index, next button if <code>{index}</code>, <code>{next}</code> is present.</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.build_template" href="#frappe.website.template.build_template" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>build_template</b> - <i class="text-muted">(context)</i> - </p> - <div class="docs-attr-desc"><p>Returns a dict of block name and its rendered content</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.render_blocks" href="#frappe.website.template.render_blocks" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>render_blocks</b> - <i class="text-muted">(template_path, out, context)</i> - </p> - <div class="docs-attr-desc"><p>Build the template block by block from the main template.</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.separate_style_and_script" href="#frappe.website.template.separate_style_and_script" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>separate_style_and_script</b> - <i class="text-muted">(out, context)</i> - </p> - <div class="docs-attr-desc"><p>Extract <code>style</code> and <code>script</code> tags into separate blocks</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.set_breadcrumbs" href="#frappe.website.template.set_breadcrumbs" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>set_breadcrumbs</b> - <i class="text-muted">(out, context)</i> - </p> - <div class="docs-attr-desc"><p>Build breadcrumbs template (deprecated)</p> -</div> - <br> - - - - - - - - <p class="docs-attr-name"> - <a name="frappe.website.template.set_title_and_header" href="#frappe.website.template.set_title_and_header" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - frappe.website.template.<b>set_title_and_header</b> - <i class="text-muted">(out, context)</i> - </p> - <div class="docs-attr-desc"><p>Extract and set title and header from content or context.</p> -</div> - <br> - - - - - -<!-- autodoc --> \ No newline at end of file diff --git a/frappe/docs/current/api/website/index.txt b/frappe/docs/current/api/website/index.txt index 45ac65863..991920d20 100644 --- a/frappe/docs/current/api/website/index.txt +++ b/frappe/docs/current/api/website/index.txt @@ -3,6 +3,5 @@ frappe.website frappe.website.render frappe.website.router frappe.website.statics -frappe.website.template frappe.website.utils frappe.website.website_generator \ No newline at end of file diff --git a/frappe/docs/current/index.html b/frappe/docs/current/index.html index 0ac6840f4..887376f6b 100644 --- a/frappe/docs/current/index.html +++ b/frappe/docs/current/index.html @@ -35,7 +35,7 @@ Version </td> <td> - <code>6.16.3</code> + <code>6.17.2</code> </td> </tr> </table> diff --git a/frappe/docs/current/models/core/comment.html b/frappe/docs/current/models/core/comment.html index 96eec2e57..182e0ed6a 100644 --- a/frappe/docs/current/models/core/comment.html +++ b/frappe/docs/current/models/core/comment.html @@ -73,7 +73,8 @@ Comment Workflow Label Attachment -Attachment Removed</pre> +Attachment Removed +Like</pre> </td> </tr> diff --git a/frappe/docs/current/models/core/communication.html b/frappe/docs/current/models/core/communication.html index a754c2888..b89c1b07d 100644 --- a/frappe/docs/current/models/core/communication.html +++ b/frappe/docs/current/models/core/communication.html @@ -571,20 +571,6 @@ Recipient Unsubscribed</pre> - <p class="docs-attr-name"> - <a name="get_starrers" href="#get_starrers" class="text-muted small"> - <i class="icon-link small" style="color: #ccc;"></i></a> - <b>get_starrers</b> - <i class="text-muted">(self)</i> - </p> - <div class="docs-attr-desc"><p>Return list of users who have starred this document.</p> -</div> - <br> - - - - - <p class="docs-attr-name"> <a name="notify" href="#notify" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> diff --git a/frappe/docs/current/models/core/user.html b/frappe/docs/current/models/core/user.html index 52f57c0ca..a74b43639 100644 --- a/frappe/docs/current/models/core/user.html +++ b/frappe/docs/current/models/core/user.html @@ -1068,9 +1068,9 @@ Website User</pre> <p class="docs-attr-name"> - <a name="send_password_notifcation" href="#send_password_notifcation" class="text-muted small"> + <a name="send_password_notification" href="#send_password_notification" class="text-muted small"> <i class="icon-link small" style="color: #ccc;"></i></a> - <b>send_password_notifcation</b> + <b>send_password_notification</b> <i class="text-muted">(self, new_password)</i> </p> <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> @@ -1595,8 +1595,6 @@ The mentions will be separated by non-word characters or may appear at the start - - diff --git a/frappe/docs/current/models/desk/feed.html b/frappe/docs/current/models/desk/feed.html index 827a68073..1c834c426 100644 --- a/frappe/docs/current/models/desk/feed.html +++ b/frappe/docs/current/models/desk/feed.html @@ -52,7 +52,8 @@ Comment Login Label -Info</pre> +Info +Like</pre> </td> </tr> @@ -116,6 +117,55 @@ Info</pre> <td></td> </tr> + <tr > + <td>7</td> + <td ><code>doc_owner</code></td> + <td > + Data</td> + <td > + Doc Owner + + </td> + <td></td> + </tr> + + <tr > + <td>8</td> + <td ><code>seen</code></td> + <td > + Check</td> + <td > + Seen + + </td> + <td></td> + </tr> + + <tr > + <td>9</td> + <td ><code>reference_doctype</code></td> + <td > + Data</td> + <td > + Reference DocType + <p class="text-muted small"> + Use this to provide alternative link to a feed record</p> + </td> + <td></td> + </tr> + + <tr > + <td>10</td> + <td ><code>reference_name</code></td> + <td > + Data</td> + <td > + Reference Name + + </td> + <td></td> + </tr> + </tbody> </table> @@ -138,6 +188,20 @@ Info</pre> </div> <div style="padding-left: 30px;"> + + + + <p class="docs-attr-name"> + <a name="validate" href="#validate" class="text-muted small"> + <i class="icon-link small" style="color: #ccc;"></i></a> + <b>validate</b> + <i class="text-muted">(self)</i> + </p> + <div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p> +</div> + <br> + + </div> <hr> -- GitLab