-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
432 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title> <%= @work.title %></title> | ||
</head> | ||
|
||
<body> | ||
<h1 class="work-title"><%= @work.title %></h1> | ||
<div class="export-metadata">FromThePage export of <%= @work.title %> from <%= @collection.title %> made on <%= Time.now %>. | ||
<% unless @work.identifier.blank? %> | ||
<p>Identifier: <%=@work.identifier%></p> | ||
<% end %> | ||
<p> | ||
FromThePage version: <%= fromthepage_version %> | ||
</p> | ||
</div> | ||
|
||
<hr /> | ||
<h2 class="divider">Page Transcripts</h2> | ||
|
||
<div class="pages"> | ||
<% @work.pages.each do |page| %> | ||
<div id="page-<%=page.id%>"> | ||
<h3><%= page.title %></h3> | ||
<div class="page-content"> | ||
<%= raw(xml_to_html(page.xml_text, true, true)) %> | ||
</div> | ||
<% if page.notes.present? %> | ||
<div class="page-notes"> | ||
<strong>Notes:</strong> | ||
<% page.notes.each do |note| %> | ||
<div> | ||
<p><span class="page-note-username"><%=note.user.display_name%></span></p> | ||
<p class="page-note-content"><%= sanitize(note.body, tags: %w(strong b em i a), attributes: %w(href))%></p> | ||
|
||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<br /> | ||
<% end %> | ||
</div> | ||
|
||
<% if @work.supports_translation %> | ||
<hr /> | ||
<h2 class="divider">Page Translations</h2> | ||
|
||
<div class="pages"> | ||
<% @work.pages.each do |page| %> | ||
<div id="translation-<%=page.id%>"> | ||
<h3><%= page.title %></h3> | ||
<div class="page-content"> | ||
<%= raw(xml_to_html(page.xml_translation, true, true)) %> | ||
</div> | ||
</div> | ||
<br /> | ||
<% if page.notes.present? %> | ||
<div class="page-notes"> | ||
<strong>Notes:</strong> | ||
<% page.notes.each do |note| %> | ||
<div> | ||
<p><span class="page-note-username"><%=note.user.display_name%></span></p> | ||
<p class="page-note-content"><%= sanitize(note.body, tags: %w(strong b em i a), attributes: %w(href))%></p> | ||
|
||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<hr /> | ||
<% unless @work.collection.subjects_disabled %> | ||
<h2 class="divider">Subjects and Indices</h2> | ||
|
||
<div class="subjects"> | ||
<% @work.articles.sort{ |x,y| x.title.upcase <=> y.title.upcase }.each do |article| %> | ||
<div id="article-<%=article.id%>"> | ||
<h3 class="article-title"><%=article.title %></h3> | ||
<div class="article-content"> | ||
<%= raw(xml_to_html(article.xml_text, true, true)) %> | ||
</div> | ||
<% if article.categories.present? %> | ||
<div class="article-categories"> | ||
<strong>Categories:</strong> | ||
<ul> | ||
<% article.categories.each do |cat| %> | ||
<li><small><%= raw((cat.ancestors.reverse.push(cat).map { |c| c.title }).join(" → ")) %></small></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<div class="article-indices"> | ||
<strong>Pages:</strong> | ||
<ul> | ||
<% article.show_links(@collection).each do |link| %> | ||
<li> | ||
<small> | ||
<% if link.text_type == 'translation' %> | ||
<%= link_to(link.page.title, "#page-#{link.page_id}") %> | ||
<% else %> | ||
<%= link_to(link.page.title, "#translation-#{link.page_id}") %> (translation) | ||
<% end %> | ||
</small> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<!-- categorization here --> | ||
<!-- subject article edit history here --> | ||
</div> | ||
<br /> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</body> | ||
</html> |
Oops, something went wrong.