src/Webtrees/Module/GeoDispersion/Views/GeoAnalysisTabGenerationsView.php
protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
        $html =
        '<table class="geodispersion_bigrow">
            <tr>';
        
        $sum_gen = $data['sum'];
        $unknownother = $data['unknown'] + $data['other'];
        foreach($data['places'] as $placename=> $dataplace){
            $levels = array_map('trim',explode(',', $placename));
            $content = '';
            if(isset($dataplace['flag'])){
                $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
            }
            else{
                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
            }
            $count = $dataplace['count'];
            $content .= I18N::number($count);
            $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
            $perc2= Functions::safeDivision($count, $sum_gen);
            if($perc2>=0.1) 
                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
            $content .= '</td>';
               
            $html .= '
                <td class="geodispersion_rowitem" width="'.max(round(100*$perc, 0),1).'%">
                    <table>
                        <tr>
                            <td>
                                <table>
                                    <tr>'.$content.'</tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>';
        }
        
        if($unknownother>0){
            $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
            $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
            $html .='</td>';
        }
        
        $html .= 
            '</tr>
        </table>';
        return $html;
    }
protected function htmlGenerationAllPlacesRow($data, $analysis_level) {
        $html =
        '<table class="geodispersion_bigrow">
            <tr>';
        
        $sum_gen = $data['sum'];
        $unknownother = $data['unknown'] + $data['other'];
        foreach($data['places'] as $placename=> $dataplace){
            $levels = array_map('trim',explode(',', $placename));
            $content = '';
            if(isset($dataplace['flag'])){
                $content .= '<td class="geodispersion_flag">'. FunctionsPrint::htmlPlaceIcon($dataplace['place'], $dataplace['flag']) .'</td><td>';
            }
            else{
                $content .= '<td><span title="'.implode(I18N::$list_separator, array_reverse($levels)).'">'.$levels[$analysis_level-1].'</span><br/>';
            }
            $count = $dataplace['count'];
            $content .= I18N::number($count);
            $perc = Functions::safeDivision($count, $sum_gen + $unknownother);
            $perc2= Functions::safeDivision($count, $sum_gen);
            if($perc2>=0.1) 
                $content.= '<br/><span class="small">('.I18N::percentage($perc2, 1).')</span>';
            $content .= '</td>';
               
            $html .= '
                <td class="geodispersion_rowitem" width="'.max(round(100*$perc, 0),1).'%">
                    <table>
                        <tr>
                            <td>
                                <table>
                                    <tr>'.$content.'</tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>';
        }
        
        if($unknownother>0){
            $perc= Functions::safeDivision($unknownother, $sum_gen + $unknownother);
            $html .='<td class="geodispersion_unknownitem left" >'.I18N::number($unknownother);
            if($perc>=0.1) $html.= '<br/><span class="small">('.I18N::percentage($perc, 1).')</span>';
            $html .='</td>';
        }
        
        $html .= 
            '</tr>
        </table>';
        return $html;
    }
protected function htmlGenerationAllPlacesRow ( $ data , $ analysis_level ) { $ html = '<table class="geodispersion_bigrow">
            <tr>' ; $ sum_gen = $ data [ 'sum' ] ; $ unknownother = $ data [ 'unknown' ] + $ data [ 'other' ] ; foreach ( $ data [ 'places' ] as $ placename => $ dataplace ) { $ levels = array_map ( 'trim' , explode ( ',' , $ placename ) ) ; $ content = '' ; if ( isset ( $ dataplace [ 'flag' ] ) ) { $ content .= '<td class="geodispersion_flag">' . FunctionsPrint :: htmlPlaceIcon ( $ dataplace [ 'place' ] , $ dataplace [ 'flag' ] ) . '</td><td>' ; } else { $ content .= '<td><span title="' . implode ( I18N :: $ list_separator , array_reverse ( $ levels ) ) . '">' . $ levels [ $ analysis_level - 1 ] . '</span><br/>' ; } $ count = $ dataplace [ 'count' ] ; $ content .= I18N :: number ( $ count ) ; $ perc = Functions :: safeDivision ( $ count , $ sum_gen + $ unknownother ) ; $ perc2 = Functions :: safeDivision ( $ count , $ sum_gen ) ; if ( $ perc2 >= 0.1 ) $ content .= '<br/><span class="small">(' . I18N :: percentage ( $ perc2 , 1 ) . ')</span>' ; $ content .= '</td>' ; $ html .= '
                <td class="geodispersion_rowitem" width="' . max ( round ( 100 * $ perc , 0 ) , 1 ) . '%">
                    <table>
                        <tr>
                            <td>
                                <table>
                                    <tr>' . $ content . '</tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>' ; } if ( $ unknownother > 0 ) { $ perc = Functions :: safeDivision ( $ unknownother , $ sum_gen + $ unknownother ) ; $ html .= '<td class="geodispersion_unknownitem left" >' . I18N :: number ( $ unknownother ) ; if ( $ perc >= 0.1 ) $ html .= '<br/><span class="small">(' . I18N :: percentage ( $ perc , 1 ) . ')</span>' ; $ html .= '</td>' ; } $ html .= '</tr>
        </table>' ; return $ html ; }
Return the HTML code to display a row with all places found in a generation.

@param array $data Data array
@param int $analysis_level Level of subdivision of analysis
@return string HTML code for all places row
Return the HTML code to display a row with all places found in a generation .