Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/gitdedalo/developer' into …
Browse files Browse the repository at this point in the history
…developer

# Conflicts:
#	lib/dedalo/config/version.inc
  • Loading branch information
Paco committed Oct 24, 2022
2 parents 59d327d + c6524e9 commit 0f28d88
Show file tree
Hide file tree
Showing 26 changed files with 134 additions and 25 deletions.
9 changes: 9 additions & 0 deletions install/set_psw/trigger.set_psw.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
$dato->components->{$tipo}->dato = new stdClass();
$dato->components->{$tipo}->valor = new stdClass();
}
$current_pw = $dato->components->{$tipo}->dato;

// check the dedalo install status and the empty root pw
if( ( defined('DEDALO_TEST_INSTALL') && DEDALO_TEST_INSTALL!==true )
|| ( defined('DEDALO_INSTALL_STATUS') && DEDALO_INSTALL_STATUS ==='installed' )
|| !empty($current_pw)) {

return false;
}

# Set dato
$dato->components->{$tipo}->dato->$lang = $password_encripted;
Expand Down
2 changes: 1 addition & 1 deletion lib/dedalo/common/css/structure.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-cat.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-deu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-ell.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-eng.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-fra.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-ita.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-lat.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-por.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/dedalo/common/js/lang/lg-spa.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,11 @@ public static function resolve_query_object_sql($query_object) {
// q_operator
$q_operator = $result_query_object->q_operator ?? null;

# Clone and modify query_object for search in relations_search too
$relation_search_obj = clone $result_query_object;
$relation_search_obj->component_path = ['relations_search'];
# Clone and modify query_object for search in relations_search too if the operator is different to ==
$relation_search_obj = clone $result_query_object;
if ($q_operator!=='==') {
$relation_search_obj->component_path = ['relations_search'];
}

# Group the two query_object in a 'or' clause
$operator = '$or';
Expand All @@ -975,6 +977,24 @@ public static function resolve_query_object_sql($query_object) {
}//end resolve_query_object_sql


/**
* SEARCH_OPERATORS_INFO
* Return valid operators for search in current component
* @return array $ar_operators
*/
public function search_operators_info() {

$ar_operators = [
'*' => 'no_vacio', // not null
'!*' => 'vacio',
'!=' => 'distinto_de',
'=' => 'similar_a',
'==' => 'literal',
];

return $ar_operators;
}//end search_operators_info


}
?>

5 changes: 3 additions & 2 deletions lib/dedalo/component_check_box/component_check_box.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$label = $this->get_label();
$required = $this->get_required();
$debugger = $this->get_debugger();
$permissions = $this->get_component_permissions();
$permissions = $modo==='dataframe_search' ? 2: $this->get_component_permissions();
$ejemplo = NULL;
$html_title = $label;
$ar_tools_obj = $this->get_ar_tools_obj();
Expand Down Expand Up @@ -50,7 +50,8 @@
# Force file_name
$file_name = 'edit';
break;

case 'dataframe_search' :
$file_name = 'search';
case 'search' :
# dato is injected by trigger search wen is needed
$dato = isset($this->dato) ? $this->dato : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#
# LABEL
#$html_content .= "<label for=\"$input_id\" class=\"css_check_box_rotulo\" {$required_code}>$rotulo</label>";
$html_content .= "<label for=\"$input_id\" class=\"css_check_box_rotulo\" {$required_code}>$dataframe_value</label>";
$html_content .= "<label class=\"css_check_box_rotulo\" {$required_code}>$dataframe_value</label>";

$html_content .= "</li>";
$i++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@
# Add from_component_tipo
$locator->from_component_tipo = $tipo;

$locator_json = json_encode($locator);
if($modo === 'dataframe_search'){
$rel_locator = new stdClass();
$locator->type = 'dd558';
$rel_locator->dataframe = [$locator];
}else{
$rel_locator = $locator;
}

$locator_json = json_encode($rel_locator);

$checked = '';
if (is_array($dato) && locator::in_array_locator($locator, $dato, array('section_id','section_tipo')) ) {
Expand Down
2 changes: 1 addition & 1 deletion lib/dedalo/component_common/class.component_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static function get_instance($component_name=null, $tipo=null, $parent=nu
dump($parent," parent - DEDALO_SECTION_ID_TEMP:".DEDALO_SECTION_ID_TEMP);
throw new Exception("Error Processing Request. trying to use wrong var: '$parent' as parent to load as component", 1);
}
$ar_valid_modo = array('edit','list','search','simple','list_tm','tool_portal','tool_lang','edit_tool','indexation','selected_fragment','tool_indexation','tool_transcription','print','edit_component','load_tr','update','portal_list','list_thesaurus','portal_list_view_mosaic','edit_in_list','edit_note','tool_structuration','dataframe_edit','tool_description','view_tool_description','player','json');
$ar_valid_modo = array('edit','list','search','simple','list_tm','tool_portal','tool_lang','edit_tool','indexation','selected_fragment','tool_indexation','tool_transcription','print','edit_component','load_tr','update','portal_list','list_thesaurus','portal_list_view_mosaic','edit_in_list','edit_note','tool_structuration','dataframe_edit','dataframe_search','tool_description','view_tool_description','player','json');
if ( empty($modo) || !in_array($modo, $ar_valid_modo) ) {
if(SHOW_DEBUG===true) {
throw new Exception("Error Processing Request. trying to use wrong var: '$modo' as modo to load as component", 1); ;
Expand Down
3 changes: 2 additions & 1 deletion lib/dedalo/config/version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,7 @@


# Version
$DEDALO_VERSION = '5.9.0';
$DEDALO_VERSION = '5.9.1';

if(defined('DEVELOPMENT_SERVER') && DEVELOPMENT_SERVER===true) {
$DEDALO_VERSION .= '.'.time();
Expand All @@ -2797,6 +2797,7 @@




/*
# Build
if (isset($_SESSION['dedalo4']['config']['DEDALO_BUILD'])) {
Expand Down
4 changes: 2 additions & 2 deletions lib/dedalo/dataframe/class.dataframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*
*/
class dataframe extends common {
class dataframe extends component_relation_common {

public $tipo;

Expand Down Expand Up @@ -66,7 +66,7 @@ public function get_html() {

/**
* GET_AR_CHILDRENS : private alias of RecordObj_dd::get_ar_recursive_childrens
* Note th use of $ar_exclude_models to exclude not desired section elements, like auxiliar structure terms that are not necesary here
* Note the use of $ar_exclude_models to exclude not desired section elements, like auxiliary structure terms that are not necessary here
*/
public function get_ar_childrens() {
#$RecordObj_dd = new RecordObj_dd($tipo);
Expand Down
30 changes: 30 additions & 0 deletions lib/dedalo/search/class.search_development2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3333,6 +3333,36 @@ public static function get_components_from_section($ar_section_tipo, $path=[], $
// Add element
$ar_result[] = $element;

if( $modelo_name==='component_autocomplete'){
$RecordObj_dd = new RecordObj_dd($component_tipo);
$propiedades = $RecordObj_dd->get_propiedades(true);

if(isset($propiedades->dataframe)){
$dataframe = $propiedades->dataframe[0];

// element object base
$df_element = new stdClass();
$df_element->section_group_tipo = $section_group_tipo;
$df_element->section_group_model = $section_group_model;
$df_element->section_group_label = $section_group_label;
$df_element->section_tipo = $section_tipo;
$df_element->section_label = $section_label;
$df_element->component_tipo = $dataframe->tipo;
$df_element->component_label = $element->component_label. ' ' .RecordObj_dd::get_termino_by_tipo($dataframe->type, DEDALO_DATA_LANG , true, true);
$df_element->path = $path;
$df_element->has_subquery = false; // Default (changes when component_portal/component_autocomplete)
$df_element->target_section = false; // Default (changes when component_portal/component_autocomplete)
$df_element->ar_tipo_exclude_elements = false; // default (changes when component_portal/component_autocomplete and ar_terminos_relacionados_to_exclude)
// Add modelo_name
$df_element->modelo_name = 'dataframe';

// Add element
$ar_result[] = $df_element;

}


}

// store as added to avoid duplicates
$ar_added_components[] = $component_tipo;
Expand Down
6 changes: 6 additions & 0 deletions lib/dedalo/search/trigger.search2.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ function load_components($json_data) {

$component_tipo = $component_info->component_tipo;
$modelo_name = RecordObj_dd::get_modelo_name_by_tipo($component_info->component_tipo,true);
if($modelo_name === 'dataframe'){
$ar_children = section::get_ar_children_tipo_by_modelo_name_in_section($component_info->component_tipo, ['component'], $from_cache=true, $resolve_virtual=true, $recursive=false, $search_exact=false);
$component_info->component_tipo = $ar_children[0];
$modelo_name = RecordObj_dd::get_modelo_name_by_tipo($component_info->component_tipo,true);
$component_info->modo = "dataframe_search";
}
$component = component_common::get_instance(
$modelo_name,
$component_info->component_tipo,
Expand Down
5 changes: 3 additions & 2 deletions lib/dedalo/tools/tool_import_rdf/class.tool_import_rdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ public function get_component_dato($section_id, $component_tipo){
$lang = ($translatable==='no')
? DEDALO_DATA_NOLAN
: DEDALO_DATA_LANG;
$component_tipo = component_common::get_instance($modelo,
$component = component_common::get_instance($modelo,
$component_tipo,
$section_id,
'list',
$lang,
$this->section_tipo);

$component_dato = $component_tipo->get_dato();
// $component_dato = $component->get_dato();
$component_dato = component_common::extract_component_dato_fallback($component);

return $component_dato;
}//end get_component_dato($section_id, $component_tipo);
Expand Down
7 changes: 7 additions & 0 deletions lib/dedalo/tools/tool_import_rdf/css/tool_import_rdf.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions lib/dedalo/tools/tool_import_rdf/css/tool_import_rdf.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
font-weight: bold;
}

.lang_selector{
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 2em;
font-size: 1.2em;
}

.wrap_tool_import_rdf_page{
min-height: 100vh;
}
Expand Down
11 changes: 11 additions & 0 deletions lib/dedalo/tools/tool_import_rdf/html/tool_import_rdf_page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@

$html .= '<div class="section_label no-print">'.$section_label.'</div>';

$html .= '<div class="lang_selector">'.label::get_label('default_lang_of_file_to_import').'</div>';

#
# LANG SELECTOR
$html .= '<div class="lang_selector">';

// $html .= "<span>". label::get_label('idioma') .":</span>";
$html .= html_page::get_dedalo_aplication_langs_selector_html();

$html .= "</div>";#end lang_selector_in_header

$html .= '<div id="wrap_tool_import_rdf" class="wrap_tool wrap_tool_import_rdf_page">';

// $html .= '</div><!-- /content_data -->';
Expand Down
7 changes: 7 additions & 0 deletions lib/dedalo/tools/tool_import_rdf/tool_import_rdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@
$section_id = $_REQUEST['section_id'];
$component_tipo = $_REQUEST['component_tipo'];
$ontology_tipo = $this->get_ontology_tipo($component_tipo);
$id_wrapper = 'wrapper_'.$component_tipo.'_'.$section_id.'_'.$ontology_tipo ;
$component_dato = $this->get_component_dato($section_id, $component_tipo);


# LANG
# Note that component_textarea can change his lang ('force_change_lang') in some contexts
$lang = DEDALO_DATA_LANG;


break;
}//end switch

Expand Down

0 comments on commit 0f28d88

Please sign in to comment.