diff --git a/addons/website_doc/controllers/main.py b/addons/website_doc/controllers/main.py deleted file mode 100644 index 0ce23772b9d..00000000000 --- a/addons/website_doc/controllers/main.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- - -from datetime import datetime -import werkzeug.urls -import simplejson - -from openerp import tools -from openerp import SUPERUSER_ID -from openerp.addons.web import http -from openerp.addons.web.controllers.main import login_redirect -from openerp.addons.web.http import request -from openerp.addons.website.controllers.main import Website as controllers -from openerp.addons.website.models.website import slug -from openerp.addons.website_forum.controllers.main import WebsiteForum - -controllers = controllers() - -class WebsiteDoc(http.Controller): - - @http.route(['/doc', '/doc/'], type='http', auth="public", website=True, multilang=True) - def documentation(self, toc='', **kwargs): - cr, uid, context, toc_id = request.cr, request.uid, request.context, False - TOC = request.registry['documentation.toc'] - obj_ids = TOC.search(cr, uid, [('parent_id', '=', False)], context=context) - toc_ids = TOC.browse(cr, uid, obj_ids, context=context) - value = { - 'documentaion_toc': toc_ids, - 'topic': toc or toc_ids[0], - } - return request.website.render("website_doc.documentation", value) - - @http.route('/doc/new', type='http', auth="user", multilang=True, website=True) - def create_table_of_content(self, toc_name="New Table Of Content", **kwargs): - toc_id = request.registry['documentation.toc'].create(request.cr, request.uid, { - 'name': toc_name, - }, context=request.context) - return request.redirect("/doc/%s" % toc_id) - - #--------------------- - # Forum Posts - # -------------------- - -class WebsiteForum(WebsiteForum): - - def prepare_question_values(self, forum, **kwargs): - cr, uid, context = request.cr, request.uid, request.context - TOC = request.registry['documentation.toc'] - obj_ids = TOC.search(cr, uid, [('child_ids', '=', False)], context=context) - toc = TOC.browse(cr, uid, obj_ids, context=context) - values = super(WebsiteForum, self).prepare_question_values(forum=forum, kwargs=kwargs) - values.update({'documentaion_toc': toc}) - return values - - @http.route('/forum//question//toc', type='http', auth="user", multilang=True, website=True) - def post_toc(self, forum, post, **kwargs): - toc_id = int(kwargs.get('content')) if kwargs.get('content') else False - request.registry['forum.post'].write(request.cr, request.uid, [post.id], {'toc_id': toc_id}, context=request.context) - return werkzeug.utils.redirect("/forum/%s/question/%s" % (slug(forum), slug(post))) \ No newline at end of file diff --git a/addons/website_doc/models/__init__.py b/addons/website_doc/models/__init__.py deleted file mode 100644 index 9abb82c69f0..00000000000 --- a/addons/website_doc/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- - -import doc -import res_users diff --git a/addons/website_doc/views/doc.xml b/addons/website_doc/views/doc.xml deleted file mode 100644 index f544e553149..00000000000 --- a/addons/website_doc/views/doc.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - documentation.toc.list - documentation.toc - child_ids - - - - - - - - - documentation.toc.list - documentation.toc - - - - - - - - - documentation.toc.form - documentation.toc - -
- - - - - - -
-
-
- - - Documentation - documentation.toc - form - tree,form - - - - - - Documentation Hierarchy - documentation.toc - tree - tree - [('parent_id','=',False)] - - - - - -
-
diff --git a/addons/website_doc/views/website_doc.xml b/addons/website_doc/views/website_doc.xml deleted file mode 100644 index 1e6fe9f245b..00000000000 --- a/addons/website_doc/views/website_doc.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - -