Skip to content

Commit

Permalink
Add default language selector to tool_import_rdf
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-render committed Oct 12, 2022
1 parent 34585f6 commit 4e42d62
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 12 deletions.
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.

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 4e42d62

Please sign in to comment.