mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 16:46:42 +01:00
33 lines
1.4 KiB
Plaintext
33 lines
1.4 KiB
Plaintext
<%= bootstrap_form_for [@problem, @translation], layout: :basic do |f| %>
|
|
<%= f.text_field :title %>
|
|
<ul class="nav nav-tabs" id="translationTab" role="tablist">
|
|
<li class="nav-item">
|
|
<button class="nav-link active" id="source-tab" data-bs-toggle="tab" data-bs-target="#source" type="button" role="tab" aria-controls="source" aria-selected="true"><%= t('.source_code') %></button>
|
|
</li>
|
|
<li class="nav-item">
|
|
<button class="nav-link" id="preview-tab" data-bs-toggle="tab" data-bs-target="#preview" type="button" role="tab" aria-controls="preview" aria-selected="false"><%= t('.preview') %></button>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content" id="translationTabContent">
|
|
<div class="tab-pane show active" id="source" role="tabpanel" aria-labelledby="source-tab">
|
|
<%= f.text_area :content, placeholder: t('.translation_source_explanation') %>
|
|
</div>
|
|
<div class="tab-pane" id="preview" role="tabpanel" aria-labelledby="preview-tab">
|
|
<div class="card mb-3">
|
|
<div class="card-body problem-content">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="alert alert-info">
|
|
<%= t '.copyright_warning_html' %>
|
|
<% if not user_signed_in? %>
|
|
<%= t '.not_logged_in_warning' %>
|
|
<% end %>
|
|
</div>
|
|
<%= f.primary %>
|
|
<% if user_signed_in? and current_user.admin? %>
|
|
<%= f.button t('.save_and_accept'), type: :submit, name: "accept", value: true, class: "btn btn-success" %>
|
|
<% end %>
|
|
<% end %>
|