mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Add share buttons and wire them up
This commit is contained in:
parent
d80f6f9596
commit
286d06c60e
3
app/assets/javascripts/content.js.coffee
Normal file
3
app/assets/javascripts/content.js.coffee
Normal file
@ -0,0 +1,3 @@
|
||||
$(document).ready ->
|
||||
$('.share').click ->
|
||||
$('#share-modal').openModal()
|
||||
@ -10,6 +10,7 @@
|
||||
<div class="card-content">
|
||||
<div class="card-title center">
|
||||
<span class="<%= content.class.color %>-text"><i class="material-icons right"><%= content.class.icon %></i></span>
|
||||
<a href="#" title="Share" class="share <%= content.class.color %>-text"><i class="material-icons right">share</i></a>
|
||||
<%= content.name %>
|
||||
</div>
|
||||
<ul class="tabs">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
<ul id='options-menu' class='dropdown-content'>
|
||||
<%# TODO: something with these %>
|
||||
<li><a href="#!">Share this <%= content.class.to_s.downcase %></a></li>
|
||||
<li><a href="#!" class="share">Share this <%= content.class.to_s.downcase %></a></li>
|
||||
<li><a href="#!">Do something else</a></li>
|
||||
<li class="divider"></li>
|
||||
<% if content.persisted? %>
|
||||
@ -17,4 +17,4 @@
|
||||
:confirm => 'Are you sure? This action cannot be undone!' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
<%= form_for @content do |form| %>
|
||||
<%= render partial: 'content/form', locals: { f: form, content: @content } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= render partial: 'content/share', locals: { shared_content: @content} %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user