Merge pull request #14484 from pratu16x7/help-portal
[help-portal] don't show issues to guest
This commit is contained in:
commit
d1fffb6ba1
@ -11,7 +11,7 @@
|
||||
value='{{ frappe.form_dict.q or ''}}'
|
||||
{% if not frappe.form_dict.q%}placeholder="{{ _("What do you need help with?") }}"{% endif %}>
|
||||
<input type='submit'
|
||||
class='btn btn-sm btn-primary btn-search' value="{{ _("Search") }}">
|
||||
class='btn btn-sm btn-default btn-search' value="{{ _("Search") }}">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
{% if issues | len > 0 -%}
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h2>{{ _("Your tickets") }}</h2>
|
||||
{% for doc in issues %}
|
||||
@ -55,8 +56,9 @@
|
||||
<p><a href="/issues">{{ _("See all open tickets") }}</a></p>
|
||||
</div>
|
||||
|
||||
<a href="/issues?new=1" class="btn btn-default btn-new btn-sm">
|
||||
<a href="/issues?new=1" class="btn btn-primary btn-new btn-sm">
|
||||
{{ _("Open a new ticket") }}
|
||||
</a>
|
||||
{%- endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -19,7 +19,10 @@ def get_context(context):
|
||||
context.topics = topics_data[:3]
|
||||
|
||||
# Issues
|
||||
context.issues = frappe.get_list("Issue", fields=["name", "status", "subject", "modified"])[:3]
|
||||
if frappe.session.user != "Guest":
|
||||
context.issues = frappe.get_list("Issue", fields=["name", "status", "subject", "modified"])[:3]
|
||||
else:
|
||||
context.issues = []
|
||||
|
||||
def get_forum_posts(s):
|
||||
response = requests.get(s.forum_url + '/' + s.get_latest_query)
|
||||
|
Loading…
x
Reference in New Issue
Block a user