[FIX]: change paths for the questions

/qustions - list of questions
/question/number - question page

bzr revid: mga@tinyerp.com-20140222175429-ed2bf13rvihzlmpe
This commit is contained in:
Mantavya Gajjar 2014-02-22 23:24:29 +05:30
parent 64adae0869
commit 90953057aa
4 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@ from openerp.addons.website.controllers.main import Website as controllers
controllers = controllers()
class website_forum(http.Controller):
@http.route(['/question/', '/question/page/<int:page>'], type='http', auth="public", website=True, multilang=True)
@http.route(['/questions/', '/question/page/<int:page>'], type='http', auth="public", website=True, multilang=True)
def questions(self, page=1, **searches):
cr, uid, context = request.cr, request.uid, request.context
forum_obj = request.registry['website.forum.post']
@ -45,7 +45,7 @@ class website_forum(http.Controller):
question_count = forum_obj.search(
request.cr, request.uid, [], count=True,
context=request.context)
pager = request.website.pager(url="/question/", total=question_count, page=page, step=step, scope=5)
pager = request.website.pager(url="/questions/", total=question_count, page=page, step=step, scope=5)
obj_ids = forum_obj.search(
request.cr, request.uid, [], limit=step,

View File

@ -4,7 +4,7 @@
<record id="menu_questions" model="website.menu">
<field name="name">Support</field>
<field name="url">/question</field>
<field name="url">/questions</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">40</field>
</record>

View File

@ -1,7 +1,7 @@
<templates id="template" xml:space="preserve">
<t t-extend="website.editorbar">
<t t-jquery="ul.oe_content_menu" t-operation="append">
<li><a href="#" data-action="new_question">New Question</a></li>
</t>
</t>
</templates>
<t t-extend="website.editorbar">
<t t-jquery="ul.oe_content_menu" t-operation="append">
<li><a href="#" data-action="new_question">New Question</a></li>
</t>
</t>
</templates>

View File

@ -17,7 +17,7 @@
name="Footer Questions Link">
<xpath expr="//footer//ul[@name='products']" position="inside">
<li>
<a href="/question">Questions</a>
<a href="/question">Support</a>
</li>
</xpath>
</template>