107 lines
3.8 KiB
Plaintext
107 lines
3.8 KiB
Plaintext
# HG changeset patch
|
|
# Parent 69c500d7634c0e5287508cfaffa14174cc47d800
|
|
|
|
diff --git a/controllers/academy.py b/controllers/academy.py
|
|
--- a/controllers/academy.py
|
|
+++ b/controllers/academy.py
|
|
@@ -12,12 +12,12 @@ teaching_assistants = [
|
|
]
|
|
|
|
class academy(main.Home):
|
|
- @http.route('/', auth='none', website=True)
|
|
+ @http.route('/', auth='public', website=True)
|
|
def index(self):
|
|
return http.request.website.render('academy.index', {
|
|
'tas': teaching_assistants,
|
|
})
|
|
|
|
- @http.route('/tas/<int:id>/', auth='none', website=True)
|
|
+ @http.route('/tas/<int:id>/', auth='public', website=True)
|
|
def ta(self, id):
|
|
return http.request.website.render('academy.ta', teaching_assistants[id])
|
|
diff --git a/views/templates.xml b/views/templates.xml
|
|
--- a/views/templates.xml
|
|
+++ b/views/templates.xml
|
|
@@ -1,42 +1,46 @@
|
|
<openerp>
|
|
<data>
|
|
-<template id="index" name="Index">
|
|
- <html>
|
|
- <head>
|
|
- <title>AcademyAcademy</title>
|
|
- <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
|
|
- </head>
|
|
- <body class="container">
|
|
- <h1>Introduction to a thing</h1>
|
|
- <h2>Course description</h2>
|
|
- <p>
|
|
- This course will provide a basic introduction to a thing, for
|
|
- motivated students with no prior experience in things. The course
|
|
- will focus on the discovery of things and the planning and
|
|
- organization necessary to handle things.
|
|
- </p>
|
|
- <h2>Teaching Assistants</h2>
|
|
- <ul>
|
|
- <li t-foreach="tas" t-as="ta">
|
|
- <a t-att-href="url_for('/tas/%d/' % ta_index)">
|
|
- <t t-esc="ta['name']"/>
|
|
- </a>
|
|
- </li>
|
|
- </ul>
|
|
- </body>
|
|
- </html>
|
|
+<template id="academy.index" name="Index">
|
|
+ <t t-call="website.layout">
|
|
+ <div id="wrap">
|
|
+ <div class="oe_structure"/>
|
|
+ <div class="oe_structure">
|
|
+ <div class="container">
|
|
+ <h1>Introduction to a thing</h1>
|
|
+ <h2>Course description</h2>
|
|
+ <p>
|
|
+ This course will provide a basic introduction to a thing, for
|
|
+ motivated students with no prior experience in things. The course
|
|
+ will focus on the discovery of things and the planning and
|
|
+ organization necessary to handle things.
|
|
+ </p>
|
|
+ <h2>Teaching Assistants</h2>
|
|
+ <ul>
|
|
+ <li t-foreach="tas" t-as="ta">
|
|
+ <a t-att-href="url_for('/tas/%d/' % ta_index)">
|
|
+ <t t-esc="ta['name']"/>
|
|
+ </a>
|
|
+ </li>
|
|
+ </ul>
|
|
+ </div>
|
|
+ </div>
|
|
+ <div class="oe_structure"/>
|
|
+ </div>
|
|
+ </t>
|
|
</template>
|
|
|
|
-<template id="ta" name="Teaching Assistant">
|
|
- <html>
|
|
- <head>
|
|
- <title>AcademyAcademy TA <t t-esc="name"/></title>
|
|
- <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
|
|
- </head>
|
|
- <body class="container">
|
|
- <h1><t t-esc="name"/></h1>
|
|
- </body>
|
|
- </html>
|
|
+<template id="academy.ta" name="Teaching Assistant">
|
|
+ <t t-call="website.layout">
|
|
+ <div id="wrap">
|
|
+ <div class="oe_structure"/>
|
|
+ <div class="oe_structure">
|
|
+ <div class="container">
|
|
+ <h1><t t-esc="name"/></h1>
|
|
+ </div>
|
|
+ </div>
|
|
+ <div class="oe_structure"/>
|
|
+ </div>
|
|
+ </t>
|
|
</template>
|
|
|
|
</data>
|