fix: messages and url
This commit is contained in:
@@ -144,7 +144,7 @@ primary_rules = [
|
|||||||
{"from_route": "/courses/<course>/<batch>/discuss", "to_route": "batch/discuss"},
|
{"from_route": "/courses/<course>/<batch>/discuss", "to_route": "batch/discuss"},
|
||||||
{"from_route": "/courses/<course>/<batch>/about", "to_route": "batch/about"},
|
{"from_route": "/courses/<course>/<batch>/about", "to_route": "batch/about"},
|
||||||
{"from_route": "/courses/<course>/<batch>/progress", "to_route": "batch/progress"},
|
{"from_route": "/courses/<course>/<batch>/progress", "to_route": "batch/progress"},
|
||||||
{"from_route": "/become-a-member/<batch>", "to_route": "batch/become-a-member"}
|
{"from_route": "/courses/<course>/<batch>/join", "to_route": "batch/join"}
|
||||||
]
|
]
|
||||||
|
|
||||||
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
|
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
|
||||||
|
|||||||
@@ -1,23 +1,18 @@
|
|||||||
{% extends "templates/base.html" %}
|
{% extends "templates/base.html" %}
|
||||||
{% block title %}Batch{% endblock %}
|
{% block title %} Batch {% endblock %}
|
||||||
|
|
||||||
{% block head_include %}
|
{% block head_include %}
|
||||||
<meta name="description" content="Courses" />
|
<meta name="description" content="Courses" />
|
||||||
<meta name="keywords" content="" />
|
<meta name="keywords" content="" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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" %}
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||||
<div>
|
<div>
|
||||||
<h1 class="mt-5">{{ batch.title }}</h1>
|
<h1 class="mt-5">{{ batch.title }}</h1>
|
||||||
<div class="col pull-right w-25">
|
|
||||||
<button class="btn btn-primary mr-5" id="invite-link" data-link="{{ invite_link }}">Get Batch Invitation
|
|
||||||
Link</button>
|
|
||||||
<small id="copy-message" class="text-muted pull-right" style="display: none;">Copied to Clipboard.</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="course-details">
|
<div class="course-details">
|
||||||
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True) }}
|
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True) }}
|
||||||
@@ -26,10 +21,21 @@
|
|||||||
<h2>Batch Schedule</h2>
|
<h2>Batch Schedule</h2>
|
||||||
{{ widgets.RenderBatch(course=course, batch=batch) }}
|
{{ widgets.RenderBatch(course=course, batch=batch) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if batch.description %}
|
{% if batch.description %}
|
||||||
<h2>Batch Details</h2>
|
<h2>Batch Details</h2>
|
||||||
{{ frappe.utils.md_to_html(batch.description) }}
|
{{ frappe.utils.md_to_html(batch.description) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if course.is_mentor(frappe.session.user) %}
|
||||||
|
<div class="">
|
||||||
|
<h2> Invite Members </h2>
|
||||||
|
<a href="" class="anchor_style mr-5" id="invite-link" data-link="{{ invite_link }}">Get Batch Invitation
|
||||||
|
Link</a>
|
||||||
|
<small id="copy-message" class="text-muted pull-right" style="display: none;">Copied to Clipboard.</small>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
% extends "templates/base.html" %}
|
% extends "templates/base.html" %}
|
||||||
{% block title %}Become a member{% endblock %}
|
{% block title %}Join a Course{% endblock %}
|
||||||
|
|
||||||
{% block head_include %}
|
{% block head_include %}
|
||||||
<meta name="description" content="Become a member" />
|
<meta name="description" content="Join a Course"/>
|
||||||
<meta name="keywords" content="" />
|
<meta name="keywords" content="" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -12,9 +13,9 @@
|
|||||||
<div class='page-card-head'>
|
<div class='page-card-head'>
|
||||||
<span class='indicator blue password-box'>Login Required</span>
|
<span class='indicator blue password-box'>Login Required</span>
|
||||||
</div>
|
</div>
|
||||||
<div class=''>Please log in to confirm your membership.</div>
|
<div class=''>Please log in to confirm to join the course {{ batch.course_title }}.</div>
|
||||||
<a type="submit" id="login" class="btn btn-primary w-100"
|
<a type="submit" id="login" class="btn btn-primary w-100"
|
||||||
href="/login?redirect-to=/become-a-member/{{ batch.name }}">{{_("Login")}}</a>
|
href="/login?redirect-to=/courses/{{ batch.course }}/{{ batch.name }}/join">{{_("Login")}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% elif already_a_member %}
|
{% elif already_a_member %}
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<div class='page-card-head'>
|
<div class='page-card-head'>
|
||||||
<span class='indicator blue password-box'>Already a member</span>
|
<span class='indicator blue password-box'>Already a member</span>
|
||||||
</div>
|
</div>
|
||||||
<div class=''>You are already a member of the batch {{ batch.title }}.
|
<div class=''>You are already a member of the batch {{ batch.title }} for the course {{ batch.course_title }}.
|
||||||
</div>
|
</div>
|
||||||
<a type="submit" id="batch-home" class="btn btn-primary w-100" href="/courses/{{batch.course}}/{{batch.name}}/home">{{_("Go to Batch Home")}}</a>
|
<a type="submit" id="batch-home" class="btn btn-primary w-100" href="/courses/{{batch.course}}/{{batch.name}}/home">{{_("Go to Batch Home")}}</a>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user