From 286d06c60e27f6a11fdfd6edb41d0adb6649e5dd Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Tue, 20 Sep 2016 17:09:43 -0500 Subject: [PATCH] Add share buttons and wire them up --- app/assets/javascripts/content.js.coffee | 3 +++ app/views/content/_show.html.erb | 1 + app/views/content/form/_actions_dropdown.html.erb | 4 ++-- app/views/universes/edit.html.erb | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 app/assets/javascripts/content.js.coffee diff --git a/app/assets/javascripts/content.js.coffee b/app/assets/javascripts/content.js.coffee new file mode 100644 index 00000000..60cb2609 --- /dev/null +++ b/app/assets/javascripts/content.js.coffee @@ -0,0 +1,3 @@ +$(document).ready -> + $('.share').click -> + $('#share-modal').openModal() diff --git a/app/views/content/_show.html.erb b/app/views/content/_show.html.erb index 0091caf2..0bd976fd 100644 --- a/app/views/content/_show.html.erb +++ b/app/views/content/_show.html.erb @@ -10,6 +10,7 @@
<%= content.class.icon %> + <%= content.name %>
diff --git a/app/views/universes/edit.html.erb b/app/views/universes/edit.html.erb index 75ebd595..3206fe83 100644 --- a/app/views/universes/edit.html.erb +++ b/app/views/universes/edit.html.erb @@ -1,3 +1,5 @@ <%= form_for @content do |form| %> <%= render partial: 'content/form', locals: { f: form, content: @content } %> -<% end %> \ No newline at end of file +<% end %> + +<%= render partial: 'content/share', locals: { shared_content: @content} %>