Skip to content

Commit

Permalink
Merge pull request #514 from pateljannat/social-links
Browse files Browse the repository at this point in the history
fix: course details link preview
  • Loading branch information
pateljannat authored May 15, 2023
2 parents 0093025 + c01c248 commit 9501207
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lms/lms/widgets/CourseOutline.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<div class="chapter-title-main">
{{ chapter.title }}
</div>
<div class="small ml-auto">
<!-- <div class="small ml-auto">
{{ lessons | length }} lessons
</div>
</div> -->

</div>

Expand Down
8 changes: 4 additions & 4 deletions lms/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ textarea.field-input {
font-size: var(--text-sm);
}

body {
background-color: #FFFFFF;
.lessons {
margin-left: 1.5rem;
}

input[type=checkbox] {
Expand Down Expand Up @@ -611,7 +611,7 @@ input[type=checkbox] {
.chapter-description {
color: var(--gray-900);
font-size: var(--text-sm);
margin-left: 0.5rem;
margin-left: 2rem;
margin-bottom: 0.5rem;
}

Expand Down Expand Up @@ -804,7 +804,7 @@ input[type=checkbox] {

.course-content-parent {
display: grid;
grid-gap: 4rem;
grid-gap: 2rem;
grid-template-columns: 1fr 3fr;
}

Expand Down
4 changes: 0 additions & 4 deletions lms/templates/lms_base.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{% extends "templates/base.html" %}

{% block meta_block %}
{% include "templates/includes/meta_block.html" %}
{% endblock %}

{% block content %}
{% include "public/icons/symbol-defs.svg" %}
{% include "lms/templates/onboarding_header.html" %}
Expand Down
2 changes: 1 addition & 1 deletion lms/www/batch/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{% if lesson.name %}
<a class="btn btn-default btn-sm mr-2" href="{{ get_lesson_url(course.name, lesson_number) }}">
<span>
{{ _("Preview") }}
{{ _("Back to Lesson") }}
</span>
</a>
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion lms/www/batch/learn.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ <h3> {{ _("Embed Components") }} </h3>
<script type="text/javascript">
var page_context = {{ page_context | tojson }};
</script>
{{ include_script('controls.bundle.js') }}
{% for ext in page_extensions %}
{{ ext.render_footer() }}
{% endfor %}
Expand Down
5 changes: 0 additions & 5 deletions lms/www/courses/course.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,3 @@
</div>
{% endmacro %}


{%- block script %}
{{ super() }}
{{ include_script('controls.bundle.js') }}
{% endblock %}
2 changes: 1 addition & 1 deletion lms/www/courses/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def set_course_context(context, course_name):
course.edit_mode = True

if course is None:
redirect_to_courses_list()
raise frappe.PermissionError(_("This is not a valid course URL."))

related_courses = frappe.get_all(
"Related Courses", {"parent": course.name}, ["course"]
Expand Down
2 changes: 1 addition & 1 deletion lms/www/courses/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="align-self-center">
{% if course.name %}
<a class="btn btn-default btn-sm mr-2" href="/courses/{{ course.name }}">
{{ _("Preview") }}
{{ _("Back to Course") }}
</a>

<a class="btn btn-default btn-sm mr-2" href="/courses/{{ course.name }}/outline">
Expand Down
8 changes: 8 additions & 0 deletions lms/www/jobs/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ def get_context(context):
except KeyError:
frappe.local.flags.redirect_location = "/jobs"
raise frappe.Redirect

context.job = frappe.get_doc("Job Opportunity", job)

context.metatags = {
"title": context.job.job_title,
"image": context.job.company_logo,
"description": f"Job Posting for {context.job.job_title} by {context.job.company_name}",
"keywords": "Job Opening, Job Posting, Job Opportunity, Job Vacancy, Job, Vacancy, Opening, Opportunity, Vacancy",
}

0 comments on commit 9501207

Please sign in to comment.