Skip to content

Commit

Permalink
Merge pull request #95 from GSA/feature/DIGITAL-192-implement-job-board
Browse files Browse the repository at this point in the history
DIGITAL-192: Implement job board
  • Loading branch information
mattsqd authored Jan 27, 2025
2 parents 7e0dbf2 + d882c93 commit 6ca2c96
Show file tree
Hide file tree
Showing 16 changed files with 296 additions and 69 deletions.
17 changes: 17 additions & 0 deletions config/sync/config_pages.type.job_board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
uuid: 29822c38-e891-485d-bf24-37a0c3c46bce
langcode: en
status: true
dependencies: { }
id: job_board
label: 'Job Board'
token: false
context:
show_warning: true
group:
language: false
fallback:
language: ''
menu:
path: /admin/content/job-board
weight: 0
description: ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
uuid: 93cfb026-0003-4fe2-a42e-b0dacd3e85ac
langcode: en
status: true
dependencies:
config:
- config_pages.type.job_board
- field.field.config_pages.job_board.field_job_board_yml_contents
id: config_pages.job_board.default
targetEntityType: config_pages
bundle: job_board
mode: default
content:
field_job_board_yml_contents:
type: string_textarea
weight: 0
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
hidden:
label: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: a86f0ea4-6847-4b5f-a1c7-fa9473c7e156
langcode: en
status: true
dependencies:
config:
- config_pages.type.job_board
- field.field.config_pages.job_board.field_job_board_yml_contents
id: config_pages.job_board.default
targetEntityType: config_pages
bundle: job_board
mode: default
content:
field_job_board_yml_contents:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 0
region: content
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 23c12065-5cd3-4261-866e-c59038d58d29
langcode: en
status: true
dependencies:
config:
- config_pages.type.job_board
- field.storage.config_pages.field_job_board_yml_contents
id: config_pages.job_board.field_job_board_yml_contents
field_name: field_job_board_yml_contents
entity_type: config_pages
bundle: job_board
label: 'Job Board YML Contents'
description: 'https://docs.google.com/spreadsheets/d/1VW1IxK0KPmH11DlQbxL5Hj2qc7Y3223PDpp_t5DhcG8/edit?gid=1857335212#gid=1857335212'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string_long
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 87d24173-b227-4d1e-a34b-696d9d1a71ed
langcode: en
status: true
dependencies:
module:
- config_pages
id: config_pages.field_job_board_yml_contents
field_name: field_job_board_yml_contents
entity_type: config_pages
type: string_long
settings:
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: 570b9308-9faa-46d8-99be-2282df5d2992
langcode: en
status: true
dependencies:
config:
- user.role.job_board_manager
module:
- user
id: user_add_role_action.job_board_manager
label: 'Add the Job Board Manager role to the selected user(s)'
type: user
plugin: user_add_role_action
configuration:
rid: job_board_manager
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: 8fbafff9-a755-4b82-8684-3c43c9a70128
langcode: en
status: true
dependencies:
config:
- user.role.job_board_manager
module:
- user
id: user_remove_role_action.job_board_manager
label: 'Remove the Job Board Manager role from the selected user(s)'
type: user
plugin: user_remove_role_action
configuration:
rid: job_board_manager
7 changes: 7 additions & 0 deletions config/sync/user.role.content_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ label: 'Content Admin'
weight: 5
is_admin: null
permissions:
- 'access config_pages overview'
- 'access content overview'
- 'access files overview'
- 'access media overview'
- 'administer config_pages types'
- 'administer footer menu items'
- 'administer footer-about menu items'
- 'administer footer-grow menu items'
Expand Down Expand Up @@ -67,7 +69,9 @@ permissions:
- 'edit any short_post content'
- 'edit any source content'
- 'edit any topics content'
- 'edit config_pages entity'
- 'edit identifier config page entity'
- 'edit job_board config page entity'
- 'override all authored by option'
- 'override all authored on option'
- 'override guide_navigation published option'
Expand All @@ -94,4 +98,7 @@ permissions:
- 'view all media revisions'
- 'view all revisions'
- 'view any unpublished content'
- 'view config_pages entity'
- 'view identifier config page entity'
- 'view job_board config page entity'
- 'view scheduled content'
16 changes: 16 additions & 0 deletions config/sync/user.role.job_board_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
uuid: bb09f825-c39f-45a0-8d22-384e721965c0
langcode: en
status: true
dependencies:
module:
- config_pages
- node
id: job_board_manager
label: 'Job Board Manager'
weight: 11
is_admin: null
permissions:
- 'access config_pages overview'
- 'access content overview'
- 'edit job_board config page entity'
- 'view job_board config page entity'
1 change: 1 addition & 0 deletions config/sync/user.role.user_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ permissions:
- 'assign editor role'
- 'assign guide_navigation_admin role'
- 'assign identifier_admin role'
- 'assign job_board_manager role'
- 'assign publisher role'
- 'assign user_admin role'
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
_meta:
version: '1.0'
entity_type: config_pages
uuid: b2df63a7-4590-4616-96b5-80f2ffad5265
bundle: job_board
default:
label:
-
value: 'Job Board'
type:
-
target_id: job_board
context:
-
value: 'a:0:{}'
field_job_board_yml_contents:
-
value: "- title: Community Outreach Specialist\r\n department: Department of Homeland Security\r\n location: Anywhere in the U.S. (remote job)\r\n description: >\r\n 6-month non-reimbursable assignment with the possibility of extension. Office of the Citizenship and Immigration Services Ombudsman (CIS Ombudsman) Community Outreach Specialist Series Requested: 0301 Security Clearance: None Virtual/Remote: Yes Only current, full-time federal employees are eligible. Resumes are reviewed every 30 days until selection/closing date. This is a Detail, not a Developmental Rotation. Supervisory approval form must be signed.\r\n open_date: 2024-09-03\r\n close_date: 2050-01-27\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/807704100\r\n cop_topics:\r\n - Communicators\r\n - Plain Language\r\n\r\n- title: Public Affairs Specialist- MP\r\n department: Other Agencies and Independent Organizations\r\n location: Washington, District of Columbia\r\n description: >\r\n This position is located in the Pension Benefit Guaranty Corporation's (PBGC), Office of Policy & External Affairs (OPEA), Communications Outreach & Legislative Affairs Department (COLAD). CONCURRENT ANNOUNCEMENT: THIS POSITION IS ALSO BEING ADVERTISED UNDER DELEGATED EXAMINING PROCEDURES UNDER ANNOUNCEMENT NUMBER OPEA-2025-0006. IF YOU WISH TO BE CONSIDERED UNDER THAT ANNOUNCEMENT, PLEASE REVIEW TO DETERMINE IF YOU QUALIFY. More than one selection may be made from this vacancy announcement.\r\n open_date: 2025-01-06\r\n close_date: 2050-01-21\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826882500\r\n cop_topics:\r\n - Communicators\r\n\r\n- title: Public Affairs Specialist- DE\r\n department: Other Agencies and Independent Organizations\r\n location: Washington, District of Columbia\r\n description: >\r\n This position is located in the Pension Benefit Guaranty Corporation's (PBGC), Office of Policy & External Affairs (OPEA), Communications Outreach & Legislative Affairs Department (COLAD). CONCURRENT ANNOUNCEMENT: THIS POSITION IS ALSO BEING ADVERTISED UNDER MERIT PROMOTION PROCEDURES UNDER ANNOUNCEMENT NUMBER OPEA-2025-0007. IF YOU WISH TO BE CONSIDERED UNDER THAT ANNOUNCEMENT, PLEASE REVIEW TO DETERMINE IF YOU QUALIFY. More than one selection may be made from this vacancy announcement.\r\n open_date: 2025-01-06\r\n close_date: 2050-01-21\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826883000\r\n cop_topics:\r\n - Communicators\r\n\r\n- title: IT Specialist (APPSW) - Open to all applicants\r\n department: Department of Justice\r\n location: Washington, District of Columbia\r\n description: >\r\n The Office of Information Management provides innovative business process automation, data management, content management, software application, and consultative services to the Division and external stakeholders. The office comprises back-end application development, data management, business analysis, and visual design experts. The incumbent is responsible for the front-end development and user experience (UX) of websites and web applications.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-17\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826800000\r\n cop_topics:\r\n - User Experience\r\n - Web Analytics\r\n - Web Managers\r\n\r\n- title: IT Specialist (APPSW) - Open to applicants with Federal status\r\n department: Department of Justice\r\n location: Washington, District of Columbia\r\n description: >\r\n The Office of Information Management provides innovative business process automation, data management, content management, software application, and consultative services to the Division and external stakeholders. The office comprises back-end application development, data management, business analysis, and visual design experts. The incumbent is responsible for the front-end development and user experience (UX) of websites and web applications.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-17\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826801800\r\n cop_topics:\r\n - User Experience\r\n - Web Analytics\r\n - Web Managers\r\n\r\n- title: IT Specialist (INET) - Open to all applicants\r\n department: Department of Justice\r\n location: Washington, District of Columbia\r\n description: >\r\n The Office of Information Management provides innovative business process automation, data management, content management, software application, and consultative services to the Division and external stakeholders. The office comprises back-end application development, data management, business analysis, and visual design experts. The incumbent has primary responsibility as web content and accessibility specialist for maintenance of internal websites/web applications and multiple DOJ domains.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-17\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/827002500\r\n cop_topics:\r\n - Communicators\r\n - Web Analytics\r\n - Web Managers\r\n\r\n- title: IT Specialist (INET) - Open to applicants with Federal Status\r\n department: Department of Justice\r\n location: Washington, District of Columbia\r\n description: >\r\n The Office of Information Management provides innovative business process automation, data management, content management, software application, and consultative services to the Division and external stakeholders. The office comprises back-end application development, data management, business analysis, and visual design experts. The incumbent has primary responsibility as web content and accessibility specialist for maintenance of internal websites/web applications and multiple DOJ domains.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-17\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/827003300\r\n cop_topics:\r\n - Communicators\r\n - Web Analytics\r\n - Web Managers\r\n\r\n- title: Supervisory Public Affairs Specialist\r\n department: Department of Justice\r\n location: Washington, District of Columbia\r\n description: >\r\n This position is located in the U.S. Department of Justice (DOJ), Office of Justice Programs (OJP), Office of Communications (OC), Media Affairs Division (MAD). The incumbent of this position is responsibile for leading a team in developing and implementing strategic communication plans, managing media relations and public outreach, handling crisis communication, and ensuring compliance with policies and ethical standards.\r\n open_date: 2025-01-11\r\n close_date: 2050-01-21\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/827646600\r\n cop_topics:\r\n - Communicators\r\n\r\n- title: Writer-Editor\r\n department: Department of Veterans Affairs\r\n location: Multiple Locations\r\n description: >\r\n OIG is organized into seven operational units: the Immediate Office of the Inspector General, Office of the Counselor, Office of Audits and Evaluations, Office of Healthcare Inspections, Office of Investigations, Office of Management and Administration, and Office of Special Reviews. In addition to the Washington, DC, headquarters, OIG has offices located in more than 60 locations throughout the country.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-21\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826960800\r\n cop_topics:\r\n - Communicators\r\n - Plain Language\r\n\r\n- title: Writer-Editor\r\n department: Department of Veterans Affairs\r\n location: Multiple Locations\r\n description: >\r\n OIG is organized into seven operational units: the Immediate Office of the Inspector General, Office of the Counselor, Office of Audits and Evaluations, Office of Healthcare Inspections, Office of Investigations, Office of Management and Administration, and Office of Special Reviews. In addition to the Washington, DC, headquarters, OIG has offices located in more than 60 locations throughout the country.\r\n open_date: 2025-01-07\r\n close_date: 2050-01-21\r\n apply_link: https://www.usajobs.gov:443/GetJob/ViewDetails/826960700\r\n cop_topics:\r\n - Communicators\r\n - Plain Language\r\n"
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ default:
alias: /job-board
langcode: en
pathauto: 0
field_deck:
-
value: '<p>Discover community- and technology-related job openings in the federal government.</p>'
format: single_inline_html
field_landing_page_type:
-
value: job_board
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
_meta:
version: '1.0'
entity_type: user
uuid: b7e79ea2-5aea-4fe8-9499-238f7d76ba30
uuid: 280a2f72-f105-4dcb-b81f-fae216ed62de
default_langcode: en
default:
preferred_langcode:
-
value: en
preferred_admin_langcode:
-
value: en
name:
-
value: [email protected]
value: [email protected]
pass:
-
value: $2y$10$I6KM/OQbPASsF0FAb8GbU.AyJBhtiMVY3oT380Nk3cDQ4ei2Hjtqm
existing: ''
pre_hashed: true
mail:
-
value: [email protected]
value: [email protected]
timezone:
-
value: America/New_York
value: America/Vancouver
status:
-
value: true
created:
-
value: 1733422324
value: 1737647495
access:
-
value: 0
login:
-
value: 0
init:
-
value: [email protected]
roles:
-
target_id: admin
Expand All @@ -38,4 +49,4 @@ default:
-
alias: ''
langcode: en
pathauto: 1
pathauto: 0
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
_meta:
version: '1.0'
entity_type: user
uuid: 085be1fc-95dd-45ba-b06b-97e51b1e4b78
uuid: 5853e09e-70d8-41d3-8c5e-3b3ee439c9d9
default_langcode: en
default:
preferred_langcode:
-
value: en
preferred_admin_langcode:
-
value: en
name:
-
value: [email protected]
value: [email protected]
pass:
-
value: $2y$10$Jkd.Xqz/RT3jm47wtcbwFe5U.t94dqq.jp8GRxqf4KLBOjdYqjfMa
existing: ''
pre_hashed: true
mail:
-
value: [email protected]
value: [email protected]
timezone:
-
value: America/New_York
Expand All @@ -21,21 +29,24 @@ default:
value: true
created:
-
value: 1733422399
value: 1737405103
access:
-
value: 0
login:
-
value: 0
init:
-
value: [email protected]
roles:
-
target_id: admin
target_id: job_board_manager
role_change:
-
target_id: __role_delegation_empty_field_value__
path:
-
alias: ''
langcode: en
pathauto: 1
pathauto: 0
36 changes: 36 additions & 0 deletions web/themes/custom/digital_gov/digital_gov.theme
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

declare(strict_types=1);

use Drupal\Component\Serialization\Yaml;
use Drupal\convert_text\ConvertText;
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Link;
use Drupal\Core\Template\Attribute;
Expand Down Expand Up @@ -393,3 +395,37 @@ function digital_gov_theme_suggestions_container_alter(array &$suggestions, arra
$suggestions[] = 'container__no_wrapper';
}
}

/**
* Implements hook_preprocess_HOOK().
*/
function digital_gov_preprocess_node__landing_page__job_board(&$variables, $hook) {
$filtered_array = [];
$entity_type_manager = \Drupal::entityTypeManager();
$config_pages = $entity_type_manager->getStorage('config_pages')->load('job_board');
$yml_string = $config_pages->get('field_job_board_yml_contents')->getString();
try {
$yml_array = Yaml::decode($yml_string);
}
catch (\Exception $exception) {
$yml_array = [];
\Drupal::logger('job_board')->emergency('The valued stored for job board at /admin/content/job-board is not valid YAML. ' . $exception->getMessage());
}
if (!empty($yml_array)) {
foreach ($yml_array as $item) {
$close_date = date('Y-m-d', $item['close_date']);
$today = date('Y-m-d');
if ($close_date >= $today) {
$item['open_date'] = date('F j, Y', $item['open_date']);
$item['close_date'] = date('F j, Y', $item['close_date']);
// These fields may have markdown still.
$item['title'] = ConvertText::htmlText($item['title']);
$item['department'] = ConvertText::htmlText($item['department']);
$item['description'] = ConvertText::htmlText($item['description']);

$filtered_array[] = $item;
}
}
}
$variables['job_board'] = $filtered_array;
}
Loading

0 comments on commit 6ca2c96

Please sign in to comment.