Skip to content

Commit

Permalink
Remove public editing of Entities
Browse files Browse the repository at this point in the history
  • Loading branch information
andey committed Feb 10, 2013
1 parent 95d9df4 commit de074cd
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 130 deletions.
3 changes: 1 addition & 2 deletions app/assets/javascripts/entities.js.coffee
@@ -1,3 +1,2 @@
jQuery ->
$('.badge').popover()
$('#edit-box form').nestedFields()
$('.badge').popover()
5 changes: 0 additions & 5 deletions app/assets/javascripts/layout.js.coffee

This file was deleted.

72 changes: 0 additions & 72 deletions app/views/entities/_edit.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/entities/_show-advanced.html.erb
Expand Up @@ -7,11 +7,6 @@
</p>
</div>
<div class="span9">
<div class="pull-right" style="margin-top: 20px;">
<a class="edit" href="<%= entity_edit_path() %>" role="button" data-toggle="modal">edit
<i class="icon-pencil"></i>
</a>
</div>
<h1><%= @entity.name %></h1>

<p>
Expand Down
5 changes: 0 additions & 5 deletions app/views/entities/_show-basic.html.erb
@@ -1,10 +1,5 @@
<div class="row">
<div class="span12">
<div class="pull-right" style="margin-top: 20px;">
<a class="edit" href="<%= entity_edit_path() %>" role="button" data-toggle="modal">edit
<i class="icon-pencil"></i>
</a>
</div>
<h1><%= @entity.name %></h1>

<p>
Expand Down
4 changes: 0 additions & 4 deletions app/views/entities/show.html.erb
Expand Up @@ -43,8 +43,4 @@
<% end %>
<% end %>
</div>

<% if current_user_session %>
<%= render 'edit' %>
<% end %>
</div>
38 changes: 1 addition & 37 deletions app/views/layouts/public.html.erb
Expand Up @@ -12,46 +12,10 @@
<div class="navbar-inner">
<div class="container">
<%= link_to "BestofAMA", root_path, :class => "brand" %>
<ul class="nav">
<ul class="nav pull-right">
<li><%= link_to "Redditors", entities_path %></li>
<li><%= link_to "Categories", tags_path %></li>
<li><%= link_to "Submit", submit_path %></li>
<li id="li-navbar-search-button">
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Search</a>
</li>
<li id="li-navbar-search-form" class="hidden">
<form action="http://www.google.com/cse" method="get" class="navbar-search pull-left">
<input type="hidden" name="cx" value="003202986105447661025:fwrphcpwb4q"/>
<input type="text" name="q" class="search-query" placeholder="Search">
</form>
</li>
</ul>
<ul class="nav pull-right">
<% if current_user_session %>
<li class="dropdown">
<a id="current_user_username" href="#" class="dropdown-toggle" data-toggle="dropdown"><%= current_user.username %>
<b class="caret"></b></a>
<ul class="dropdown-menu">
<% if current_user.is_admin? %>
<li><%= link_to "Admin Panel", admin_amas_path %></li>
<% end %>
<li class="divider"></li>
<li><%= link_to "Logout", logout_session_path(:return_to => request.path) %></li>
</ul>
</li>
<% else %>
<li class="dropdown">
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Account</a>

<%= form_for UserSession.new, :url => session_path(:return_to => request.path), :html => {:class => "dropdown-menu", :style => "padding: 15px;"} do |f| %>
<h5>Account Login</h5>
<%= f.text_field :username, :placeholder => "Reddit.com Username" %>
<%= f.password_field :password, :placeholder => "Reddit.com Password" %>
<span style="font-size: 10px;">Your reddit.com password <b style="color: red;">is not</b> stored, saved, or logged. <%= link_to "..wait what?", page_path(:id => "privacy") %></span>
<%= f.submit "Login", :class => "btn btn-medium btn-block btn-inverse" %>
<% end %>
</li>
<% end %>
</ul>
</div>
</div>
Expand Down

0 comments on commit de074cd

Please sign in to comment.