Initial content types definition

Torey Heinz committed Feb 09, 2018
commit 69977a755cf2c0116f3de4bea136bb9b3f474bce
Showing 9 changed files with 349 additions and 3 deletions
app/content_types/offering_types.yml +77 -0
@@ @@ -0,0 +1,77 @@
+ # Human readable name of this type
+ name: Offering types
+
+ # Lowercase, underscored handle used to access this type
+ slug: offering_types
+
+ # Explanatory text displayed in the back-office
+ description: A description of the content type for the editors
+
+ # Slug of field used to identify entries by default, such as the title
+ label_field_name: title
+
+ # Valid values: manually, created_at, updated_at, or the slug of any field
+ order_by: manually
+
+ # Valid values: asc (ascending) and desc (descending). Set to asc by default.
+ # order_direction: asc
+
+ # Specify a field slug to group entries by that field in the back-office.
+ # group_by: <your field>
+
+ # Activate public 'create' API (e.g for a contact form)
+ # public_submission_enabled: false
+
+ # Array of emails to be notified of new entries made with the public API
+ # public_submission_accounts: ['john@example.com']
+
+ # Control the display of the content type in the back-office.
+ # display_settings:
+ # seo: false # display the SEO tab for the content entries
+ # advanced: false # display the Advanced tab for the content entries
+ # position: 1 # position in the sidebar menu
+ # hidden: false # hidden for authors?
+
+ # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
+ # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
+
+ # A list describing each field
+ fields:
+ - title: # The lowercase, underscored name of the field
+ label: Title # Human readable name of the field
+ type: string
+ required: true
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - featured:
+ label: Featured?
+ type: boolean
+
+ - featured_image: # The lowercase, underscored name of the field
+ label: Featured image # Human readable name of the field
+ type: file
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - description: # The lowercase, underscored name of the field
+ label: Description # Human readable name of the field
+ type: text
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+ # text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor)
+
+ - offerings: # The lowercase, underscored name of the field
+ label: Offerings # Human readable name of the field
+ type: has_many
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false # Define the slug of the target content type (eg. comments)
+ class_name: offerings
+ # Define the name of the field referring to Offering types in the target content type (eg. post)
+ inverse_of: offering_type
+ # If you want to manage the entries of the relationship directly from the source entry
+ ui_enabled: true
+
app/content_types/offerings.yml +74 -0
@@ @@ -0,0 +1,74 @@
+ # Human readable name of this type
+ name: Offerings
+
+ # Lowercase, underscored handle used to access this type
+ slug: offerings
+
+ # Explanatory text displayed in the back-office
+ description: A description of the content type for the editors
+
+ # Slug of field used to identify entries by default, such as the title
+ label_field_name: title
+
+ # Valid values: manually, created_at, updated_at, or the slug of any field
+ order_by: manually
+
+ # Valid values: asc (ascending) and desc (descending). Set to asc by default.
+ # order_direction: asc
+
+ # Specify a field slug to group entries by that field in the back-office.
+ # group_by: <your field>
+
+ # Activate public 'create' API (e.g for a contact form)
+ # public_submission_enabled: false
+
+ # Array of emails to be notified of new entries made with the public API
+ # public_submission_accounts: ['john@example.com']
+
+ # Control the display of the content type in the back-office.
+ # display_settings:
+ # seo: false # display the SEO tab for the content entries
+ # advanced: false # display the Advanced tab for the content entries
+ # position: 1 # position in the sidebar menu
+ # hidden: false # hidden for authors?
+
+ # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
+ # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
+
+ # A list describing each field
+ fields:
+ - title: # The lowercase, underscored name of the field
+ label: Title # Human readable name of the field
+ type: string
+ required: true
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - featured_image: # The lowercase, underscored name of the field
+ label: Featured image # Human readable name of the field
+ type: file
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - description: # The lowercase, underscored name of the field
+ label: Description # Human readable name of the field
+ type: text
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+ # text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor)
+ - offering_type:
+ label: Offering Type
+ type: belongs_to
+ required: true
+ localized: false
+ class_name: offering_types
+ ui_enabled: true
+
+ - projects:
+ label: Projects
+ type: many_to_many
+ class_name: projects
+ inverse_of: offerings
+ ui_enabled: true
app/content_types/project_images.yml +59 -0
@@ @@ -0,0 +1,59 @@
+ # Human readable name of this type
+ name: Project images
+
+ # Lowercase, underscored handle used to access this type
+ slug: project_images
+
+ # Explanatory text displayed in the back-office
+ description: A description of the content type for the editors
+
+ # Slug of field used to identify entries by default, such as the title
+ label_field_name: title
+
+ # Valid values: manually, created_at, updated_at, or the slug of any field
+ order_by: manually
+
+ # Valid values: asc (ascending) and desc (descending). Set to asc by default.
+ # order_direction: asc
+
+ # Specify a field slug to group entries by that field in the back-office.
+ # group_by: <your field>
+
+ # Activate public 'create' API (e.g for a contact form)
+ # public_submission_enabled: false
+
+ # Array of emails to be notified of new entries made with the public API
+ # public_submission_accounts: ['john@example.com']
+
+ # Control the display of the content type in the back-office.
+ # display_settings:
+ # seo: false # display the SEO tab for the content entries
+ # advanced: false # display the Advanced tab for the content entries
+ # position: 1 # position in the sidebar menu
+ # hidden: false # hidden for authors?
+
+ # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
+ # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
+
+ # A list describing each field
+ fields:
+ - title: # The lowercase, underscored name of the field
+ label: Title # Human readable name of the field
+ type: string
+ required: true
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - file: # The lowercase, underscored name of the field
+ label: File # Human readable name of the field
+ type: file
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - project:
+ label: Project
+ type: belongs_to
+ required: true
+ class_name: projects
+ ui_enabled: true
app/content_types/projects.yml +72 -0
@@ @@ -0,0 +1,72 @@
+ # Human readable name of this type
+ name: Projects
+
+ # Lowercase, underscored handle used to access this type
+ slug: projects
+
+ # Explanatory text displayed in the back-office
+ description: A description of the content type for the editors
+
+ # Slug of field used to identify entries by default, such as the title
+ label_field_name: title
+
+ # Valid values: manually, created_at, updated_at, or the slug of any field
+ order_by: manually
+
+ # Valid values: asc (ascending) and desc (descending). Set to asc by default.
+ # order_direction: asc
+
+ # Specify a field slug to group entries by that field in the back-office.
+ # group_by: <your field>
+
+ # Activate public 'create' API (e.g for a contact form)
+ # public_submission_enabled: false
+
+ # Array of emails to be notified of new entries made with the public API
+ # public_submission_accounts: ['john@example.com']
+
+ # Control the display of the content type in the back-office.
+ # display_settings:
+ # seo: false # display the SEO tab for the content entries
+ # advanced: false # display the Advanced tab for the content entries
+ # position: 1 # position in the sidebar menu
+ # hidden: false # hidden for authors?
+
+ # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
+ # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
+
+ # A list describing each field
+ fields:
+ - title: # The lowercase, underscored name of the field
+ label: Title # Human readable name of the field
+ type: string
+ required: true
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - featured_image: # The lowercase, underscored name of the field
+ label: Featured image # Human readable name of the field
+ type: file
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+
+ - description: # The lowercase, underscored name of the field
+ label: Description # Human readable name of the field
+ type: text
+ required: false
+ hint: Explanatory text displayed in the back office
+ localized: false
+ # text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor)
+ - images:
+ label: images
+ type: has_many
+ class_name: project_images
+ inverse_of: project
+ ui_enabled: true
+
+ - offerings:
+ label: offerings
+ type: many_to_many
+ class_name: offerings
+ inverse_of: projects
data/offering_types.yml +16 -0
@@ @@ -0,0 +1,16 @@
+ - "Sample 1":
+ # featured_image: /samples/offering_types/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Nam molestiae ipsa non iure sint architecto doloribus. Odio non quisquam consectetur delectus natus. Magnam iure aliquid fuga sequi harum qui et. Consequuntur autem eligendi explicabo ratione."
+
+ - "Sample 2":
+ # featured_image: /samples/offering_types/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Id vel expedita asperiores. Explicabo doloremque aliquid. Quod non itaque voluptate libero dicta. Aut quis impedit."
+
+ - "Sample 3":
+ # featured_image: /samples/offering_types/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Enim officia ipsa sunt. Officiis voluptatum doloribus. Error architecto asperiores ut voluptas veritatis. Velit doloribus saepe soluta aut."
+
+ - "Sample 4":
+ # featured_image: /samples/offering_types/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Suscipit ab sed commodi. Ducimus impedit unde quia alias. Aperiam hic est laudantium cumque accusamus. Qui rerum doloremque aut quas enim laborum."
+
data/offerings.yml +16 -0
@@ @@ -0,0 +1,16 @@
+ - "Sample 1":
+ # featured_image: /samples/offerings/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Qui illum molestiae et commodi et. Nobis culpa enim vitae vel quisquam est. Aliquid ratione nihil."
+
+ - "Sample 2":
+ # featured_image: /samples/offerings/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Sapiente nemo quia qui. Magni repellat velit dignissimos et eos. Iste incidunt ipsum ut optio iusto. Dignissimos quia assumenda. Aut in molestiae at sequi quaerat deleniti."
+
+ - "Sample 3":
+ # featured_image: /samples/offerings/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Maiores dolore quos cum explicabo earum. Eius id ratione amet possimus iste. Quidem quia reiciendis error cumque."
+
+ - "Sample 4":
+ # featured_image: /samples/offerings/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Sint quasi ut et. Quis ipsa tenetur et. Autem vero quae adipisci magnam est totam. Eum vero fugit sit sunt iste. Veniam aliquid molestias vitae laborum."
+
data/project_images.yml +12 -0
@@ @@ -0,0 +1,12 @@
+ - "Sample 1":
+ # file: /samples/project_images/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+
+ - "Sample 2":
+ # file: /samples/project_images/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+
+ - "Sample 3":
+ # file: /samples/project_images/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+
+ - "Sample 4":
+ # file: /samples/project_images/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+
data/projects.yml +16 -0
@@ @@ -0,0 +1,16 @@
+ - "Sample 1":
+ # featured_image: /samples/projects/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Ex in est est qui quaerat doloremque et. Sint architecto eveniet qui est ut quis eos. Nihil praesentium iste. Nobis reiciendis dolores. Error cumque culpa optio qui."
+
+ - "Sample 2":
+ # featured_image: /samples/projects/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Voluptates quas ullam. Autem quam ex iste vel. Enim molestias autem expedita."
+
+ - "Sample 3":
+ # featured_image: /samples/projects/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Quia maxime ut magni. Maiores illo autem et sequi. Tempore magni consequuntur aut sunt doloribus dolorem perspiciatis."
+
+ - "Sample 4":
+ # featured_image: /samples/projects/yourfile.txt # Path to a file in the public/samples folder or to a remote and external file.
+ description: "Tenetur corporis quos dolorem qui reprehenderit. Alias velit facilis molestias ut eius sit. Quaerat ab minus iste. Voluptate sed iste possimus. Adipisci illo eum."
+
notes.txt +7 -3
@@ @@ -1,9 +1,13 @@
- wagon generate content_type offering_types title:string description:text event_date:date
+ wagon generate content_type offering_types title:string featured_image:file description:text offerings:has_many
+ wagon generate content_type offerings title:string featured_image:file description:text offering_type:belongs_to projects:many_to_many
+ wagon generate content_type projects title:string featured_image:file description:text offerings:many_to_many project_images:has_many
+ wagon generate content_type project_images title:string file:file project:belongs_to
OfferingTypes:
title:string
featured_image:file
+ description:text
has_many:offerings
@@ @@ -11,7 +15,7 @@ Offerings:
title:string
featured_image:file
belongs_to:offering-type
- has_many:projects
+ many_to_many:projects
Features:
- Bonded Windows
@@ @@ -23,7 +27,7 @@ Projects:
featured_image:file
description:text
has_many:project_images
- belongs_to:offering
+ many_to_many:offerings
ProjectImages:
title:string