]> git.openstreetmap.org Git - rails.git/blob - app/views/shared/_richtext_field.html.erb
Pass translation scope instead of keys to shared pagination
[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 richtext text-break"></div>
19       <div id="<%= id %>_help" class="tab-pane">
20         <div class="card bg-body-tertiary h-100">
21           <div class="card-body">
22             <%= render :partial => "shared/#{type}_help" %>
23           </div>
24         </div>
25       </div>
26     </div>
27     <aside class="col-sm-4 d-none d-sm-block richtext_help_sidebar"></aside>
28   </div>
29 </div>