mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
When viewing a conference, the Instance Name in the header points to /organizations. On the organizations index, there's a button to see conferences, but it does nothing. This makes it easy for public users to get lost. This commit: * Adds a function to the organizations controller to show child conferences * Adds a public permission to see conferences through an organization * Represents a subset of conferences, reusing conferences/index view, for the organization
13 lines
341 B
Ruby
13 lines
341 B
Ruby
class OrganizationsController < ApplicationController
|
|
load_and_authorize_resource :organization
|
|
|
|
def index
|
|
@organizations = Organization.all
|
|
end
|
|
|
|
def conferences
|
|
@current = @organization.conferences.upcoming.reorder(start_date: :asc)
|
|
@antiquated = @organization.conferences.past
|
|
render '/conferences/index'
|
|
end
|
|
end
|