Permalink
Browse files

bundle and shit

bundle and shit
  • Loading branch information...
1 parent 381d055 commit a413de940bb490f80fcc77e3c926edefcb297755 blake committed Feb 17, 2017
View
@@ -47,6 +47,8 @@ gem 'jbuilder', '~> 2.0'
gem 'json'
+# tinymce-rails
+gem 'tinymce-rails'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
View
@@ -192,6 +192,8 @@ GEM
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.6)
+ tinymce-rails (4.5.3)
+ railties (>= 3.1.1)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
@@ -240,6 +242,7 @@ DEPENDENCIES
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
thor
+ tinymce-rails
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
@@ -13,6 +13,7 @@
//= require jquery
//= require jquery_ujs
//= require_tree .
+//= require tinymce
$(document).on('ready page:load', function() {
@@ -0,0 +1,3 @@
+.mce-tinymce.mce-container.mce-panel {
+ width: 100%;
+}
@@ -215,13 +215,13 @@
<h2><%= @card.name %> Rulings</h2>
- <% @card.rulings.each do |ruling| %>
+ <% @card.rulings.each do |ruling| %>
- <p><strong><%= ruling['date'] %>:</strong> <%= ruling['text'] %></p>
+ <p><strong><%= ruling['date'] %>:</strong> <%= ruling['text'] %></p>
- <% end %>
+ <% end %>
- </div>
+ </div>
<% end %>
@@ -1,5 +1,6 @@
<% @pcard = current_user.pcards.find_by! card_id: card.multiverseid %>
+
<div class="pcard" id="card<%= @pcard.id %>">
<div class="pcard-amount"><%=@pcard.amount %></div>
@@ -57,7 +57,53 @@
<label class="modal-label">Description</label>
- <textarea name="description" class="modal-input" rows="12"><% if @pcard.amount >= 4 %>4<% else %><%= @pcard.amount %><% end %><%= " X #{@card.name} - #{@card.setName} | Standard Magic The Gathering Card" %></textarea>
+ <%= tinymce %>
+
+ <textarea class="tinymce" name="description" rows="20">
+
+ <p><strong>Card Name:</strong> <%= @card.name %></p>
+
+ <p><strong>Card Set:</strong> <%= @card.setName %></p>
+
+ <p>
+
+ <strong>Legal Sets:</strong>
+
+ <% @card['info']['legalities'].each do |set| %>
+
+ <%= set["format"] %><%= ',' unless set == @card['info']['legalities'].last %>
+
+ <% end %>
+
+ </p>
+
+ <div>
+
+ <strong>Card Text:</strong>
+
+ <p><%= raw @card.text %></p>
+
+ <p><%= @card.flavor %></p>
+
+ </div>
+
+ <div>
+
+ <% if @card.rulings.count >= 1 %>
+
+ <strong>Card Rulings</strong>
+
+ <% @card.rulings.each do |ruling| %>
+
+ <p><strong><%= ruling['date'] %>:</strong> <%= ruling['text'] %></p>
+
+ <% end %>
+
+ <% end %>
+
+ </div>
+
+ </textarea>
</div>
View
@@ -0,0 +1,6 @@
+toolbar:
+ - styleselect | bold italic | undo redo
+ - image | link
+plugins:
+ - image
+ - link

0 comments on commit a413de9

Please sign in to comment.