-
Notifications
You must be signed in to change notification settings - Fork 3
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
Neil Gehani
committed
Sep 19, 2013
1 parent
a1f589e
commit e8edabf
Showing
17 changed files
with
260 additions
and
107 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,3 @@ | ||
// Place all the styles related to the Pins controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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,69 @@ | ||
body { | ||
background-color: #fff; | ||
color: #333; | ||
font-family: verdana, arial, helvetica, sans-serif; | ||
font-size: 13px; | ||
line-height: 18px; | ||
} | ||
|
||
p, ol, ul, td { | ||
font-family: verdana, arial, helvetica, sans-serif; | ||
font-size: 13px; | ||
line-height: 18px; | ||
} | ||
|
||
pre { | ||
background-color: #eee; | ||
padding: 10px; | ||
font-size: 11px; | ||
} | ||
|
||
a { | ||
color: #000; | ||
&:visited { | ||
color: #666; | ||
} | ||
&:hover { | ||
color: #fff; | ||
background-color: #000; | ||
} | ||
} | ||
|
||
div { | ||
&.field, &.actions { | ||
margin-bottom: 10px; | ||
} | ||
} | ||
|
||
#notice { | ||
color: green; | ||
} | ||
|
||
.field_with_errors { | ||
padding: 2px; | ||
background-color: red; | ||
display: table; | ||
} | ||
|
||
#error_explanation { | ||
width: 450px; | ||
border: 2px solid red; | ||
padding: 7px; | ||
padding-bottom: 0; | ||
margin-bottom: 20px; | ||
background-color: #f0f0f0; | ||
h2 { | ||
text-align: left; | ||
font-weight: bold; | ||
padding: 5px 5px 5px 15px; | ||
font-size: 12px; | ||
margin: -7px; | ||
margin-bottom: 0px; | ||
background-color: #c00; | ||
color: #fff; | ||
} | ||
ul li { | ||
font-size: 12px; | ||
list-style: square; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<h2>Sign in</h2> | ||
|
||
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), html: { class: 'form-horizontal'}) do |f| %> | ||
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), html: { class: "form-horizontal"}) do |f| %> | ||
|
||
<%= f.input :email, placeholder: '[email protected]' %> | ||
<%= f.input :password, placeholder: 'hint: no special 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<%= simple_form_for(@pin, html: { class: "form-horizontal"}) do |f| %> | ||
<%= simple_form_for(@pin, html: {class: "form_horizontal"}) do |f| %> | ||
<%= f.error_notification %> | ||
|
||
<%= f.input :description, as: :text, input_html: { rows: "3" } %> | ||
|
||
<%= f.input :description, as: :text, input_html: { rows: "3" } %> | ||
<div class="form-actions"> | ||
<%= f.button :submit, class: "btn btn-primary" %> | ||
<%= f.button :submit, class: "btn btn-primary" %> | ||
</div> | ||
<% end %> | ||
<% end %> |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<tr> | ||
<% @pins.each do |pin| %> | ||
<tr> | ||
<td><%= pin.description %></td> | ||
<td><%= link_to 'Show', pin %></td> | ||
<% if current_user == pin.user %> | ||
<td><%= link_to 'Edit', edit_pin_path(pin) %></td> | ||
<td><%= link_to 'Destroy', pin, method: :delete, data: { confirm: 'Are you sure?' } %></td> | ||
<% end %> | ||
</tr> | ||
<td><%= link_to 'Edit', edit_pin_path(pin) %></td> | ||
<td><%= link_to 'Destroy', pin, method: :delete, data: { confirm: 'Are you sure?' } %></td> | ||
</tr> | ||
<% end %> |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<h1>Listing pins</h1> | ||
|
||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Description</th> | ||
<th></th> | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Description</th> | ||
<th></th> | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<%= render @pins %> | ||
</tbody> | ||
</table> | ||
<tbody> | ||
<%= render @pins %> | ||
</tbody> | ||
</table> | ||
|
||
<br /> | ||
<br> | ||
|
||
<%= link_to 'New Pin', new_pin_path %> | ||
<%= link_to 'New Pin', new_pin_path %> |
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 |
---|---|---|
@@ -1,17 +1,11 @@ | ||
<div class="row"> | ||
<div class="span6 offset3"> | ||
<%# This puts the grey box around content below %> | ||
<div class="well"> | ||
<p> | ||
<%= @pin.description %> | ||
</p> | ||
<p> | ||
<%= @pin.user.name %> | ||
</p> | ||
<% if current_user == @pin.user %> | ||
<%= link_to 'Edit', edit_pin_path(@pin) %> | | ||
<% end %> | ||
<%= link_to 'Back', pins_path %> | ||
<%= link_to 'Edit', edit_pin_path(@pin) %> | | ||
<%= link_to 'Back', pins_path %> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.