/
_links.html.haml
32 lines (32 loc) · 1.28 KB
/
_links.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
- if page.parent
.parent= link_to page.parent.title, page_path(page.parent)
.title
- if called_by == "show"
=h page.title
%br
- else
= link_to h(page.title), page_path(page)
= link_to "Rate", rate_path(page)
= link_to "ePub", download_url_for_page(page, ".epub")
= link_to "HTML", download_url_for_page(page, ".html") unless page.uploaded
= link_to "Sectioned", download_url_for_page(page, ".read") unless page.uploaded
- if called_by == "index"
.part_links
-page.parts[0,5].each_with_index do |part,index|
="|" unless index == 0
= link_to h(part.title), page_path(part)
-if page.parts.size > 5
="|"
= link_to "More Parts", page_path(page)
- else
= link_to "Notes", edit_note_path(page)
= link_to "Authors", author_path(page)
= link_to "Genres", genre_path(page)
= link_to "Hiddens", hidden_path(page)
%br
= link_to "Manage Parts", edit_part_path(page)
= link_to "Edit Scrubbed HTML", edit_html_path(page, format: "scrubbed") unless page.uploaded
= link_to "Edit Raw HTML", edit_html_path(page) unless page.uploaded
= link_to "Scrub", scrub_path(page) unless page.uploaded
= link_to "Refetch", refetch_path(page) unless page.uploaded
= link_to "Original", page.url unless page.url.blank?