Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade feature Custom Redirections #274

Merged
merged 16 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,16 @@
}
}
}

code {
border: 1px solid #adadad;
background-color: #eee;
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-weight: normal;
font-size: 13px;
color: #1a181d;
display: inline;
max-width: 100%;
word-wrap: break-word;
padding: 0.0625rem 0.3125rem 0.0625rem;
}
ElviaBth marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
<div>
<%= form.text_field :origin, help_text: t(".origin_help") %>
<%= form.text_field :destination, help_text: t(".destination_help") %>
<%= form.check_box :active %>
<%= form.check_box :pass_query, help_text: t(".pass_query_help").html_safe %>
<div class="flex flex-col">
<div class="mb-6">
<%= form.text_field :origin, class: "h-12 w-full" %>
<p class="help-text">
<%= t(".origin_help") %>
</p>
</div>
<div class="mb-6">
<%= form.text_field :destination, class: "h-12 w-full" %>
<p class="help-text">
<%= t(".destination_help") %>
</p>
</div>
<%= form.check_box :active, class: "mb-6" %>
<div class="mb-6">
<%= form.check_box :pass_query %>
</div>
<p class="help-text">
<%= t(".pass_query_help").html_safe %>
</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<%= decidim_form_for(@form, url: custom_redirect_path, method: :patch, html: { class: :form }) do |f| %>
<%= decidim_form_for(@form, url: custom_redirect_path, method: :patch, html: { class: "form-defaults form new_custom_redirect_" }) do |f| %>
<div class="card">
<div class="card-divider">
<div class="bg-gray-6 p-4 rounded-t">
<h2 class="card-title"><%= t ".title" %></h2>
</div>
<div class="card-section">
<div class="card-section p-4">
<%= render partial: "form", object: f %>
</div>
</div>
<div class="button--double form-general-submit">
<%= f.submit t(".save") %>
<div class="flex items-center justify-center mt-12 w-full text-white form-general-submit">
<%= f.submit t(".save"), class: "button button__lg button__secondary" %>
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="card">
<div class="card-divider">
<h2 class="card-title">
<div class="bg-gray-6 p-4 rounded-t">
<h2 class="card-title flex flex-row">
<%= t(".title") %>
<%= link_to t(".new"), decidim_admin_decidim_awesome.new_custom_redirect_path, class: "button tiny button--title" %>
<%= link_to t(".new"), decidim_admin_decidim_awesome.new_custom_redirect_path, class: "button button__secondary button__xs tiny button--title text-white" %>
</h2>
</div>
<div class="card-section">
<p class="help-text"><%= t(".description").html_safe %></p>
<div class="row column decidim_awesome-form">
<div class="card-section p-4">
<p class="help-text -mt-2 mb-4"><%= t(".description").html_safe %></p>
<div class="table-scroll decidim_awesome-form">
<table class="table-list custom-redirections-table">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<%= decidim_form_for(@form, url: custom_redirects_path, html: { class: :form }) do |f| %>
<%= decidim_form_for(@form, url: custom_redirects_path, html: { class: "form-defaults form new_custom_redirect_" }) do |f| %>
<div class="card">
<div class="card-divider">
<div class="bg-gray-6 p-4 rounded-t">
<h2 class="card-title"><%= t ".title" %></h2>
</div>
<div class="card-section">
<div class="card-section p-4">
<%= render partial: "form", object: f %>
</div>
</div>
<div class="button--double form-general-submit">
<%= f.submit t(".save") %>
<div class="flex items-center justify-center mt-12 w-full text-white form-general-submit">
<%= f.submit t(".save"), class: "button button__lg button__secondary" %>
</div>
<% end %>
3 changes: 1 addition & 2 deletions lib/decidim/decidim_awesome/awesome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ module DecidimAwesome
# config.consider_all_requests_local = false

config_accessor :custom_redirects do
# {}
:disabled
{}
end

# these settings do not follow the :disabled convention but
Expand Down
Loading
Loading