Skip to content
Snippets Groups Projects
Unverified Commit f3e721b7 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Ajout des fichiers statiques des catégories de personnes et organisations (#1943)


* wip

* git_path

---------

Co-authored-by: default avatarSébastien Gaya <sebastien.gaya@gmail.com>
parent ede30743
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,6 @@ class Communication::Website::Permalink::Organization::Category < Communication:
protected
def published?
website.id == about.communication_website_id
end
def substitutions
{
slug: about.slug
......
......@@ -18,10 +18,6 @@ class Communication::Website::Permalink::Person::Category < Communication::Websi
protected
def published?
website.id == about.communication_website_id
end
def substitutions
{
slug: about.slug
......
......@@ -29,6 +29,7 @@ class University::Organization::Category < ApplicationRecord
include Permalinkable
include Sluggable
include Translatable
include WithGitFiles
include WithUniversity
has_and_belongs_to_many :organizations,
......@@ -39,6 +40,14 @@ class University::Organization::Category < ApplicationRecord
scope :ordered, -> { order(:name) }
def git_path(website)
git_path_content_prefix(website) + git_path_relative
end
def git_path_relative
"organizations_categories/#{slug}/_index.html"
end
def to_s
"#{name}"
end
......
......@@ -29,6 +29,7 @@ class University::Person::Category < ApplicationRecord
include Permalinkable
include Sluggable
include Translatable
include WithGitFiles
include WithUniversity
has_and_belongs_to_many :people,
......@@ -39,6 +40,14 @@ class University::Person::Category < ApplicationRecord
scope :ordered, -> { order(:name) }
def git_path(website)
git_path_content_prefix(website) + git_path_relative
end
def git_path_relative
"persons_categories/#{slug}/_index.html"
end
def to_s
"#{name}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment