-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from jasonpettus/views
Added ability to create subscriptions on 'edit sections' page
- Loading branch information
Showing
4 changed files
with
78 additions
and
18 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
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,24 +1,56 @@ | ||
<div class="mdl-grid"> | ||
<div class="mdl-cell mdl-cell--4-col-phone round mdl-cell--8-col center pd-4"> | ||
<div class="section_box"><p> | ||
<div class="mdl-cell mdl-cell--4-col-phone round mdl-cell--8-col center-box pd-4"> | ||
<p> | ||
<%= form_for @section do |f| %> | ||
<%= f.text_field :title, class: 'list-left', placeholder: 'Section name' %> | ||
<%= f.submit value: 'Add Section' %> | ||
<%= f.text_field :title, class: 'list-left w-50', placeholder: 'Section name' %> | ||
<%= f.submit value: 'Add Section', class: 'inline fl-r' %> | ||
<% end %> | ||
</p></div> | ||
</p> | ||
|
||
<% @sections.each do |section| %> | ||
<p class="list-left"> | ||
<%= form_tag("/sections/#{ section.id }", method: :delete, class: 'inline fl-r') do %> | ||
<%= submit_tag 'Delete' %> | ||
<% end %> | ||
<%= form_tag(edit_section_path( section ), method: :get, class: 'inline fl-r') do %> | ||
<%= submit_tag 'Rename' %> | ||
<% end %> | ||
<div class="list-left gray-box"> | ||
<span class="vertical-center"> | ||
<%= form_tag("/sections/#{ section.id }", method: :delete, class: 'inline') do %> | ||
<%= submit_tag 'Delete' %> | ||
<% end %> | ||
<%= form_tag(edit_section_path( section ), method: :get, class: 'inline') do %> | ||
<%= submit_tag 'Rename' %> | ||
<% end %> | ||
</span> | ||
|
||
<span class="mdl-typography--display-2 inline"> | ||
<%= link_to "#{ section.title }", section_subscriptions_path( section ) %> | ||
</span> | ||
</p> | ||
</div> | ||
|
||
|
||
<div class="pd-2"> | ||
<p> | ||
<%= form_for @subscription, url: "/sections/#{section.id}/subscriptions/#{@subscription.id}" do |f| %> | ||
<%= f.text_field :name, class: 'list-left w-50', placeholder: 'Subscription Name' %> | ||
<%= f.text_field :feed, class: 'list-left w-50', placeholder: 'RSS feed' %> | ||
<%= f.submit value: 'Add Feed', class: 'inline fl-r' %> | ||
</p> | ||
<% end %> | ||
<% section.subscriptions.each do |subscription| %> | ||
<p class="list-left"> | ||
<span class="vertical-center"> | ||
<%= form_tag("/subscriptions/#{ subscription.id }", method: :delete, class: 'inline') do %> | ||
<%= submit_tag 'Delete' %> | ||
<% end %> | ||
<%= form_tag(edit_section_subscription_path( section, subscription ), method: :get, class: 'inline') do %> | ||
<%= submit_tag 'Rename' %> | ||
<% end %> | ||
</span> | ||
|
||
<span class="mdl-typography--title inline"> | ||
<%= link_to subscription.name, section_subscription_path( section, subscription ) %> | ||
</span> | ||
</p> | ||
<% end %> | ||
</div> | ||
|
||
<% end %> | ||
</div> | ||
</div> |