Commit 3288b6de authored by Simon's avatar Simon

release 1.4.2

parent fca6839c
......@@ -20,9 +20,9 @@
## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.4.1 .` (update version number)
- build new image `docker build -t biuro/web:1.4.2 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.4.1`
- push image to docker repository - `docker push biuro/web:1.4.2`
## Production
- update biuro/web image version in .env file (staging or www)
......
......@@ -48,12 +48,25 @@
$where = 'valid.meta_value > "' . date('Y-m-d', strtotime('-1 days')) . '"';
// WP Pods fix for multisite
global $wpdb;
$params = array(
'orderby' => 'valid.meta_value DESC',
'where' => $where,
'limit' => 5
);
if (get_current_blog_id() != 1):
$langs = pll_the_languages(array('raw'=>1));
$langID = $langs[pll_current_language('slug')]['id'];
$where = $where . ' AND ( `langs`.`object_id` IS NOT NULL )';
$params['join'] = ' LEFT JOIN `' . $wpdb->prefix . 'term_relationships` AS `langs` ON `langs`.`object_id` = `t`.`ID` AND `langs`.`term_taxonomy_id` = ' . $langID;
$params['where'] = $where;
endif;
// END WP Pods fix for multisite
$jobs = pods( 'job', $params );
if ( 0 < $jobs->total() ):
......
......@@ -691,12 +691,13 @@ add_action( 'template_redirect', 'livas_job_id_redirect' );
// Add LIVAS ID column
function jobs_columns_head($defaults) {
$defaults['livas_id'] = 'LIVAS ID';
$defaults['valid'] = 'Valid';
return $defaults;
}
// Show LIVAS ID
function jobs_columns_content($column_name, $post_ID) {
if ($column_name == 'livas_id') {
if ($column_name == 'livas_id'):
$pod = pods( 'job', $post_ID );
if ($pod->field( 'livas-id' )):
......@@ -704,7 +705,15 @@ function jobs_columns_content($column_name, $post_ID) {
else:
echo '-';
endif;
}
elseif ($column_name == 'valid'):
$pod = pods( 'job', $post_ID );
if ($pod->field( 'valid' )):
echo $pod->field( 'valid' );
else:
echo '-';
endif;
endif;
}
function jobs_livas_id_search( $wp ) {
......@@ -735,7 +744,7 @@ function jobs_livas_id_search( $wp ) {
'where' => 'livas-id.meta_value = "' . (int) $livasId . '"',
];
$pod = pods('job', $params);
$pod = pods( 'job', $params);
$ids = [];
while ( $pod->fetch() ) {
......
......@@ -141,12 +141,25 @@ get_header(); ?>
endforeach;
endif;
// WP Pods fix for multisite
global $wpdb;
$params = array(
'orderby' => 'valid.meta_value DESC',
'where' => $where,
'limit' => 20
);
if (get_current_blog_id() != 1):
$langs = pll_the_languages(array('raw'=>1));
$langID = $langs[pll_current_language('slug')]['id'];
$where = $where . ' AND ( `langs`.`object_id` IS NOT NULL )';
$params['join'] = ' LEFT JOIN `' . $wpdb->prefix . 'term_relationships` AS `langs` ON `langs`.`object_id` = `t`.`ID` AND `langs`.`term_taxonomy_id` = ' . $langID;
$params['where'] = $where;
endif;
// END WP Pods fix for multisite
$jobs = pods( 'job', $params );
if ( 0 < $jobs->total() ):
......
......@@ -135,12 +135,25 @@ get_header(); ?>
endforeach;
endif;
// WP Pods fix for multisite
global $wpdb;
$params = array(
'orderby' => 'valid.meta_value DESC',
'where' => $where,
'limit' => 20
);
if (get_current_blog_id() != 1):
$langs = pll_the_languages(array('raw'=>1));
$langID = $langs[pll_current_language('slug')]['id'];
$where = $where . ' AND ( `langs`.`object_id` IS NOT NULL )';
$params['join'] = ' LEFT JOIN `' . $wpdb->prefix . 'term_relationships` AS `langs` ON `langs`.`object_id` = `t`.`ID` AND `langs`.`term_taxonomy_id` = ' . $langID;
$params['where'] = $where;
endif;
// END WP Pods fix for multisite
$jobs = pods( 'job', $params );
if ( 0 < $jobs->total() ):
......
<?php
$jobID = get_the_ID();
// $jobID = get_the_ID();
$pod = pods( 'job', get_the_ID() );
......@@ -81,17 +81,20 @@
<div class="c-job-contacts">
<?php
$jobID = get_the_ID();
// $jobID = get_the_ID();
$params = array(
'where' => 't.id=' . $jobID,
'limit' => 1
);
// $params = array(
// 'where' => 't.id=' . get_the_ID(),
// 'limit' => 1
// );
$contacts = pods( 'job', $params );
// $contacts = pods( 'job', $params );
while ( $contacts->fetch() ) :
echo $contacts->display( 'contact' );
endwhile;
// while ( $contacts->fetch() ) :
// echo $contacts->display( 'contact' );
// endwhile;
echo $pod->field('contact');
?>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment