From bb0aa09b4e80feb84fa203b251f97b0f391931dd Mon Sep 17 00:00:00 2001 From: pateljannat Date: Mon, 31 May 2021 13:39:31 +0530 Subject: [PATCH] fix: messages and url --- community/hooks.py | 2 +- community/www/batch/home.html | 22 ++++++++++++------- .../{become-a-member/index.html => join.html} | 11 +++++----- .../{become-a-member/index.py => join.py} | 0 4 files changed, 21 insertions(+), 14 deletions(-) rename community/www/batch/{become-a-member/index.html => join.html} (86%) rename community/www/batch/{become-a-member/index.py => join.py} (100%) diff --git a/community/hooks.py b/community/hooks.py index e507aefa..e6916c0b 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -144,7 +144,7 @@ primary_rules = [ {"from_route": "/courses///discuss", "to_route": "batch/discuss"}, {"from_route": "/courses///about", "to_route": "batch/about"}, {"from_route": "/courses///progress", "to_route": "batch/progress"}, - {"from_route": "/become-a-member/", "to_route": "batch/become-a-member"} + {"from_route": "/courses///join", "to_route": "batch/join"} ] # Any frappe default URL is blocked by profile-rules, add it here to unblock it diff --git a/community/www/batch/home.html b/community/www/batch/home.html index 839df68c..09743e50 100644 --- a/community/www/batch/home.html +++ b/community/www/batch/home.html @@ -1,23 +1,18 @@ {% extends "templates/base.html" %} -{% block title %}Batch{% endblock %} +{% block title %} Batch {% endblock %} + {% block head_include %} - {% endblock %} {% block content %} -{% set invite_link = frappe.utils.get_url() + "/become-a-member/" + batch.name %} +{% set invite_link = frappe.utils.get_url() + "/courses/" + course.name + "/" + batch.name + "/join" %}
{{ widgets.BatchTabs(course=course, batch=batch) }}

{{ batch.title }}

-
- - -
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True) }} @@ -26,10 +21,21 @@

Batch Schedule

{{ widgets.RenderBatch(course=course, batch=batch) }}
+ {% if batch.description %}

Batch Details

{{ frappe.utils.md_to_html(batch.description) }} {% endif %} + + {% if course.is_mentor(frappe.session.user) %} +
+

Invite Members

+ Get Batch Invitation + Link + +
+ {% endif %} +