creddit/app/views/application/_sidebar.html.slim

24 lines
949 B
Text
Raw Permalink Normal View History

2015-07-15 00:26:23 -04:00
.sidebar
.input-group
input.form-control type="text" placeholder="search"
span.input-group-btn
button.btn.btn-default type="button"
span.glyphicon.glyphicon-search aria-hidden="true"
2015-12-14 13:28:39 -05:00
- if policy(:post).new?
- if @subcreddit && @subcreddit.id
= link_to 'Submit a new link', new_subcreddit_post_path(@subcreddit), class: 'button btn btn-primary btn-block'
= link_to 'Submit a new text post', new_subcreddit_post_path(@subcreddit), class: 'button btn btn-primary btn-block'
- if policy(:subcreddit).new?
= link_to 'Create your own subcreddit', new_subcreddit_path, class: 'button btn btn-primary btn-block'
2015-07-15 00:26:23 -04:00
2015-12-14 13:28:39 -05:00
- if @subcreddit && @subcreddit.id && policy(@subcreddit).edit?
2015-07-15 00:26:23 -04:00
.title Moderation Tools
.box
ul
li= link_to 'subcreddit settings', edit_subcreddit_path(@subcreddit)
.title Moderators
.box
ul
2015-08-06 15:10:31 -04:00
li= link_to @subcreddit.owner_username, @subcreddit.owner