Current section
Files
Jump to
Current section
Files
lib/imagine_web/templates/cms_page_version/show.html.eex
<h1><%= link "Pages", to: Routes.cms_page_path(@conn, :index) %> / <%= link @cms_page.path, to: Routes.cms_page_path(@conn, :show, @cms_page) %> / <%= link "Versions", to: Routes.cms_page_version_path(@conn, :index, @cms_page) %> / <%= "Version #{@cms_page_version.version}" %></h1>
<div class="button-bar">
<%= link raw(~s(<i class="pencil alternate icon"></i> Edit)), to: "/#{@cms_page.path}/version/#{@cms_page_version.version}/edit", class: "ui icon labeled button" %>
<%= link raw(~s(<i class="desktop icon"></i> Preview)), to: "/#{@cms_page.path}/version/#{@cms_page_version.version}", class: "ui icon labeled button" %>
<%= if @cms_page.version == @cms_page_version.version || @cms_page.published_version == @cms_page_version.version do %>
<%= link raw(~s(<i class="trash alternate outline icon"></i> Delete)), to: "#", title: "This version is in use and cannot be deleted.", class: "ui icon labeled disabled basic button" %>
<% else %>
<%= link raw(~s(<i class="trash alternate outline icon"></i> Delete)), to: Routes.cms_page_version_path(@conn, :delete, @cms_page, @cms_page_version), method: :delete, data: [confirm: "Are you sure you want to delete this version? There is no undo."], class: "ui icon labeled negative basic button" %>
<% end %>
</div>
<table class="ui summary table">
<tr>
<td><strong>Author:</strong></td>
<td><%= link "#{Imagine.Accounts.User.name(@cms_page_version.author)} (#{@cms_page_version.updated_by_username})", to: Routes.user_path(@conn, :show, @cms_page_version.author) %></td>
</tr>
<tr>
<td><strong>Template:</strong></td>
<td><%= @cms_page_version.cms_template.name %></td>
</tr>
<tr>
<td><strong>Parent:</strong></td>
<td><%= link @cms_page_version.parent.name, to: Routes.cms_page_path(@conn, :show, @cms_page_version.parent) %></td>
</tr>
<tr>
<td><strong>Path:</strong></td>
<td><%= @cms_page_version.path %></td>
</tr>
<tr>
<td><strong>Title:</strong></td>
<td><%= @cms_page_version.title %></td>
</tr>
<tr>
<td><strong>Article date:</strong></td>
<td><%= @cms_page_version.article_date %></td>
</tr>
<tr>
<td><strong>Article end date:</strong></td>
<td><%= @cms_page_version.article_end_date %></td>
</tr>
<tr>
<td><strong>Published date:</strong></td>
<td><%= @cms_page_version.published_date %></td>
</tr>
<tr>
<td><strong>Expires:</strong></td>
<td>
<%= if @cms_page_version.expires do %>
Yes - <%= @cms_page_version.expiration_date %>
<% else %>
No
<% end %>
</td>
</tr>
<tr>
<td><strong>Summary:</strong></td>
<td><%= @cms_page_version.summary %></td>
</tr>
<tr>
<td><strong>HTML head:</strong></td>
<td><%= @cms_page_version.html_head %></td>
</tr>
<tr>
<td><strong>Thumbnail:</strong></td>
<td><%= link Path.basename(@cms_page_version.thumbnail_path || "") |> String.replace(~r/\?\d+$/, ""), to: @cms_page_version.thumbnail_path || "" %></td>
</tr>
<tr>
<td><strong>Feature image:</strong></td>
<td><%= link Path.basename(@cms_page_version.feature_image_path || "") |> String.replace(~r/\?\d+$/, ""), to: @cms_page_version.feature_image_path || "" %></td>
</tr>
<tr>
<td><strong>Redirects to:</strong></td>
<td><%= if @cms_page_version.redirect_enabled, do: @cms_page_version.redirect_to %></td>
</tr>
<tr>
<td><strong>Position:</strong></td>
<td><%= @cms_page_version.position %></td>
</tr>
</table>