]> git.openstreetmap.org Git - rails.git/blob - app/views/shared/_richtext_field.html.erb
Remove unused timer from new note js controller
[rails.git] / app / views / shared / _richtext_field.html.erb
1 <div class="richtext_container">
2   <ul class="nav nav-tabs mb-3">
3     <li class="nav-item">
4       <button type="button" class="nav-link active" data-bs-toggle="tab" data-bs-target="#<%= id %>_edit"><%= t(".edit") %></button>
5     </li>
6     <li class="nav-item">
7       <button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#<%= id %>_preview"><%= t(".preview") %></button>
8     </li>
9     <li class="nav-item d-block d-sm-none">
10       <button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#<%= id %>_help"><%= t(".help") %></button>
11     </li>
12   </ul>
13   <div class="row g-3">
14     <div class="tab-content col-sm-8">
15       <div id="<%= id %>_edit" class="tab-pane show active">
16         <%= builder.text_area(attribute, options.merge(:wrapper => false, "data-preview-url" => preview_url(:type => type))) %>
17       </div>
18       <div id="<%= id %>_preview" class="tab-pane">
19         <div class="richtext_placeholder text-center py-5" hidden>
20           <div class="spinner-border" role="status">
21             <span class="visually-hidden"><%= t("browse.start_rjs.loading") %></span>
22           </div>
23         </div>
24         <div class="richtext text-break"></div>
25       </div>
26       <div id="<%= id %>_help" class="tab-pane">
27         <div class="card bg-body-tertiary h-100">
28           <div class="card-body">
29             <%= render :partial => "shared/#{type}_help" %>
30           </div>
31         </div>
32       </div>
33     </div>
34     <aside class="col-sm-4 d-none d-sm-block richtext_help_sidebar"></aside>
35   </div>
36 </div>