Remove obsolete view
parent
657ddab1de
commit
fcb95df6c3
@ -1,83 +0,0 @@
|
||||
<div class="page-header asciicast-heading">
|
||||
<h1>
|
||||
<span class="title"><%= @asciicast.smart_title %></span>
|
||||
|
||||
<% if current_user && @asciicast.user == current_user %>
|
||||
<% if @asciicast.title.blank? %>
|
||||
<%= link_to 'Add a title', edit_asciicast_path(@asciicast, :anchor => 'focus-title'),
|
||||
:class => 'edit-title' %>
|
||||
<% else %>
|
||||
<%= link_to 'Edit title', edit_asciicast_path(@asciicast, :anchor => 'focus-title'),
|
||||
:class => 'edit-title' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<span class="meta">
|
||||
Recorded by
|
||||
<%= profile_link(@asciicast, :avatar => false) %>
|
||||
<%= asciicast_time(@asciicast) %>
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<p class="env-info">
|
||||
<span class="os">OS=<span class="value"><%= @asciicast.os %></span></span>
|
||||
<span class="shell">SHELL=<span class="value"><%= @asciicast.shell_name %></span></span>
|
||||
<span class="term-type">TERM=<span class="value"><%= @asciicast.terminal_type || '?' %></span></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'asciicasts/asciicast', :object => @asciicast %>
|
||||
|
||||
<% if current_user && @asciicast.user == current_user %>
|
||||
<% if @asciicast.description.blank? %>
|
||||
<%= link_to 'Add a description', edit_asciicast_path(@asciicast, :anchor => 'focus-desc'),
|
||||
:class => 'edit-description' %>
|
||||
<% else %>
|
||||
<%= link_to 'Edit description', edit_asciicast_path(@asciicast, :anchor => 'focus-desc'),
|
||||
:class => 'edit-description' %>
|
||||
<% end %>
|
||||
|
||||
|
|
||||
|
||||
<%= link_to 'Delete this asciicast', asciicast_path(@asciicast),
|
||||
:method => :delete, :confirm => 'U SHURE?',
|
||||
:class => 'asciicast-delete-link' %>
|
||||
<% end %>
|
||||
|
||||
<div class="comments-container">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<ul id="comments">
|
||||
</ul>
|
||||
|
||||
<% if current_user %>
|
||||
<form id="new-comment">
|
||||
<label>Your comment</label>
|
||||
|
||||
<p class="body">
|
||||
<textarea type="text" name="body" id="comment-body"></textarea>
|
||||
</p>
|
||||
|
||||
<p class="github-flavor">
|
||||
Parsed with <a href="http://github.github.com/github-flavored-markdown/"
|
||||
target="_blank">GitHub Flavored Markdown</a>
|
||||
</p>
|
||||
|
||||
<button type="submit" class="btn">Post</button>
|
||||
</form>
|
||||
<% else %>
|
||||
<div><%= link_to "Login in", login_path %> to comment.</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var comments = new AsciiIo.Collections.Comments();
|
||||
var asciicast_id = <%= @asciicast.id %>
|
||||
|
||||
comments.url = ['/api/asciicasts/', asciicast_id, '/comments'].join('');
|
||||
comments.fetch();
|
||||
|
||||
new AsciiIo.Views.CommentsIndex({ collection: comments });
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue