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>/about", "to_route": "batch/about"},
|
||||
{"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
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
{% extends "templates/base.html" %}
|
||||
{% block title %}Batch{% endblock %}
|
||||
{% block title %} Batch {% endblock %}
|
||||
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
{% 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" %}
|
||||
<div class="container mt-5">
|
||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||
<div>
|
||||
<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 class="course-details">
|
||||
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True) }}
|
||||
@@ -26,10 +21,21 @@
|
||||
<h2>Batch Schedule</h2>
|
||||
{{ widgets.RenderBatch(course=course, batch=batch) }}
|
||||
</div>
|
||||
|
||||
{% if batch.description %}
|
||||
<h2>Batch Details</h2>
|
||||
{{ frappe.utils.md_to_html(batch.description) }}
|
||||
{% 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>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
% extends "templates/base.html" %}
|
||||
{% block title %}Become a member{% endblock %}
|
||||
{% block title %}Join a Course{% endblock %}
|
||||
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Become a member" />
|
||||
<meta name="description" content="Join a Course"/>
|
||||
<meta name="keywords" content="" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -12,9 +13,9 @@
|
||||
<div class='page-card-head'>
|
||||
<span class='indicator blue password-box'>Login Required</span>
|
||||
</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"
|
||||
href="/login?redirect-to=/become-a-member/{{ batch.name }}">{{_("Login")}}</a>
|
||||
href="/login?redirect-to=/courses/{{ batch.course }}/{{ batch.name }}/join">{{_("Login")}}</a>
|
||||
</div>
|
||||
|
||||
{% elif already_a_member %}
|
||||
@@ -23,7 +24,7 @@
|
||||
<div class='page-card-head'>
|
||||
<span class='indicator blue password-box'>Already a member</span>
|
||||
</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>
|
||||
<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>
|
||||
Reference in New Issue
Block a user