Commit d52de7bf authored by Simonas's avatar Simonas

in progress

parent 1d356842
......@@ -17,7 +17,7 @@
### DB backup
- `C:\web\dev.biuro> docker exec -i dev-biuro-mysql mysqldump -udev_user -pY6V6bFkD6@GyD!wTShgFmWz! --default-character-set=utf8 dev_biuro > docker/mariadb/data-004.sql`
- `sudo docker exec -i biuro-staging-mysql mysqldump -ustaging_user -p'qzl8pMNV^gZ&c1!7ebVsXqQh' --default-character-set=utf8 staging_biuro > docker/mariadb/data-006.sql`
- `sudo docker exec -i biuro-staging-mysql mysqldump -ustaging_user -p'qzl8pMNV^gZ&c1!7ebVsXqQh' --default-character-set=utf8 staging_biuro > docker/mariadb/data-007.sql`
### DB restore
- `C:\web\dev.biuro> docker exec -i dev-biuro-mysql mysql -udev_user -pY6V6bFkD6@GyD!wTShgFmWz! --default-character-set=utf8 dev_biuro < docker/mariadb/data-004.sql`
......@@ -103,10 +103,10 @@ Restart docker (sometimes PC restart may be required)
- docker load --input ourdemo.tar
- docker build -t biuro/web:0.0.3 .
- docker build -t biuro/web:0.0.4 .
- docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- sudo docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- docker push biuro/web:0.0.3
- docker push biuro/web:0.0.4
- sudo chown -R www-data:www-data wordpress/wp-content/plugins
......
......@@ -32,6 +32,7 @@ rewrite ^/darbo-paieska/klauskite\;/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/darbo-paieska/klauskite/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/kontaktai/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/kontaktai/darbinimo-agenturos/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/cv/?$ /darbuotojams/kontaktai/ permanent;
# --- Darbdaviams ---
# rewrite ^/personalo-nuoma/vasarosdarbubankas/?$ / permanent;
......
:root{--color--gray:#4d4d4d;--color--green:#006957;--typo--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Light","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--typo--font-size:1.8rem;--typo--weight-slim:100;--typo--weight-regular:400;--typo--weight-bold:600;--typo--line-height:1.2;--typo--font-face:"PT Sans Narrow",sans-serif;--typo--font-face-additional:"Bebas Neue",sans-serif;--layout-width:63em}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}a,body{color:#4d4d4d;color:var(--color--gray)}body{font-size:1.8rem;font-size:var(--typo--font-size);line-height:1.2;line-height:var(--typo--line-height)}html{min-height:100%;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.l-content,.l-footer,.l-header,.l-inner{max-width:63em;max-width:var(--layout-width);margin-right:auto;margin-left:auto;padding-right:1em;padding-left:1em}.l-header{padding-top:15px;padding-bottom:15px}.o-nav{margin:0;padding:0;list-style:none}.c-cookies-warning{display:none}.c-data-controller{padding:0 1em;text-align:center;font-size:88%}.c-data-controller p{margin-bottom:0}.c-jobs-list{width:100%;margin:0 0 20px}.c-jobs-list--head{padding:10px}.c-jobs-list--col{padding:0 10px}.c-logo--svg{display:block}.c-nav--main{display:-webkit-box;display:-ms-flexbox;display:flex}.c-nav--sub,.u-hidden{display:none}@media (min-width:48em){:root{--typo--font-size:1.6rem;--typo--line-height:1.3}body{font-family:PT Sans Narrow,sans-serif;font-family:var(--typo--font-face)}.l-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.l-content,.l-header{display:-webkit-box;display:-ms-flexbox;display:flex}.l-aside{-webkit-box-flex:0;-ms-flex:0 0 16.25em;flex:0 0 16.25em}.l-main,.l-nav{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.c-nav--main{padding-left:2em}}@media (max-width:47.999em){body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI Light,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-family:var(--typo--font-family);letter-spacing:-.08rem}.c-nav--main{margin:20px 0}}@media (min-width:30em){.c-jobs-list--col{padding:10px}}@media (max-width:29.999em){.c-jobs-list--col-position{padding-top:10px}}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -123,6 +123,7 @@ document.querySelectorAll('.js-job-action').forEach(function (node) {
});
</script>
<script src="/wp-content/themes/biuro/js/main.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-a9a206ea.min.js" async></script>
<?php wp_footer(); ?>
</body>
</html>
......@@ -96,8 +96,6 @@ function my_deregister_scripts(){
}
add_action( 'wp_footer', 'my_deregister_scripts' );
/**
* Register our sidebars and widgetized areas.
*/
......@@ -413,29 +411,6 @@ add_action('init', 'df_disable_comments_admin_bar');
// require_once 'includes/disable_discussion';
function getSiteTree($taxonomy)
{
$terms = get_terms( array(
'taxonomy' => $taxonomy,
'hide_empty' => false,
));
if ( !empty( $terms ) && ! is_wp_error( $terms ) ):
echo '<ul>';
foreach ( $terms as $term ):
$page = get_term_meta( $term->term_id, 'page-id', true);
if ( $page ) :
?>
<li><a href="<?php echo get_page_link( $page['ID'] ); ?>" title="<?php echo $page['post_title']; ?>"><?php echo $page['post_title']; ?></a></li>
<?
endif;
endforeach;
echo '</ul>';
endif;
}
function getDivisions ( $request ) {
$res = array();
......
......@@ -31,16 +31,16 @@ define('cityID', $cityID);
get_template_part( 'template-parts/meta/canonical');
?>
<style><?php include 'css/core.min.css'; ?></style>
<style><?php include 'css/core-a25434ed1d.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/css/main-8c9c954583.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow_bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/bebas-neue.woff2" as="font" type="font/woff2" crossorigin>
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-8c9c954583.min.css">
</noscript>
<?php wp_head(); ?>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -34,29 +34,25 @@
?>
<datalist id="search-cities">
<?php
$cities = get_terms( array(
'taxonomy' => 'city',
'orderby' => 'count',
'order' => 'DESC'
// 'orderby' => array(
// 'title' => 'DESC'
// // 'menu_order' => 'ASC'
// )
// 'hide_empty' => false,
));
$res = array();
if ( ! empty( $cities ) && ! is_wp_error( $cities ) ):
foreach ( $cities as $city ):
$name = $city->name;
$termID = $city->term_id;
// $selected = ($cityID == $termID) ? 'selected="selected"' : '';
$where = 'valid.meta_value > "' . date('Y-m-d', strtotime('-1 days')) . '" AND city.term_id = ' . $termID;
$params = array(
// 'orderby' => 'title DESC',
'where' => $where,
'limit' => -1
);
......@@ -64,17 +60,42 @@
$jobsIn = pods( 'job', $params );
if ( 0 < $jobsIn->total() ):
$order = intval(get_term_meta( $termID, 'order', true));
array_push($res, array(
'name' => $name,
'order' => $order,
'total' => $jobsIn->total()
));
endif;
endforeach;
usort($res, function($a, $b) {
$o = $b['order'] - $a['order'];
if ($o):
return $o;
endif;
$t = $b['total'] - $a['total'];
if ($t):
return $t;
endif;
return $a['name'] > $b['name'];
});
?>
<datalist id="search-cities">
<?php
foreach ( $res as $r ):
?>
<option value="<?php echo $name; ?>" <?php echo $selected; ?>><?php echo $name; ?> (<?php echo $jobsIn->total(); ?>)</option>
<option value="<?php echo $r['name']; ?>"><?php echo $r['name']; ?> (<?php echo $r['total']; ?>)</option>
<?php
endif;
endforeach;
endif;
?>
</datalist>
<input list="search-cities" id="search-city" name="city" value="<?php echo ($searchQuery) ? $searchQuery['city'] : ''; ?>" placeholder="Vietovė" />
<datalist id="search-queries">
<?php
$options = array();
......@@ -82,11 +103,6 @@
'taxonomy' => 'type',
'orderby' => 'count',
'order' => 'DESC'
// 'orderby' => array(
// 'title' => 'DESC'
// // 'menu_order' => 'ASC'
// )
// 'hide_empty' => false,
));
if ( ! empty( $types ) && ! is_wp_error( $types ) ):
......@@ -94,13 +110,10 @@
$name = $type->name;
$termID = $type->term_id;
$selected = '';
// $selected = ($cityID == $termID) ? 'selected="selected"' : '';
$where = 'valid.meta_value > "' . date('Y-m-d', strtotime('-1 days')) . '" AND type.term_id = ' . $termID;
$params = array(
// 'orderby' => 'title DESC',
'where' => $where,
'limit' => -1
);
......@@ -109,11 +122,6 @@
if ( 0 < $jobsIn->total() ):
array_push( $options , array( 'name' => $name, 'total' => $jobsIn->total() ) );
/*
?>
<option value="<?php echo $name; ?>"><?php echo $name; ?> (<?php echo $jobsIn->total(); ?>)</option>
<?php
*/
endif;
endforeach;
endif;
......@@ -122,11 +130,6 @@
'taxonomy' => 'field',
'orderby' => 'count',
'order' => 'DESC'
// 'orderby' => array(
// 'title' => 'DESC'
// // 'menu_order' => 'ASC'
// )
// 'hide_empty' => false,
));
if ( ! empty( $fields ) && ! is_wp_error( $fields ) ):
......@@ -134,13 +137,10 @@
$name = $field->name;
$termID = $field->term_id;
$selected = '';
// $selected = ($cityID == $termID) ? 'selected="selected"' : '';
$where = 'valid.meta_value > "' . date('Y-m-d', strtotime('-1 days')) . '" AND field.term_id = ' . $termID;
$params = array(
// 'orderby' => 'title DESC',
'where' => $where,
'limit' => -1
);
......@@ -153,124 +153,20 @@
endforeach;
endif;
usort($options, function ($item1, $item2) {
return $item2['total'] <=> $item1['total'];
usort($options, function ($a, $b) {
return $a['total'] < $b['total'];
});
?>
<datalist id="search-queries">
<?php
foreach ( $options as $option ):
?>
<option value="<?php echo $option['name']; ?>"><?php echo $option['name']; ?> (<?php echo $option['total']; ?>)</option>
<?php
endforeach;
?>
</datalist>
<input list="search-queries" id="search-query" name="s" value="<?php echo ($searchQuery) ? $searchQuery['s'] : ''; ?>" placeholder="Raktažodis" />
<input type="submit" value="Ieškoti" class="filter-button" />
</form>
<?php
/*
<ul class="search_box">
<li>
<label for="label">Paieška:</label>
<div id="search-input-block">
<input type="text" name="search" id="search" value="<?php echo $search; ?>" class="input text nolabel" />
<button aria-label="Ieškoti" type="submit" id="filter-action" class="submit action" ></button>
</div>
<a href="<?php echo pll_home_url(); ?>" id="filter-expand" class="url close">Išplėstinė paieška</a></li>
<li class="filter-additional">
<label for="city">Miestas:</label>
<select name="city" id="city" class="el_130">
<option value="">Visi miestai</option>
<?php
$cities = get_terms( array(
'taxonomy' => 'city',
'hide_empty' => false,
));
if ( ! empty( $cities ) && ! is_wp_error( $cities ) ):
foreach ( $cities as $city ):
$name = $city->name;
$termID = $city->term_id;
$selected = ($cityID == $termID) ? 'selected="selected"' : '';
?>
<option value="<?php echo $termID; ?>" <?php echo $selected; ?>><?php echo $name; ?></option>
<?php
endforeach;
endif;
?>
</select>
<label for="period" style="opacity: 0.45">Laikotarpis:</label>
<select name="period" id="period" class="el_130" style="opacity: 0.45">
<option value="">Nesvarbu</option>
<option value="1">Šiandienos</option>
<option value="7">Savaitės</option>
<option value="30">Mėnesio</option>
</select>
</li>
<li class="filter-additional">
<label for="field">Darbo sritis:</label>
<select name="field" id="field" class="el_130">
<option value="">Visos sritys</option>
<?php
$fields = get_terms( array(
'taxonomy' => 'field',
'hide_empty' => false,
));
if ( ! empty( $fields ) && ! is_wp_error( $fields ) ):
foreach ( $fields as $field ):
$name = $field->name;
$termID = $field->term_id;
$selected = ($fieldID == $termID) ? 'selected="selected"' : '';
?>
<option value="<?php echo $termID; ?>" <?php echo $selected; ?>><?php echo $name; ?></option>
<?php
endforeach;
endif;
?>
</select>
<label for="type">Darbo rūšis:</label>
<select name="type" id="type" class="el_130">
<option value="">Visos rūšys</option>
<?php
$types = get_terms( array(
'taxonomy' => 'type',
'hide_empty' => false,
));
if ( ! empty( $types ) && ! is_wp_error( $types ) ):
foreach ( $types as $type ):
$name = $type->name;
$termID = $type->term_id;
$selected = ($typeID == $termID) ? 'selected="selected"' : '';
?>
<option value="<?php echo $termID; ?>" <?php echo $selected; ?>><?php echo $name; ?></option>
<?php
endforeach;
endif;
?>
</select>
<input type="submit" value="Ieškoti" class="filter-button">
<a href="<?php echo pll_home_url(); ?>" class="filter-button">Išvalyti</a>
</li>
</ul>
</form>
<?php
<form role="search" id="top-search-form" action="<?php echo pll_home_url(); ?>" method="get">
<label for="search"><?php pll_e('Job search'); ?></label>
<div id="search-input-block">
<input type="text" name="search" id="search" value="" class="input text nolabel" />
<button aria-label="Ieškoti" type="submit" id="filter-action" class="submit action" ></button>
</div>
</form>
*/
?>
<?php
function getSiteTree($taxonomy)
{
$terms = get_terms( array(
'taxonomy' => $taxonomy,
'hide_empty' => false,
));
// debug($terms);
if ( !empty( $terms ) && ! is_wp_error( $terms ) ):
echo '<ul>';
$res = array();
foreach ( $terms as $term ):
$termID = $term->term_id;
$where = 'valid.meta_value > "' . date('Y-m-d', strtotime('-1 days')) . '" AND ' . $taxonomy . '.term_id = ' . $termID;
$params = array(
'where' => $where,
'limit' => -1
);
$jobsIn = pods( 'job', $params );
if ( 0 < $jobsIn->total() ):
$page = get_term_meta( $termID, 'page-id', true);
$order = intval(get_term_meta( $termID, 'order', true));
if ( $page && $page['post_status'] === 'publish') :
array_push($res, array(
'name' => $page['post_title'],
'href' => get_page_link( $page['ID'] ),
'order' => $order,
'total' => $jobsIn->total()
));
endif;
endif;
endforeach;
usort($res, function($a, $b) {
$o = $b['order'] - $a['order'];
if ($o):
return $o;
endif;
$t = $b['total'] - $a['total'];
if ($t):
return $t;
endif;
return $a['name'] > $b['name'];
});
foreach ( $res as $r ):
?>
<li><a href="<?php echo $r['href']; ?>" title="<?php echo $r['name']; ?>"><?php echo $r['name'] . ' (' . $r['total'] . ')'; ?></a></li>
<?php
endforeach;
echo '</ul>';
endif;
}
?>
<h3>Miestas</h3>
<div style="border: 1px solid #666; margin-right: 20px">
<?php
......
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