fix: profile urls

This commit is contained in:
Jan Doe
2021-09-09 15:34:39 +05:30
parent 90e268ff2f
commit 7721f31342
3 changed files with 5 additions and 1 deletions

View File

@@ -141,6 +141,7 @@ website_route_rules = [
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"}, {"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"}, {"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
{"from_route": "/courses/<course>/join", "to_route": "batch/join"}, {"from_route": "/courses/<course>/join", "to_route": "batch/join"},
{"from_route": "/users", "to_route": "profiles/profile"}
] ]
website_redirects = [ website_redirects = [
@@ -150,6 +151,7 @@ website_redirects = [
update_website_context = [ update_website_context = [
'community.widgets.update_website_context', 'community.widgets.update_website_context',
] ]
jinja = { jinja = {
"methods": [ "methods": [
"community.page_renderers.get_profile_url" "community.page_renderers.get_profile_url"

View File

@@ -40,7 +40,7 @@
<div {% if not read_only %} class="mb-4" {% endif %}> <div {% if not read_only %} class="mb-4" {% endif %}>
<span class="zindex"> <span class="zindex">
{{ widgets.Avatar(member=course.get_instructor(), avatar_class="avatar-small") }} {{ widgets.Avatar(member=course.get_instructor(), avatar_class="avatar-small") }}
<a class="button-links" href="/users/{{ course.get_instructor().username}}"> <a class="button-links" href="{{ get_profile_url(course.get_instructor().username) }}">
<span class="course-instructor"> <span class="course-instructor">
{{ course.get_instructor().full_name }} {{ course.get_instructor().full_name }}
</span> </span>

View File

@@ -74,6 +74,7 @@
</div> </div>
</div> </div>
{% if course.video_link %}
<div class="modal fade preview-modal" id="video-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" <div class="modal fade preview-modal" id="video-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true"> aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
@@ -92,6 +93,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endif %}
{% endmacro%} {% endmacro%}
<!-- Course Outline and Creator --> <!-- Course Outline and Creator -->