Skip to content

Commit

Permalink
Fixed issue with non related buttons in section tools. Now button edi…
Browse files Browse the repository at this point in the history
…t is always showed but with different color for advice user
  • Loading branch information
Juan Francisco Onielfa Veneros committed Feb 8, 2019
1 parent caf8e50 commit 1fa6ce1
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 62 deletions.
4 changes: 2 additions & 2 deletions lib/dedalo/config/version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1509,12 +1509,12 @@


# Version
$DEDALO_VERSION = '5.2.0';
$DEDALO_VERSION = '5.2.1';
if(defined('DEVELOPMENT_SERVER') && DEVELOPMENT_SERVER===true) {
$DEDALO_VERSION .= '.'.time();
}
define('DEDALO_VERSION' , $DEDALO_VERSION);
define('DEDALO_BUILD' , '25-01-2019');
define('DEDALO_BUILD' , '08-02-2019');


/*
Expand Down
60 changes: 28 additions & 32 deletions lib/dedalo/section_records/rows/html/rows_list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -89,43 +89,39 @@
break;

case 'section_tool':

#
# SECTION TOOL:
# Buttons calculated for section tool (tool_indexation, tool_transcription, tool_lang, etc..)
if(true===search_development2::have_inverse_relations($section_tipo, $section_id)) {

$tool_name = $context->target_tool;

if(isset($context->target_component_tipo)){
$modelo_name= RecordObj_dd::get_modelo_name_by_tipo( $context->target_component_tipo, true );
$component = component_common::get_instance( $modelo_name,
$context->target_component_tipo,
$section_id,
$modo,
DEDALO_DATA_LANG,
$section_tipo);
# Buttons calculated for section tool (tool_indexation, tool_transcription, tool_lang, etc..)
$tool_name = $context->target_tool;

$tool = new $tool_name($component,'button');
}else{
$section = section::get_instance( $section_id,
$section_tipo,
$modo
);
$section->tool_section_tipo = $context->tool_section_tipo;
$tool = new $tool_name($section,'button');
}

#dump($tool->get_html(), ' tool ++ '.to_string());
if(isset($context->target_component_tipo)){
$modelo_name= RecordObj_dd::get_modelo_name_by_tipo( $context->target_component_tipo, true );
$component = component_common::get_instance( $modelo_name,
$context->target_component_tipo,
$section_id,
$modo,
DEDALO_DATA_LANG,
$section_tipo);

# Inverse locators info
#$section = section::get_instance($section_id, $section_tipo);
#$inverse_references = $section->get_inverse_references();
#if (!empty($inverse_references)) {

$html_content .= $tool->get_html();
$tool = new $tool_name($component,'button');
}else{
$html_content .= '<span class="section_id_number">'.$section_id.'</span>';
}
$section = section::get_instance( $section_id,
$section_tipo,
$modo
);
$section->tool_section_tipo = $context->tool_section_tipo;
$tool = new $tool_name($section,'button');
}

#dump($tool->get_html(), ' tool ++ '.to_string());

# Inverse locators info
#$section = section::get_instance($section_id, $section_tipo);
#$inverse_references = $section->get_inverse_references();
#if (!empty($inverse_references)) {

$html_content .= $tool->get_html();
break;

case 'list_into_tool_relation':
Expand Down
2 changes: 1 addition & 1 deletion lib/dedalo/tools/tool_common/css/tool_common.css

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

Loading

0 comments on commit 1fa6ce1

Please sign in to comment.