Sha256: 3f2b62585a19bd1fc3a53954bc30a31b2dccd796ad03ebf377a7b8e05ac14677

Contents?: true

Size: 1.47 KB

Versions: 3

Compression:

Stored size: 1.47 KB

Contents

<div class="field">
  <% if f.object.pathable? %>
    <%= labelled_field(f.text_field(:path_segment),
                       "Path segment",
                       description: "Only alpanumeric characters and dashes " \
                         "are allowed.") %>
  <% else %>
    <div class="field">
      <label>Path segment</label>
      <p class="description">
        Unable to add a path segment,
        please add one to
        <%= link_to("this page's parent",
                    edit_admin_page_path(f.object.parent,
                                         locale: f.object.locale,
                                         anchor: "metadata")) %>
        first.
      </p>
    </div>
  <% end %>
</div>

<div class="field">
  <%= f.label_for :meta_image, "Image" %>
  <p class="description">
    Image displayed when sharing on social media.
    Will fall back to the primary image if absent.
    Recommended size is at least 1200x630.
  </p>
  <% if @page.meta_image %>
    <p>
      <%= dynamic_image_tag @page.meta_image, size: "250x" %>
      <br>
      <%= link_to("Delete image",
                  delete_meta_image_admin_page_path(@locale, @page),
                  method: "delete",
                  class: "delete",
                  data: { confirm: "Are you sure?" }) %>
    </p>
  <% end %>
  <%= f.file_field :meta_image %>
</div>

<% @page.template_config.metadata_blocks do |block_name, block_options| %>
  <%= page_block_field(f, block_name, block_options) %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pages_core-3.6.1 app/views/admin/pages/_edit_metadata.html.erb
pages_core-3.6.0 app/views/admin/pages/_edit_metadata.html.erb
pages_core-3.5.1 app/views/admin/pages/_edit_metadata.html.erb