5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 20:56:21 +00:00

Merge branch 'rails' into issue-13096
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-04-25 11:24:38 -03:00
commit 09ecc8f0b4
9 changed files with 32 additions and 21 deletions

View file

@ -80,7 +80,7 @@ class DeployDistributedPress < Deploy
# Devuelve las URLs de todos los protocolos
def urls
protocol_urls + gateway_urls
gateway_urls
end
private
@ -94,15 +94,6 @@ class DeployDistributedPress < Deploy
end || []
end
# @return [Array]
def protocol_urls
remote_info.dig(:distributed_press, :protocols)&.select do |_, enabled|
enabled
end&.map do |protocol, _|
"#{protocol}://#{site.hostname}"
end || []
end
# El cliente de la API
#
# TODO: cuando soportemos más, tiene que haber una relación entre

View file

@ -5,6 +5,8 @@
- cache_if @usuarie, [@site, I18n.locale] do
= render 'sites/status', site: @site
= render 'sites/build', site: @site, class: 'btn-block'
%h3= t('posts.new')
%table.mb-3
- @site.layouts.sort_by(&:humanized_name).each do |layout|
@ -33,8 +35,6 @@
type: 'info',
link: site_usuaries_path(@site)
= render 'sites/build', site: @site
- if @site.design.credits
= render 'bootstrap/alert' do
= sanitize_markdown @site.design.credits
@ -49,7 +49,8 @@
- next if param == 'q'
%input{ type: 'hidden', name: param, value: value }
.form-group.flex-grow-0.m-0
%input.form-control.border.border-magenta{ type: 'search', placeholder: 'Buscar', name: 'q', value: @filter_params[:q] }
%label.sr-only{for: 'q'}= t('.search')
%input#q.form-control.border.border-magenta{ type: 'search', placeholder: t('.search'), name: 'q', value: @filter_params[:q] }
%input.sr-only{ type: 'submit' }
- if @site.locales.size > 1

View file

@ -3,7 +3,7 @@
method: :post,
class: 'form-inline inline' do
= submit_tag site.enqueued? ? t('sites.enqueued') : t('sites.enqueue'),
class: 'btn no-border-radius',
class: "btn no-border-radius #{local_assigns[:class]}",
title: site.enqueued? ? t('help.sites.enqueued') : t('help.sites.enqueue'),
data: { disable_with: t('sites.enqueued') },
disabled: site.enqueued?

View file

@ -55,7 +55,7 @@
layouts: site.incompatible_layouts.to_sentence)
.row.row-cols-1.row-cols-md-2.designs
-# Demasiado complejo para un f.collection_radio_buttons
- Design.all.find_each do |design|
- Design.all.order(priority: :desc).each do |design|
.design.col.d-flex.flex-column
.custom-control.custom-radio
= f.radio_button :design_id, design.id,

View file

@ -430,7 +430,7 @@ en:
title: 'Design'
actions: 'Information about this design'
url: 'Demo'
licencia: 'License'
license: 'License'
licencia:
title: 'License for the site and everything published on it'
url: 'Read the license'
@ -544,7 +544,8 @@ en:
remove_filter: 'Back'
remove_filter_help: 'Remove the filter: %{filter}'
categories: 'Everything'
index: 'Posts'
index:
search: 'Search'
edit: 'Edit'
preview:
btn: 'Preliminary version'

View file

@ -552,7 +552,8 @@ es:
filter: 'Filtrar'
remove_filter: 'Volver'
remove_filter_help: 'Quitar este filtro: %{filter}'
index: 'Artículos'
index:
search: 'Buscar'
edit: 'Editar'
preview:
btn: 'Versión preliminar'

View file

@ -0,0 +1,5 @@
class AddPriorityToDesigns < ActiveRecord::Migration[6.1]
def change
add_column :designs, :priority, :integer
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_10_22_225449) do
ActiveRecord::Schema.define(version: 2023_04_15_153231) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@ -217,6 +217,7 @@ ActiveRecord::Schema.define(version: 2021_10_22_225449) do
t.boolean "disabled", default: false
t.text "credits"
t.string "designer_url"
t.integer "priority"
end
create_table "indexed_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
@ -380,6 +381,7 @@ ActiveRecord::Schema.define(version: 2021_10_22_225449) do
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
create_trigger("indexed_posts_before_insert_update_row_tr", :compatibility => 1).
on("indexed_posts").
before(:insert, :update) do

View file

@ -6,6 +6,7 @@
disabled: true
description_en: "Upload your own theme. [This feature is in development, help us!](https://sutty.nl/en/#contact)"
description_es: "Subir tu propio diseño. [Esta posibilidad está en desarrollo, ¡ayudanos!](https://sutty.nl/#contacto)"
priority: '0'
- name_en: 'I want you to develop a site for me'
name_es: 'Quiero que desarrollen mi sitio'
gem: 'sutty-theme-custom'
@ -13,6 +14,7 @@
disabled: true
description_en: "If you want us to develop your site, you're welcome to [contact us!](https://sutty.nl/en/#contact) :)"
description_es: "Si querés que desarrollemos tu sitio, [escribinos](https://sutty.nl/#contacto) :)"
priority: '2'
- name_en: 'Minima'
name_es: 'Mínima'
gem: 'sutty-minima'
@ -20,6 +22,7 @@
description_en: "Sutty Minima is based on [Minima](https://jekyll.github.io/minima/), a blog-focused theme for Jekyll."
description_es: 'Sutty Mínima es una plantilla para blogs basada en [Mínima](https://jekyll.github.io/minima/).'
license: 'https://0xacab.org/sutty/jekyll/minima/-/blob/master/LICENSE.txt'
priority: '100'
- name_en: 'Sutty'
name_es: 'Sutty'
gem: 'sutty-jekyll-theme'
@ -29,6 +32,7 @@
license: 'https://0xacab.org/sutty/jekyll/sutty-jekyll-theme/-/blob/master/LICENSE.txt'
credits_es: 'Sutty es parte de la economía solidaria :)'
credits_en: 'Sutty is a solidarity economy project!'
priority: '90'
- name_en: 'Self-managed Book Publisher'
name_es: 'Editorial Autogestiva'
gem: 'editorial-autogestiva-jekyll-theme'
@ -38,6 +42,7 @@
license: 'https://0xacab.org/sutty/jekyll/editorial-autogestiva-jekyll-theme/-/blob/master/LICENSE.txt'
credits_es: 'Esta plantilla fue inspirada en el trabajo de las [editoriales autogestivas](https://sutty.nl/plantillas-para-crear-cat%C3%A1logos-de-editoriales-autogestivas/)'
credits_en: 'This theme is inspired by [independent publishing projects](https://sutty.nl/en/new-template-for-publishing-projects/)'
priority: '50'
- name_en: 'Donations'
name_es: 'Donaciones'
gem: 'sutty-donaciones-jekyll-theme'
@ -47,6 +52,7 @@
license: 'https://0xacab.org/sutty/jekyll/sutty-donaciones-jekyll-theme/-/blob/master/LICENSE.txt'
credits_es: 'Diseñamos esta plantilla para [visibilizar campañas de donaciones](https://sutty.nl/plantilla-para-donaciones/) durante la cuarentena.'
credits_en: 'We designed this theme to increase [visibility for donation requests](https://sutty.nl/template-for-donations/) during the quarantine.'
priority: '80'
- name_en: 'Support campaign'
name_es: 'Adhesiones'
gem: 'adhesiones-jekyll-theme'
@ -57,6 +63,7 @@
credits_es: 'Desarrollamos esta plantilla junto con [Librenauta](https://sutty.nl/plantilla-para-campa%C3%B1as-de-adhesiones/)'
credits_en: 'This template was made in collaboration with Librenauta'
designer_url: 'https://copiona.com/donaunbit/'
priority: '60'
- name_en: 'Community Radio'
name_es: 'Radio comunitaria'
gem: 'radios-comunitarias-jekyll-theme'
@ -67,6 +74,7 @@
credits_es: 'Desarrollamos esta plantilla junto con Librenauta en 15 horas :)'
credits_en: 'This template was made in collaboration with Librenauta in 15 hours!'
designer_url: 'https://copiona.com/donaunbit/'
priority: '70'
- name_en: 'Resource toolkit'
name_es: 'Recursero'
gem: 'recursero-jekyll-theme'
@ -74,10 +82,12 @@
disabled: true
description_en: "We're working towards adding more themes for you to use. [Contact us!](https://sutty.nl/en/#contact)"
description_es: "Estamos trabajando para que puedas tener más diseños. [¡Escribinos!](https://sutty.nl/#contacto)"
- name_en: 'Other themes'
name_es: 'Mi propio diseño'
priority: '3'
- name_en: 'More themes'
name_es: 'Más plantillas'
gem: 'sutty-theme-own'
url: 'https://jekyllthemes.org'
disabled: true
description_en: "We're working towards adding more themes for you to use. [Contact us!](https://sutty.nl/en/#contact)"
description_es: "Estamos trabajando para que puedas tener más diseños. [¡Escribinos!](https://sutty.nl/#contacto)"
priority: '1'