Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/splashpages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions app/views/admin/splashpages/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions app/views/conferences/_past_editions_nav.haml
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions app/views/conferences/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 1 addition & 0 deletions config/locales/views/layouts/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion config/locales/views/layouts/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
12 changes: 2 additions & 10 deletions public/403.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,17 @@
<body>
<!-- This file lives in public/403.html -->
<div class="dialog">
<img src="/img/osem-logo.png" alt="osem logo">
<h1>Error 403: Forbidden</h1>
<p>You don't have permission to access this resource.<br> If you'd
like, you can start again from the <a href="/">homepage.</a></p><br>

<p>OSEM is a <a href="https://www.fsf.org/about/what-is-free-software">
<p>Moraga is a <a href="https://www.fsf.org/about/what-is-free-software">
free software</a> project built through collaboration.</p>

<p><b>If you believe you have encountered a bug...</b></p>

<p>Please <a href="https://github.com/openSUSE/osem/issues">submit an issue
<p>Please <a href="https://github.com/opensouthcode/moraga/issues">submit an issue
on Github.</a></p>

<p><b>If you have other questions regarding OSEM...</b></p>

<p>Feel free to contact contributors by subscribing to our <a href="http://lists.opensuse.org/opensuse-web/"> mailing list.</a><p>

<p>You can also reach out in the <a href="https://libera.chat/">#OSEM channel on IRC</a>.</p>

</div>
</body>
</html>
11 changes: 2 additions & 9 deletions public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,20 @@
<body>
<!-- This file lives in public/404.html -->
<div class="dialog">
<img src="/img/osem-logo.png" alt="osem logo">
<h1>Error 404: Page not found</h1>

<p>The page you are looking for does not exist, it's possible that it
may have moved.<br> If you'd like, you can start again from the
<a href="/">homepage.</a></p><br>

<p>OSEM is a <a href="https://www.fsf.org/about/what-is-free-software">
<p>Moarga is a <a href="https://www.fsf.org/about/what-is-free-software">
free software</a> project built through collaboration.</p>

<p><b>If you believe you have encountered a bug...</b></p>

<p>Please <a href="https://github.com/openSUSE/osem/issues">submit an issue
<p>Please <a href="https://github.com/opensouthcode/moraga/issues">submit an issue
on Github.</a></p>

<p><b>If you have other questions regarding OSEM...</b></p>

<p>Feel free to contact contributors by subscribing to our <a href="http://lists.opensuse.org/opensuse-web/"> mailing list.</a></p>

<p>You can also reach out in the <a href="https://libera.chat/">#OSEM channel on IRC</a>.</p>

</div>
</body>
</html>
12 changes: 3 additions & 9 deletions public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,20 @@
<body>
<!-- This file lives in public/404.html -->
<div class="dialog">
<img src="/img/osem-logo.png" alt="osem logo">
<h1>Error 500: Internal Server Error</h1>

<p> It looks like something has gone wrong on our side.<br> We
recommend you <a href="https://github.com/openSUSE/osem/issues">submit an issue
recommend you <a href="https://github.com/opensouthcode/moraga/issues">submit an issue
on Github,</a> if one does not already exist regarding this. <br> If you'd like, you can start again from the <a href="/">homepage.</a></p><br>

<p>OSEM is a <a href="https://www.fsf.org/about/what-is-free-software">
<p>Moraga is a <a href="https://www.fsf.org/about/what-is-free-software">
free software</a> project built through collaboration.</p>

<p><b>If you believe you have encountered a bug...</b></p>

<p>Please <a href="https://github.com/openSUSE/osem/issues">submit an issue
<p>Please <a href="https://github.com/opensouthcode/moraga/issues">submit an issue
on Github.</a></p>

<p><b>If you have other questions regarding OSEM...</b></p>

<p>Feel free to contact contributors by subscribing to our <a href="http://lists.opensuse.org/opensuse-web/"> mailing list.</a><p>

<p>You can also reach out in the <a href="https://libera.chat/">#OSEM channel on IRC</a>.</p>
</div>
</body>
</html>
Loading