diff app/views/pastes/new.html.erb @ 417:080dd141898c

Add support for explicit highlighter languages
author nanaya <me@myconan.net>
date Mon, 14 Sep 2015 14:50:35 +0900
parents a2f8e5c80769
children 967233b26404
line wrap: on
line diff
--- a/app/views/pastes/new.html.erb	Mon Sep 14 14:48:36 2015 +0900
+++ b/app/views/pastes/new.html.erb	Mon Sep 14 14:50:35 2015 +0900
@@ -14,33 +14,39 @@
       %>
   </div></div>
 
-  <div class="row">
-    <div class="form-group col-sm-3 <%= error_class f.object, :key %>">
+  <div class="row"><div class="col-sm-3">
+    <div class="form-group <%= error_class f.object, :key %>">
       <%= f.label :key, t(".deletion_key") %>
       <%= f.text_field :key, :class => "form-control" %>
     </div>
-  </div>
 
-  <div class="form-group">
-    <label><%= t(".privacy.label") %></label>
+    <div class="form-group">
+      <label><%= t(".privacy.label") %></label>
 
-    <div class="radio-container">
-      <% paste_privacy_options.each do |label, value| %>
-        <div class="radio">
-          <label>
-            <%= f.radio_button :is_private, value %>
-            <%= t(".privacy.#{label}") %>
-          </label>
-        </div>
-      <% end %>
+      <div class="radio-container">
+        <% paste_privacy_options.each do |label, value| %>
+          <div class="radio">
+            <label>
+              <%= f.radio_button :is_private, value %>
+              <%= t(".privacy.#{label}") %>
+            </label>
+          </div>
+        <% end %>
+      </div>
     </div>
-  </div>
+
+    <div class="form-group">
+      <%= f.label :language %>
+
+      <%= f.select :language, [], { :prompt => t(".language_none") }, :class => "form-control" %>
+    </div>
 
-  <div class="form-group">
-    <%= f.button :class => "btn btn-primary" %>
+    <div class="form-group">
+      <%= f.button :class => "btn btn-primary" %>
 
-    <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %>
-  </div>
+      <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %>
+    </div>
+  </div></div>
 <% end %>
 
 <div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog">