Mercurial > zeropaste
annotate 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 |
rev | line source |
---|---|
398 | 1 <% provide :title, t(".title") %> |
402 | 2 |
398 | 3 <%= form_for @paste do |f| %> |
379 | 4 <%= render "shared/filter_spam" %> |
398 | 5 |
6 <div class="form-group <%= error_class f.object, :paste %>"> | |
7 <%= f.text_area :paste, :autofocus => true, :class => "form-control paste-paste js-paste-paste", :rows => 20 %> | |
2 | 8 </div> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
9 |
402 | 10 |
11 <div class="row"><div class="col-xs-12"> | |
12 <%= link_to t(".preview_md"), "#", | |
13 :class => "btn btn-default js-paste-preview-md pull-right" | |
14 %> | |
403 | 15 </div></div> |
16 | |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
17 <div class="row"><div class="col-sm-3"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
18 <div class="form-group <%= error_class f.object, :key %>"> |
403 | 19 <%= f.label :key, t(".deletion_key") %> |
20 <%= f.text_field :key, :class => "form-control" %> | |
21 </div> | |
402 | 22 |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
23 <div class="form-group"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
24 <label><%= t(".privacy.label") %></label> |
379 | 25 |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
26 <div class="radio-container"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
27 <% paste_privacy_options.each do |label, value| %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
28 <div class="radio"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
29 <label> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
30 <%= f.radio_button :is_private, value %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
31 <%= t(".privacy.#{label}") %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
32 </label> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
33 </div> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
34 <% end %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
35 </div> |
379 | 36 </div> |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
37 |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
38 <div class="form-group"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
39 <%= f.label :language %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
40 |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
41 <%= f.select :language, [], { :prompt => t(".language_none") }, :class => "form-control" %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
42 </div> |
379 | 43 |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
44 <div class="form-group"> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
45 <%= f.button :class => "btn btn-primary" %> |
403 | 46 |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
47 <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
48 </div> |
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
49 </div></div> |
2 | 50 <% end %> |
402 | 51 |
409 | 52 <div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog"> |
402 | 53 <div class="modal-dialog" role="document"> |
54 <div class="modal-content"> | |
55 <div class="modal-body js-paste-preview-md-box"> | |
56 </div> | |
57 <div class="modal-footer"> | |
58 <button type="button" class="btn btn-default" data-dismiss="modal"> | |
408 | 59 <%= t("buttons.close") %> |
402 | 60 </button> |
61 </div> | |
62 </div> | |
63 </div> | |
64 </div> |