FIX: r11095 broke the ability to bold field names on contactsheets [notag].

git-svn-id: http://svn.resourcespace.com/svn/rs/trunk@12234 c08608d7-6e46-0410-86ca-f2a6f1370df5
This commit is contained in:
astec 2018-10-24 14:51:12 +00:00
parent fdde152df7
commit e33f5910aa
4 changed files with 46 additions and 17 deletions

View File

@ -212,15 +212,10 @@ foreach($results as $result_data)
$contact_sheet_value = tidylist($contact_sheet_value);
}
$field_name='';
if($contact_sheet_field_name){
if($contact_sheet_field_name_bold){
$field_name.='<span class="contactsheet_textbold">';
}
if($contact_sheet_field_name)
{
$field_name.=$contact_sheet_field['title'] . ': ';
if($contact_sheet_field_name_bold){
$field_name.='</span>';
}
}
}
$placeholders['resources'][$result_data['ref']]['contact_sheet_fields'][$contact_sheet_field['title']] = $field_name . tidylist($contact_sheet_value);
}
}

View File

@ -81,6 +81,7 @@ if(isset($contact_sheet_footer))
<table id="resourcesTable">
<tbody>
<?php
global $contact_sheet_field_name, $contact_sheet_field_name_bold;
foreach($resources as $resource_ref => $resource)
{
?>
@ -115,9 +116,19 @@ if(isset($contact_sheet_footer))
foreach($resource['contact_sheet_fields'] as $contact_sheet_field)
{
?>
<span><?php echo htmlspecialchars($contact_sheet_field); ?></span><br>
<?php
if($contact_sheet_field_name && $contact_sheet_field_name_bold)
{
$contact_sheet_field=explode(': ', $contact_sheet_field);
?>
<span><b><?php echo htmlspecialchars($contact_sheet_field[0]); ?></b>: <?php echo htmlspecialchars($contact_sheet_field[1]); ?></span><br>
<?php
}
else
{
?>
<span><?php echo htmlspecialchars($contact_sheet_field); ?></span><br>
<?php
}
}
?>
</td>

View File

@ -20,6 +20,7 @@ if(isset($titlefontsize))
.contactsheet_textbold {font-weight: bold;}
</style>
<?php
global $contact_sheet_field_name, $contact_sheet_field_name_bold;
foreach($resources as $resource_ref => $resource)
{
?>
@ -114,9 +115,19 @@ if(isset($contact_sheet_footer))
foreach($resource['contact_sheet_fields'] as $contact_sheet_field)
{
?>
<p><?php echo htmlspecialchars($contact_sheet_field); ?></p>
<?php
if($contact_sheet_field_name && $contact_sheet_field_name_bold)
{
$contact_sheet_field=explode(': ', $contact_sheet_field);
?>
<p><b><?php echo htmlspecialchars($contact_sheet_field[0]); ?></b>: <?php echo htmlspecialchars($contact_sheet_field[1]); ?></p>
<?php
}
else
{
?>
<p><?php echo htmlspecialchars($contact_sheet_field); ?></p>
<?php
}
}
?>
</page>

View File

@ -81,6 +81,8 @@ if(isset($contact_sheet_footer))
<table>
<tbody>
<?php
global $contact_sheet_field_name, $contact_sheet_field_name_bold;
$row = 1;
$column = 0;
@ -133,9 +135,19 @@ foreach($resources as $resource_ref => $resource)
{
foreach($resource['contact_sheet_fields'] as $contact_sheet_field)
{
?>
<span><?php echo htmlspecialchars($contact_sheet_field); ?></span><br>
<?php
if($contact_sheet_field_name && $contact_sheet_field_name_bold)
{
$contact_sheet_field=explode(': ', $contact_sheet_field);
?>
<span><b><?php echo htmlspecialchars($contact_sheet_field[0]); ?></b>: <?php echo htmlspecialchars($contact_sheet_field[1]); ?></span><br>
<?php
}
else
{
?>
<span><?php echo htmlspecialchars($contact_sheet_field); ?></span><br>
<?php
}
}
}
?>