Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update _like.html.erb with expanded wiki tools/edit limits #6912

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions app/views/like/_like.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@
<a <% if current_user && current_user.uid != node.uid %>data-confirm='Please be aware that you are editing a post by another contributor, a privilege you have only because you are an admin or co-author.' <% end %> class='btn btn-outline-secondary btn-circle btn-sm' href='/notes/edit/<%= node.id %>?t=<%= Time.now.to_i %><% if params[:controller] == "questions" %>&redirect=question&template=question<% end %>'>
<i class='ml-1 ff fa fa-pencil'></i>
</a>
<% end %>
<% if node.type == 'page' %>
<% elsif node.type == 'page' %>
<% if node.has_tag('locked') && (current_user ? (current_user.role != "moderator" && current_user.role != "admin") : true) %>
<a href="/wiki/locked" class='btn btn-outline-secondary btn-circle btn-sm'>
<i class="ml-1 ff fa fa-lock"></i>
</a>
<% elsif current_user && current_user.first_time_poster %>
<a class='btn btn-outline-secondary btn-circle btn-sm' rel="tooltip" title="Please post a question or other content before editing the wiki. Click to learn why." data-placement="top" href="https://publiclab.org/notes/tester/04-23-2016/new-moderation-system-for-first-time-posters">
<i class="ml-1 ff fa fa-lock"></i>
</a>
<% else %>
<a <% if current_user && current_user.uid != node.uid %>data-confirm='Please be aware that you are editing a post by another contributor, a privilege you have only because you are an admin or co-author.' <% end %> class='btn btn-outline-secondary btn-circle btn-sm' href='<%= @node.edit_path %>?t=<%= Time.now.to_i %>'>
<i class='ml-1 ff fa fa-pencil'></i>
<i class='ml-1 ff fa fa-pencil'></i>
</a>
<% end %>
<% end %>
<% end %>

Expand Down Expand Up @@ -55,6 +64,10 @@
<input type='submit' class='btn btn-primary' value='Give'/> &nbsp; <a _target='blank' href='/wiki/barnstars'>Learn more</a>
</form>
<% end %>

<p><a class="btn btn-sm btn-outline-secondary" rel="tooltip" title="Try the beta inline Rich Wiki editor." data-placement="top" href="<%= node.path %>?raw=true">
<i style="color:#0c8;" class="fa fa-pencil"></i>
</a></p>

<% if logged_in_as(['admin', 'moderator']) || (current_user && current_user.uid == node.uid) %>

Expand All @@ -69,7 +82,7 @@
</li>

<a href='/notes/delete/<%= node.id %>' class='btn btn-outline-secondary btn-sm' data-confirm='Are you sure?'>
<i class='fa fa-trash'></i><span class='d-none d-lg-inline'> Delete</span>
<i class='fa fa-trash'></i><span class='d-none d-lg-inline'></span>
</a>
<a href='/notes/raw/<%= node.id %>' class='btn btn-outline-secondary btn-sm'>
<i class='fa fa-code'></i><span class='d-none d-lg-inline'> Raw</span>
Expand Down