Class: Knitkit::OnlineDocumentSectionsController
- Inherits:
-
BaseController
- Object
- ErpApp::ApplicationController
- BaseController
- Knitkit::OnlineDocumentSectionsController
show all
- Defined in:
- app/controllers/knitkit/online_document_sections_controller.rb
Instance Method Summary
collapse
#view_current_publication, #website
Instance Method Details
#build_tree ⇒ Object
12
13
14
|
# File 'app/controllers/knitkit/online_document_sections_controller.rb', line 12
def build_tree
render :inline => build_document_hash.to_json
end
|
#get_content ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'app/controllers/knitkit/online_document_sections_controller.rb', line 16
def get_content
document_section = OnlineDocumentSection.find(params[:document_section_id])
content = document_section.documented_item_published_content(@active_publication)
if document_section.use_markdown and content
html = Kramdown::Document.new(content.body_html).to_html
else
html = content ? content.body_html : ''
end
render :json => {:success => true, :html => html}
end
|
#index ⇒ Object
8
9
10
|
# File 'app/controllers/knitkit/online_document_sections_controller.rb', line 8
def index
end
|