mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
document sharing from documents#show
This commit is contained in:
parent
0267272dad
commit
cd41220a6e
@ -102,6 +102,6 @@ class DocumentsController < ApplicationController
|
||||
private
|
||||
|
||||
def document_params
|
||||
params.require(:document).permit(:title, :body, :deleted_at)
|
||||
params.require(:document).permit(:title, :body, :deleted_at, :privacy)
|
||||
end
|
||||
end
|
||||
|
||||
@ -18,6 +18,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @document.persisted? %>
|
||||
<%= link_to '#', class: "halfway-fab waves-effect waves-light share", style: 'width: 100%' do %>
|
||||
<div class="card <%= Document.color %> lighten-2">
|
||||
<div class="card-content white-text">
|
||||
<i class="material-icons left">share</i>
|
||||
Share document
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @document.persisted? %>
|
||||
<%= render partial: 'content/share', locals: { shared_content: @document } %>
|
||||
<% end %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user