Skip to content

Commit

Permalink
Rename organization templates to follow the pattern of AI ones
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Nov 23, 2023
1 parent 1e6787f commit 9b3381a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "macros.html.jinja2" as macros %}
{% import "lms:templates/admin/macros.html.jinja2" as macros %}
{% extends "lms:templates/admin/base.html.jinja2" %}
{% block header %}New organization{% endblock %}
{% block content %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "macros.html.jinja2" as macros %}
{% import "lms:templates/admin/macros.html.jinja2" as macros %}
{% extends "lms:templates/admin/base.html.jinja2" %}
{% block header %}Organizations{% endblock %}
{% block content %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "macros.html.jinja2" as macros %}
{% import "lms:templates/admin/macros.html.jinja2" as macros %}
{% macro org_hierarchy(node, focus_org) %}
<li>
{% if node.id == focus_org.id %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% import "macros.html.jinja2" as macros %}
{% import "lms:templates/admin/macros.html.jinja2" as macros %}
{% extends "lms:templates/admin/base.html.jinja2" %}
{% block header %}Organization {{ org.id }} usage{% endblock %}
{% block content %}
Expand Down
12 changes: 6 additions & 6 deletions lms/views/admin/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ def __init__(self, request):
@view_config(
route_name="admin.organizations",
request_method="GET",
renderer="lms:templates/admin/organizations.html.jinja2",
renderer="lms:templates/admin/organization/search.html.jinja2",
)
def organizations(self): # pragma: no cover
return {}

@view_config(
route_name="admin.organization.new",
request_method="GET",
renderer="lms:templates/admin/organization.new.html.jinja2",
renderer="lms:templates/admin/organization/new.html.jinja2",
)
def new_organization(self): # pragma: no cover
return {}

@view_config(
route_name="admin.organization.new",
request_method="POST",
renderer="lms:templates/admin/organization.new.html.jinja2",
renderer="lms:templates/admin/organization/new.html.jinja2",
)
def new_organization_callback(self):
if flash_validation(self.request, NewOrganizationSchema):
Expand All @@ -76,7 +76,7 @@ def new_organization_callback(self):
@view_config(
route_name="admin.organization",
request_method="GET",
renderer="lms:templates/admin/organization.html.jinja2",
renderer="lms:templates/admin/organization/show.html.jinja2",
)
def show_organization(self):
org_id = self.request.matchdict["id_"]
Expand Down Expand Up @@ -142,7 +142,7 @@ def toggle_organization_enabled(self):
@view_config(
route_name="admin.organizations",
request_method="POST",
renderer="lms:templates/admin/organizations.html.jinja2",
renderer="lms:templates/admin/organization/search.html.jinja2",
)
def search(self):
if flash_validation(self.request, SearchOrganizationSchema):
Expand All @@ -164,7 +164,7 @@ def search(self):
@view_config(
route_name="admin.organization.usage",
request_method="POST",
renderer="lms:templates/admin/organization.usage.html.jinja2",
renderer="lms:templates/admin/organization/usage.html.jinja2",
)
def usage(self):
org = self._get_org_or_404(self.request.matchdict["id_"])
Expand Down

0 comments on commit 9b3381a

Please sign in to comment.