WIP Rename "projects" page, make content editable
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
42
app/views/contributions/other/index.html.erb
Normal file
42
app/views/contributions/other/index.html.erb
Normal file
@@ -0,0 +1,42 @@
|
||||
<%= render HeaderComponent.new(title: "Contributions") %>
|
||||
|
||||
<%= render MainWithTabnavComponent.new(tabnav_partial: "shared/tabnav_contributions") do %>
|
||||
<% if @edit_content %>
|
||||
<section>
|
||||
<%= form_with model: [:admin, @content_title] do |form| %>
|
||||
<p class="mb-2">
|
||||
<%= form.label :content, @content_title.key.capitalize, class: 'font-bold' %>
|
||||
</p>
|
||||
<p class="flex gap-1">
|
||||
<%= form.text_field :content %>
|
||||
<%# <%= form.submit "Save", class: "btn-md btn-blue" %>
|
||||
<%= button_tag type: 'submit', name: nil, title: "Save", class: 'btn-md btn-icon btn-outline' do %>
|
||||
<%= render partial: "icons/save", locals: { custom_class: "text-blue-600 h-4 w-4 inline" } %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
</section>
|
||||
<section>
|
||||
<%= form_with model: [:admin, @content_body] do |form| %>
|
||||
<p class="mb-2">
|
||||
<%= form.label :content, @content_body.key.capitalize, class: 'font-bold' %>
|
||||
</p>
|
||||
<p>
|
||||
<%= form.textarea :content, class: "w-full h-96" %>
|
||||
</p>
|
||||
<p class="text-right">
|
||||
<%= link_to 'Cancel', request.path, class: 'btn-md btn-gray' %>
|
||||
<%= form.submit "Save", class: "ml-2 btn-md btn-blue" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</section>
|
||||
<% else %>
|
||||
<section>
|
||||
<% if @content_body.content.present? %>
|
||||
<%= markdown_to_html @content_body.content %>
|
||||
<% else %>
|
||||
No content yet
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user