annotate app/views/pastes/new.html.erb @ 402:a18e19139f57

Markdown preview \o/
author nanaya <me@myconan.net>
date Sun, 06 Sep 2015 04:20:50 +0900
parents 851432f21603
children e0626046579a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
1 <% provide :title, t(".title") %>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
2
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
3 <%= form_for @paste do |f| %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
4 <%= render "shared/filter_spam" %>
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
5
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
6 <div class="form-group <%= error_class f.object, :paste %>">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
7 <%= f.text_area :paste, :autofocus => true, :class => "form-control paste-paste js-paste-paste", :rows => 20 %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 </div>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 56
diff changeset
9
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
10
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
11 <div class="row"><div class="col-xs-12">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
12 <%= link_to t(".preview_md"), "#",
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
13 :class => "btn btn-default js-paste-preview-md pull-right"
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
14 %>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
15 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
16
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
17 <div class="form-horizontal">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
18 <div class="form-group <%= error_class f.object, :key %>">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
19 <%= f.label :key, t(".deletion_key"), :class => "col-sm-2 control-label" %>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
20 <div class="col-sm-3">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
21 <%= f.text_field :key, :class => "form-control" %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
22 </div>
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
23 </div>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
24
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
25 <div class="form-group">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
26 <label class="control-label col-sm-2"><%= t(".privacy.label") %></label>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
27
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
28 <div class="col-sm-10">
380
2ddd61aca2c8 I18n. And refactor paste privacy settings form.
nanaya <me@myconan.net>
parents: 379
diff changeset
29 <% paste_privacy_options.each do |label, value| %>
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
30 <div class="radio">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
31 <label>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
32 <%= f.radio_button :is_private, value %>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
33 <%= t(".privacy.#{label}") %>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
34 </label>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
35 </div>
380
2ddd61aca2c8 I18n. And refactor paste privacy settings form.
nanaya <me@myconan.net>
parents: 379
diff changeset
36 <% end %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
37 </div>
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
38 </div>
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
39
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
40 <div class="form-group"><div class="col-sm-offset-2 col-sm-10">
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
41 <%= f.button :class => "btn btn-primary" %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
42
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
43 <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %>
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
44 </div></div>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
45 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
46 <% end %>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
47
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
48 <div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
49 <div class="modal-dialog" role="document">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
50 <div class="modal-content">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
51 <div class="modal-body js-paste-preview-md-box">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
52 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
53 <div class="modal-footer">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
54 <button type="button" class="btn btn-default" data-dismiss="modal">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
55 <%= t(".close") %>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
56 </button>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
57 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
58 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
59 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
60 </div>