Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions app/views/alchemy/admin/elements/_schedule.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,7 @@
<% end %>

<%= alchemy_form_for [:publish, :admin, element], remote: false, data: {turbo: true} do |f| %>
<div class="input">
<div class="input-row">
<div class="input-column">
<label for="element_public_on"><%= Alchemy::Element.human_attribute_name(:public_on) %></label>
<%= f.datetime_local_field :public_on, include_seconds: false %>
<%= f.error :public_on %>
</div>
<div class="input-column">
<label for="element_public_until"><%= Alchemy::Element.human_attribute_name(:public_until) %></label>
<%= f.datetime_local_field :public_until, include_seconds: false %>
<%= f.error :public_until %>
</div>
</div>
</div>
<%= render "alchemy/admin/elements/schedule_fields", f: %>
<div class="submit">
<button
type="button"
Expand Down
2 changes: 2 additions & 0 deletions app/views/alchemy/admin/elements/_schedule_fields.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%# this partials is meant for extensions that want to add more fields to the element schedule form %>
<%= render "alchemy/admin/elements/schedule_timestamps", f: %>
14 changes: 14 additions & 0 deletions app/views/alchemy/admin/elements/_schedule_timestamps.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="input">
<div class="input-row">
<div class="input-column">
<label for="element_public_on"><%= Alchemy::Element.human_attribute_name(:public_on) %></label>
<%= f.datetime_local_field :public_on, include_seconds: false %>
<%= f.error :public_on %>
</div>
<div class="input-column">
<label for="element_public_until"><%= Alchemy::Element.human_attribute_name(:public_until) %></label>
<%= f.datetime_local_field :public_until, include_seconds: false %>
<%= f.error :public_until %>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion app/views/alchemy/admin/pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<div class="input check_boxes">
<label class="control-label"><%= Alchemy.t(:page_status) %></label>
<div class="control_group">
<%= render 'alchemy/admin/pages/publication_fields' %>
<%= render 'alchemy/admin/pages/schedule_fields' %>

<%= page_status_checkbox(@page, :restricted) %>
<% if Alchemy.config.sitemap.show_flag %>
<%= page_status_checkbox(@page, :sitemap) %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/alchemy/admin/pages/_schedule_fields.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%# this partials is meant for extensions that want to add more fields to the page schedule form %>
<%= render 'alchemy/admin/pages/publication_fields' %>
Loading