diff --git a/Dockerfile b/Dockerfile index f2a0cf5e8..e623135b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,7 +59,7 @@ COPY --from=build /rails /rails # Run and own only the runtime files as a non-root user for security RUN groupadd --system --gid 1000 rails && \ useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ - mkdir -p storage tmp && \ + mkdir -p storage tmp/pids tmp/cache tmp/sockets && \ chown -R rails:rails db log storage tmp USER 1000:1000 diff --git a/app/controllers/admin/splashpages_controller.rb b/app/controllers/admin/splashpages_controller.rb index 6b40d0d14..ad4f5e9bc 100644 --- a/app/controllers/admin/splashpages_controller.rb +++ b/app/controllers/admin/splashpages_controller.rb @@ -50,7 +50,7 @@ def splashpage_params :include_venue, :include_registrations, :include_tickets, :include_lodgings, :include_sponsors, :include_social_media, - :include_booths) + :include_booths, :include_past_editions) end end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 157c6b122..2a236ed9c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -40,6 +40,18 @@ def time_with_timezone(time) time.strftime('%F %R') + ' ' + @conference.timezone.to_s end + # Returns past editions (conferences) from the same organization + def past_editions_for(conference) + return [] unless conference.present? + + Conference.past + .where(organization_id: conference.organization_id) + .where.not(id: conference.id) + .order(start_date: :desc) + .limit(10) + .select(:id, :short_title, :title, :start_date, :end_date) + end + # Set resource_name for devise so that we can call the devise help links (views/devise/shared/_links) from anywhere (eg sign_up form in proposals#new) def resource_name :user diff --git a/app/views/admin/splashpages/_form.html.haml b/app/views/admin/splashpages/_form.html.haml index 644561586..80e128476 100644 --- a/app/views/admin/splashpages/_form.html.haml +++ b/app/views/admin/splashpages/_form.html.haml @@ -17,6 +17,10 @@ Include confirmed = (t'booth').pluralize in the program? + .checkbox + %label + = f.check_box :include_past_editions + Display past editions in navigation? .checkbox %label = f.check_box :include_registrations diff --git a/app/views/conferences/_past_editions_nav.haml b/app/views/conferences/_past_editions_nav.haml new file mode 100644 index 000000000..b4e85cce5 --- /dev/null +++ b/app/views/conferences/_past_editions_nav.haml @@ -0,0 +1,14 @@ += content_for :splash_nav do + - past_editions = past_editions_for(conference) + - if past_editions.any? + %li.dropdown + %a.dropdown-toggle{"data-toggle" => "dropdown", href: '#', id: "past-editions-dropdown"} + = t('Past Editions') + %b.caret + %ul.dropdown-menu + - past_editions.each do |edition| + %li + = link_to conference_path(edition.short_title) do + = edition.title + %br + %small.text-muted= date_string(edition.start_date, edition.end_date) diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index 7a72be58d..3c3278753 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -58,6 +58,10 @@ sponsors: @sponsors + -# past editions navigation + - if @conference.splashpage.include_past_editions + = render 'past_editions_nav', conference: @conference + -# footer - if @conference.splashpage.include_social_media - if @conference.contact.has_social_media? diff --git a/config/locales/views/layouts/en.yml b/config/locales/views/layouts/en.yml index da4f2198d..c98f31051 100644 --- a/config/locales/views/layouts/en.yml +++ b/config/locales/views/layouts/en.yml @@ -35,6 +35,7 @@ en: Resources: Resources Revision History: Revision History Toggle navigation: Toggle navigation + Past Editions: Past Editions Notifications: Notifications See all unread Comments: See all unread Comments See all Comments: See all Comments diff --git a/config/locales/views/layouts/es.yml b/config/locales/views/layouts/es.yml index 3aba1c49b..99702c418 100644 --- a/config/locales/views/layouts/es.yml +++ b/config/locales/views/layouts/es.yml @@ -34,7 +34,8 @@ es: Roles: Roles Resources: Recursos Revision History: Histórico de cambios - Toggle navigation: + Toggle navigation: + Past Editions: Ediciones anteriores Notifications: Notificaciones See all unread Comments: Ver comentarios no leidos See all Comments: Ver todos los comentarios diff --git a/config/routes.rb b/config/routes.rb index d754f21fc..243f42422 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,7 @@ Moraga::Application.routes.draw do + # Health check endpoint for Kamal proxy + get '/up', to: proc { [200, {}, ['OK']] } + mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development? constraints DomainConstraint do diff --git a/db/migrate/20260207202056_add_include_past_editions_to_splashpages.rb b/db/migrate/20260207202056_add_include_past_editions_to_splashpages.rb new file mode 100644 index 000000000..48b752d63 --- /dev/null +++ b/db/migrate/20260207202056_add_include_past_editions_to_splashpages.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddIncludePastEditionsToSplashpages < ActiveRecord::Migration[7.0] + def change + add_column :splashpages, :include_past_editions, :boolean, default: false + end +end diff --git a/public/403.html b/public/403.html index 41bc4325b..63a31be64 100644 --- a/public/403.html +++ b/public/403.html @@ -20,25 +20,17 @@
- osem logo

Error 403: Forbidden

You don't have permission to access this resource.
If you'd like, you can start again from the homepage.


-

OSEM is a +

Moraga is a free software project built through collaboration.

If you believe you have encountered a bug...

-

Please submit an issue +

Please submit an issue on Github.

- -

If you have other questions regarding OSEM...

- -

Feel free to contact contributors by subscribing to our mailing list.

- -

You can also reach out in the #OSEM channel on IRC.

-
diff --git a/public/404.html b/public/404.html index 2aabe933c..a37876ffb 100644 --- a/public/404.html +++ b/public/404.html @@ -20,27 +20,20 @@
- osem logo

Error 404: Page not found

The page you are looking for does not exist, it's possible that it may have moved.
If you'd like, you can start again from the homepage.


-

OSEM is a +

Moarga is a free software project built through collaboration.

If you believe you have encountered a bug...

-

Please submit an issue +

Please submit an issue on Github.

-

If you have other questions regarding OSEM...

- -

Feel free to contact contributors by subscribing to our mailing list.

- -

You can also reach out in the #OSEM channel on IRC.

-
diff --git a/public/500.html b/public/500.html index 1a615aef1..b73aa3588 100644 --- a/public/500.html +++ b/public/500.html @@ -20,26 +20,20 @@
- osem logo

Error 500: Internal Server Error

It looks like something has gone wrong on our side.
We - recommend you submit an issue + recommend you submit an issue on Github, if one does not already exist regarding this.
If you'd like, you can start again from the homepage.


-

OSEM is a +

Moraga is a free software project built through collaboration.

If you believe you have encountered a bug...

-

Please submit an issue +

Please submit an issue on Github.

-

If you have other questions regarding OSEM...

- -

Feel free to contact contributors by subscribing to our mailing list.

- -

You can also reach out in the #OSEM channel on IRC.