@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
27 | - ?> |
|
26 | + protected function renderContent() { |
|
27 | + ?> |
|
28 | 28 | <div id="maj-geodisp-list-page" class="center"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | 31 | <?php |
32 | 32 | if($this->data->get('has_list', false)) { |
33 | - $galist = $this->data->get('geoanalysislist'); |
|
34 | - ?> |
|
33 | + $galist = $this->data->get('geoanalysislist'); |
|
34 | + ?> |
|
35 | 35 | |
36 | 36 | <p class="center"><?php echo I18N::translate('Choose a geographical dispersion analysis:'); ?><p> |
37 | 37 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | </div> |
59 | 59 | |
60 | 60 | <?php |
61 | - } |
|
61 | + } |
|
62 | 62 | |
63 | 63 | } |
64 | 64 | |
65 | 65 | \ No newline at end of file |
@@ -29,17 +29,17 @@ |
||
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | 31 | <?php |
32 | - if($this->data->get('has_list', false)) { |
|
32 | + if ($this->data->get('has_list', false)) { |
|
33 | 33 | $galist = $this->data->get('geoanalysislist'); |
34 | 34 | ?> |
35 | 35 | |
36 | 36 | <p class="center"><?php echo I18N::translate('Choose a geographical dispersion analysis:'); ?><p> |
37 | 37 | |
38 | 38 | <div class="maj-table"> |
39 | - <?php foreach($galist as $ga) {?> |
|
39 | + <?php foreach ($galist as $ga) {?> |
|
40 | 40 | <div class="maj-row"> |
41 | 41 | <div class="label"> |
42 | - <?php if($ga->hasMap()) { ?> |
|
42 | + <?php if ($ga->hasMap()) { ?> |
|
43 | 43 | <i class="icon-maj-map" title="<?php echo I18N::translate('Map'); ?>"></i> |
44 | 44 | <?php } else { ?> |
45 | 45 | <i class="icon-maj-table" title="<?php echo I18N::translate('Table'); ?>"></i> |
@@ -25,27 +25,27 @@ discard block |
||
25 | 25 | * {@inhericDoc} |
26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
27 | 27 | */ |
28 | - protected function renderContent() { |
|
29 | - $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | - $nb_other = $this->data->get('stats_gen_nb_other'); |
|
31 | - $nb_unknown = $this->data->get('stats_gen_nb_unknown'); |
|
32 | - $perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown); |
|
28 | + protected function renderContent() { |
|
29 | + $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | + $nb_other = $this->data->get('stats_gen_nb_other'); |
|
31 | + $nb_unknown = $this->data->get('stats_gen_nb_unknown'); |
|
32 | + $perc_known = Functions::safeDivision($nb_found - $nb_other, $nb_found + $nb_unknown); |
|
33 | 33 | |
34 | - $html = '<div id="geodispersion_summary"> |
|
34 | + $html = '<div id="geodispersion_summary"> |
|
35 | 35 | <div class="maj-table center"> |
36 | 36 | <div class="maj-row"> |
37 | 37 | <div class="label">' . I18N::translate('Places found'). '</div> |
38 | 38 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_found - $nb_other, I18N::percentage($perc_known)). '</div> |
39 | 39 | </div>'; |
40 | - if($nb_other > 0){ |
|
41 | - $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown); |
|
42 | - $html .= |
|
43 | - '<div class="maj-row"> |
|
40 | + if($nb_other > 0){ |
|
41 | + $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown); |
|
42 | + $html .= |
|
43 | + '<div class="maj-row"> |
|
44 | 44 | <div class="label">' . I18N::translate('Other places'). '</div> |
45 | 45 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_other, I18N::percentage($perc_other)). '</div> |
46 | 46 | </div>'; |
47 | - } |
|
48 | - $html .= '<div class="maj-row"> |
|
47 | + } |
|
48 | + $html .= '<div class="maj-row"> |
|
49 | 49 | <div class="label">' . I18N::translate('Places not found'). '</div> |
50 | 50 | <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_unknown, I18N::percentage(1 - $perc_known)). '</div> |
51 | 51 | </div> |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | ' . $this->htmlAnalysisData(). ' |
57 | 57 | </div>'; |
58 | 58 | |
59 | - return $html; |
|
60 | - } |
|
59 | + return $html; |
|
60 | + } |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Returns HTML code to display the analysis data, under the appropriate format. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @return string HTML Code for analysis display |
66 | 66 | * @abstract |
67 | 67 | */ |
68 | - protected abstract function htmlAnalysisData(); |
|
68 | + protected abstract function htmlAnalysisData(); |
|
69 | 69 | |
70 | 70 | } |
71 | 71 | |
72 | 72 | \ No newline at end of file |
@@ -34,26 +34,26 @@ |
||
34 | 34 | $html = '<div id="geodispersion_summary"> |
35 | 35 | <div class="maj-table center"> |
36 | 36 | <div class="maj-row"> |
37 | - <div class="label">' . I18N::translate('Places found'). '</div> |
|
38 | - <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_found - $nb_other, I18N::percentage($perc_known)). '</div> |
|
37 | + <div class="label">' . I18N::translate('Places found').'</div> |
|
38 | + <div class="value">' . I18N::translate('%1$d (%2$s)', $nb_found - $nb_other, I18N::percentage($perc_known)).'</div> |
|
39 | 39 | </div>'; |
40 | - if($nb_other > 0){ |
|
40 | + if ($nb_other > 0) { |
|
41 | 41 | $perc_other = Functions::safeDivision($nb_other, $nb_found + $nb_unknown); |
42 | 42 | $html .= |
43 | 43 | '<div class="maj-row"> |
44 | - <div class="label">' . I18N::translate('Other places'). '</div> |
|
45 | - <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_other, I18N::percentage($perc_other)). '</div> |
|
44 | + <div class="label">' . I18N::translate('Other places').'</div> |
|
45 | + <div class="value">' . I18N::translate('%1$d (%2$s)', $nb_other, I18N::percentage($perc_other)).'</div> |
|
46 | 46 | </div>'; |
47 | 47 | } |
48 | 48 | $html .= '<div class="maj-row"> |
49 | - <div class="label">' . I18N::translate('Places not found'). '</div> |
|
50 | - <div class="value">' . I18N::translate('%1$d (%2$s)',$nb_unknown, I18N::percentage(1 - $perc_known)). '</div> |
|
49 | + <div class="label">' . I18N::translate('Places not found').'</div> |
|
50 | + <div class="value">' . I18N::translate('%1$d (%2$s)', $nb_unknown, I18N::percentage(1 - $perc_known)).'</div> |
|
51 | 51 | </div> |
52 | 52 | </div> |
53 | 53 | </div> |
54 | 54 | <br/> |
55 | 55 | <div id="geodispersion_data"> |
56 | - ' . $this->htmlAnalysisData(). ' |
|
56 | + ' . $this->htmlAnalysisData().' |
|
57 | 57 | </div>'; |
58 | 58 | |
59 | 59 | return $html; |
@@ -22,44 +22,44 @@ |
||
22 | 22 | * {@inheritDoc} |
23 | 23 | * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisTabGeneralView::htmlAnalysisData() |
24 | 24 | */ |
25 | - protected function htmlAnalysisData() { |
|
26 | - $results = $this->data->get('results'); |
|
27 | - $analysis_level = $this->data->get('analysis_level'); |
|
25 | + protected function htmlAnalysisData() { |
|
26 | + $results = $this->data->get('results'); |
|
27 | + $analysis_level = $this->data->get('analysis_level'); |
|
28 | 28 | |
29 | - $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | - $nb_other = $this->data->get('stats_gen_nb_other'); |
|
29 | + $nb_found = $this->data->get('stats_gen_nb_found'); |
|
30 | + $nb_other = $this->data->get('stats_gen_nb_other'); |
|
31 | 31 | |
32 | - $i=1; |
|
33 | - $previous_nb=0; |
|
32 | + $i=1; |
|
33 | + $previous_nb=0; |
|
34 | 34 | |
35 | - $html='<div class="maj-table center">'; |
|
36 | - foreach($results as $place => $nb){ |
|
37 | - $perc = Functions::safeDivision($nb, $nb_found - $nb_other); |
|
38 | - if($nb!=$previous_nb){ |
|
39 | - $j= I18N::number($i); |
|
40 | - } |
|
41 | - else{ |
|
42 | - $j=' '; |
|
43 | - } |
|
35 | + $html='<div class="maj-table center">'; |
|
36 | + foreach($results as $place => $nb){ |
|
37 | + $perc = Functions::safeDivision($nb, $nb_found - $nb_other); |
|
38 | + if($nb!=$previous_nb){ |
|
39 | + $j= I18N::number($i); |
|
40 | + } |
|
41 | + else{ |
|
42 | + $j=' '; |
|
43 | + } |
|
44 | 44 | |
45 | - $levels = array_map('trim',explode(',', $place)); |
|
46 | - $placename = $levels[$analysis_level-1]; |
|
47 | - if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]); |
|
48 | - $html.= |
|
49 | - '<div class="maj-row"> |
|
45 | + $levels = array_map('trim',explode(',', $place)); |
|
46 | + $placename = $levels[$analysis_level-1]; |
|
47 | + if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]); |
|
48 | + $html.= |
|
49 | + '<div class="maj-row"> |
|
50 | 50 | <div class="label"><strong>'.$j.'</strong></div> |
51 | 51 | <div class="label">'.$placename.'</div> |
52 | 52 | <div class="value">'.I18N::translate('%d',$nb).'</div> |
53 | 53 | <div class="value">'.I18N::percentage($perc,1).'</div> |
54 | 54 | </div>'; |
55 | - $i++; |
|
56 | - $previous_nb=$nb; |
|
57 | - } |
|
55 | + $i++; |
|
56 | + $previous_nb=$nb; |
|
57 | + } |
|
58 | 58 | |
59 | - $html.='</div>'; |
|
59 | + $html.='</div>'; |
|
60 | 60 | |
61 | - return $html; |
|
62 | - } |
|
61 | + return $html; |
|
62 | + } |
|
63 | 63 | |
64 | 64 | } |
65 | 65 | |
66 | 66 | \ No newline at end of file |
@@ -29,34 +29,34 @@ |
||
29 | 29 | $nb_found = $this->data->get('stats_gen_nb_found'); |
30 | 30 | $nb_other = $this->data->get('stats_gen_nb_other'); |
31 | 31 | |
32 | - $i=1; |
|
33 | - $previous_nb=0; |
|
32 | + $i = 1; |
|
33 | + $previous_nb = 0; |
|
34 | 34 | |
35 | - $html='<div class="maj-table center">'; |
|
36 | - foreach($results as $place => $nb){ |
|
35 | + $html = '<div class="maj-table center">'; |
|
36 | + foreach ($results as $place => $nb) { |
|
37 | 37 | $perc = Functions::safeDivision($nb, $nb_found - $nb_other); |
38 | - if($nb!=$previous_nb){ |
|
39 | - $j= I18N::number($i); |
|
38 | + if ($nb != $previous_nb) { |
|
39 | + $j = I18N::number($i); |
|
40 | 40 | } |
41 | - else{ |
|
42 | - $j=' '; |
|
41 | + else { |
|
42 | + $j = ' '; |
|
43 | 43 | } |
44 | 44 | |
45 | - $levels = array_map('trim',explode(',', $place)); |
|
46 | - $placename = $levels[$analysis_level-1]; |
|
47 | - if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]); |
|
48 | - $html.= |
|
45 | + $levels = array_map('trim', explode(',', $place)); |
|
46 | + $placename = $levels[$analysis_level - 1]; |
|
47 | + if ($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level - 2]); |
|
48 | + $html .= |
|
49 | 49 | '<div class="maj-row"> |
50 | 50 | <div class="label"><strong>'.$j.'</strong></div> |
51 | 51 | <div class="label">'.$placename.'</div> |
52 | - <div class="value">'.I18N::translate('%d',$nb).'</div> |
|
53 | - <div class="value">'.I18N::percentage($perc,1).'</div> |
|
52 | + <div class="value">'.I18N::translate('%d', $nb).'</div> |
|
53 | + <div class="value">'.I18N::percentage($perc, 1).'</div> |
|
54 | 54 | </div>'; |
55 | 55 | $i++; |
56 | - $previous_nb=$nb; |
|
56 | + $previous_nb = $nb; |
|
57 | 57 | } |
58 | 58 | |
59 | - $html.='</div>'; |
|
59 | + $html .= '</div>'; |
|
60 | 60 | |
61 | 61 | return $html; |
62 | 62 | } |
@@ -37,14 +37,15 @@ |
||
37 | 37 | $perc = Functions::safeDivision($nb, $nb_found - $nb_other); |
38 | 38 | if($nb!=$previous_nb){ |
39 | 39 | $j= I18N::number($i); |
40 | - } |
|
41 | - else{ |
|
40 | + } else{ |
|
42 | 41 | $j=' '; |
43 | 42 | } |
44 | 43 | |
45 | 44 | $levels = array_map('trim',explode(',', $place)); |
46 | 45 | $placename = $levels[$analysis_level-1]; |
47 | - if($placename == '' && $analysis_level > 1) $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]); |
|
46 | + if($placename == '' && $analysis_level > 1) { |
|
47 | + $placename = I18N::translate('Unknown (%s)', $levels[$analysis_level-2]); |
|
48 | + } |
|
48 | 49 | $html.= |
49 | 50 | '<div class="maj-row"> |
50 | 51 | <div class="label"><strong>'.$j.'</strong></div> |
@@ -17,41 +17,41 @@ |
||
17 | 17 | */ |
18 | 18 | interface CertificateProviderInterface { |
19 | 19 | |
20 | - /** |
|
21 | - * Returns the certificates directory path as it is really (within the firewall directory). |
|
22 | - * |
|
23 | - * @return string Real certificates directory path |
|
24 | - */ |
|
25 | - function getRealCertificatesDirectory(); |
|
20 | + /** |
|
21 | + * Returns the certificates directory path as it is really (within the firewall directory). |
|
22 | + * |
|
23 | + * @return string Real certificates directory path |
|
24 | + */ |
|
25 | + function getRealCertificatesDirectory(); |
|
26 | 26 | |
27 | - /** |
|
28 | - * Returns an array of the folders (cities) in the certificate directory. |
|
29 | - * Cities name are UTF8 encoded. |
|
30 | - * |
|
31 | - * @return array Array of cities name |
|
32 | - */ |
|
33 | - function getCitiesList(); |
|
27 | + /** |
|
28 | + * Returns an array of the folders (cities) in the certificate directory. |
|
29 | + * Cities name are UTF8 encoded. |
|
30 | + * |
|
31 | + * @return array Array of cities name |
|
32 | + */ |
|
33 | + function getCitiesList(); |
|
34 | 34 | |
35 | - /** |
|
36 | - * Returns the list of available certificates for a specified city. |
|
37 | - * Format of the list : |
|
38 | - * < file name , date of the certificate , type of certificate , name of the certificate > |
|
39 | - * Data are UTF8 encoded. |
|
40 | - * |
|
41 | - * @param string $selCity City to look in |
|
42 | - * @return array List of certificates |
|
43 | - */ |
|
44 | - function getCertificatesList($selCity); |
|
35 | + /** |
|
36 | + * Returns the list of available certificates for a specified city. |
|
37 | + * Format of the list : |
|
38 | + * < file name , date of the certificate , type of certificate , name of the certificate > |
|
39 | + * Data are UTF8 encoded. |
|
40 | + * |
|
41 | + * @param string $selCity City to look in |
|
42 | + * @return array List of certificates |
|
43 | + */ |
|
44 | + function getCertificatesList($selCity); |
|
45 | 45 | |
46 | - /** |
|
47 | - * Return the list of certificates from a city $city and containing the characters $contains |
|
48 | - * |
|
49 | - * @param string $city City to search in |
|
50 | - * @param string $contains Characters to match |
|
51 | - * @param string $limit Maximum number of results |
|
52 | - * @return array Array of matching certificates |
|
53 | - */ |
|
54 | - function getCertificatesListBeginWith($city, $contains, $limit); |
|
46 | + /** |
|
47 | + * Return the list of certificates from a city $city and containing the characters $contains |
|
48 | + * |
|
49 | + * @param string $city City to search in |
|
50 | + * @param string $contains Characters to match |
|
51 | + * @param string $limit Maximum number of results |
|
52 | + * @return array Array of matching certificates |
|
53 | + */ |
|
54 | + function getCertificatesListBeginWith($city, $contains, $limit); |
|
55 | 55 | |
56 | 56 | } |
57 | 57 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | /** |
16 | 16 | * Interface for providers of certificates |
17 | 17 | */ |
18 | -interface CertificateProviderInterface { |
|
18 | +interface CertificateProviderInterface { |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Returns the certificates directory path as it is really (within the firewall directory). |
@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | * {@inhericDoc} |
26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
27 | 27 | */ |
28 | - protected function renderContent() { |
|
29 | - ?> |
|
28 | + protected function renderContent() { |
|
29 | + ?> |
|
30 | 30 | <div id="maj-cert-page" class="center"> |
31 | 31 | <h2><?php echo $this->data->get('title'); ?></h2> |
32 | 32 | |
33 | 33 | <?php if($this->data->get('has_certif', false)) { |
34 | - /** @var Certificate $certificate */ |
|
35 | - $certificate = $this->data->get('certificate'); |
|
36 | - $has_linked_indis = $this->data->get('has_linked_indis', false); |
|
37 | - $has_linked_fams = $this->data->get('has_linked_fams', false); |
|
38 | - ?> |
|
34 | + /** @var Certificate $certificate */ |
|
35 | + $certificate = $this->data->get('certificate'); |
|
36 | + $has_linked_indis = $this->data->get('has_linked_indis', false); |
|
37 | + $has_linked_fams = $this->data->get('has_linked_fams', false); |
|
38 | + ?> |
|
39 | 39 | <div id="certificate-details"> |
40 | 40 | <h3> |
41 | 41 | <?php echo $certificate->getCity(); ?> |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | </div> |
87 | 87 | |
88 | 88 | <?php |
89 | - } |
|
89 | + } |
|
90 | 90 | |
91 | 91 | } |
92 | 92 | |
93 | 93 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | <div id="maj-cert-page" class="center"> |
31 | 31 | <h2><?php echo $this->data->get('title'); ?></h2> |
32 | 32 | |
33 | - <?php if($this->data->get('has_certif', false)) { |
|
33 | + <?php if ($this->data->get('has_certif', false)) { |
|
34 | 34 | /** @var Certificate $certificate */ |
35 | 35 | $certificate = $this->data->get('certificate'); |
36 | 36 | $has_linked_indis = $this->data->get('has_linked_indis', false); |
@@ -49,16 +49,16 @@ discard block |
||
49 | 49 | <div id="certificate-edit"> |
50 | 50 | <?php echo $certificate->displayImage(); ?> |
51 | 51 | </div> |
52 | - <?php if($has_linked_indis || $has_linked_fams) { ?> |
|
52 | + <?php if ($has_linked_indis || $has_linked_fams) { ?> |
|
53 | 53 | <ul> |
54 | - <?php if($has_linked_indis) { ?> |
|
54 | + <?php if ($has_linked_indis) { ?> |
|
55 | 55 | <li> |
56 | 56 | <a href="#indi-certificate"> |
57 | 57 | <span id="indisource"><?php echo I18N::translate('Individuals'); ?></span> |
58 | 58 | </a> |
59 | 59 | </li> |
60 | 60 | <?php } ?> |
61 | - <?php if($has_linked_fams) { ?> |
|
61 | + <?php if ($has_linked_fams) { ?> |
|
62 | 62 | <li> |
63 | 63 | <a href="#fam-certificate"> |
64 | 64 | <span id="famsource"><?php echo I18N::translate('Families'); ?></span> |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | <?php } ?> |
68 | 68 | </ul> |
69 | 69 | |
70 | - <?php if($has_linked_indis) { ?> |
|
70 | + <?php if ($has_linked_indis) { ?> |
|
71 | 71 | <div id="indi-certificate"> |
72 | 72 | <?php echo FunctionsPrintLists::individualTable($this->data->get('linked_indis')); ?> |
73 | 73 | </div> |
74 | 74 | <?php } ?> |
75 | 75 | |
76 | - <?php if($has_linked_fams) { ?> |
|
76 | + <?php if ($has_linked_fams) { ?> |
|
77 | 77 | <div id="fam-certificate"> |
78 | 78 | <?php echo FunctionsPrintLists::familyTable($this->data->get('linked_fams')); ?> |
79 | 79 | </div> |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | * {@inhericDoc} |
27 | 27 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
28 | 28 | */ |
29 | - protected function renderContent() { |
|
29 | + protected function renderContent() { |
|
30 | 30 | |
31 | - /** @var AbstractModule $module */ |
|
32 | - $module = $this->data->get('module'); |
|
33 | - ?> |
|
31 | + /** @var AbstractModule $module */ |
|
32 | + $module = $this->data->get('module'); |
|
33 | + ?> |
|
34 | 34 | <ol class="breadcrumb small"> |
35 | 35 | <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> |
36 | 36 | <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li> |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | </form> |
187 | 187 | |
188 | 188 | <?php |
189 | - } |
|
189 | + } |
|
190 | 190 | |
191 | 191 | } |
192 | 192 | |
193 | 193 | \ No newline at end of file |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function getMenu(fw\Tree $tree, $reference) { |
49 | 49 | $tree_url = $tree ? $tree->getNameUrl() : ''; |
50 | 50 | $surname = $reference && is_string($reference) ? $reference : ''; |
51 | - return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow')); |
|
51 | + return new fw\Menu($this->getTitle(), 'module.php?mod='.$this->getName().'&mod_action=Lineage&ged='.$tree_url.'&surname='.$surname, 'menu-maj-list-lineage', array('rel' => 'nofollow')); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | } |
@@ -18,40 +18,40 @@ |
||
18 | 18 | * Patronymic Lineage Module. |
19 | 19 | */ |
20 | 20 | class PatronymicLineageModule extends fw\Module\AbstractModule |
21 | - implements ModuleMenuItemInterface |
|
21 | + implements ModuleMenuItemInterface |
|
22 | 22 | { |
23 | - /** @var string For custom modules - link for support, upgrades, etc. */ |
|
24 | - const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
23 | + /** @var string For custom modules - link for support, upgrades, etc. */ |
|
24 | + const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
|
25 | 25 | |
26 | - /** |
|
27 | - * {@inhericDoc} |
|
28 | - */ |
|
29 | - public function getTitle() { |
|
30 | - return /* I18N: Name of the “Patronymic lineage” module */ I18N::translate('Patronymic Lineages'); |
|
31 | - } |
|
26 | + /** |
|
27 | + * {@inhericDoc} |
|
28 | + */ |
|
29 | + public function getTitle() { |
|
30 | + return /* I18N: Name of the “Patronymic lineage” module */ I18N::translate('Patronymic Lineages'); |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * {@inhericDoc} |
|
35 | - */ |
|
36 | - public function getDescription() { |
|
37 | - return /* I18N: Description of the “Patronymic lineage” module */ I18N::translate('Display lineages of people holding the same surname.'); |
|
38 | - } |
|
33 | + /** |
|
34 | + * {@inhericDoc} |
|
35 | + */ |
|
36 | + public function getDescription() { |
|
37 | + return /* I18N: Description of the “Patronymic lineage” module */ I18N::translate('Display lineages of people holding the same surname.'); |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * {@inhericDoc} |
|
42 | - */ |
|
43 | - public function modAction($mod_action) { |
|
44 | - \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
45 | - } |
|
46 | - /** |
|
47 | - * {@inhericDoc} |
|
48 | - * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
|
49 | - */ |
|
50 | - public function getMenu(fw\Tree $tree, $reference) { |
|
51 | - $tree_url = $tree ? $tree->getNameUrl() : ''; |
|
52 | - $surname = $reference && is_string($reference) ? $reference : ''; |
|
53 | - return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow')); |
|
54 | - } |
|
40 | + /** |
|
41 | + * {@inhericDoc} |
|
42 | + */ |
|
43 | + public function modAction($mod_action) { |
|
44 | + \MyArtJaub\Webtrees\Mvc\Dispatcher::getInstance()->handle($this, $mod_action); |
|
45 | + } |
|
46 | + /** |
|
47 | + * {@inhericDoc} |
|
48 | + * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
|
49 | + */ |
|
50 | + public function getMenu(fw\Tree $tree, $reference) { |
|
51 | + $tree_url = $tree ? $tree->getNameUrl() : ''; |
|
52 | + $surname = $reference && is_string($reference) ? $reference : ''; |
|
53 | + return new fw\Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&mod_action=Lineage&ged=' . $tree_url . '&surname=' . $surname , 'menu-maj-list-lineage', array('rel' => 'nofollow')); |
|
54 | + } |
|
55 | 55 | |
56 | 56 | } |
57 | 57 | |
58 | 58 | \ No newline at end of file |
@@ -22,20 +22,20 @@ |
||
22 | 22 | * {@inhericDoc} |
23 | 23 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
24 | 24 | */ |
25 | - protected function renderContent() { |
|
26 | - if($this->data->get('has_stats', false)) { |
|
27 | - $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' , |
|
28 | - '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>', |
|
29 | - date('Y'), |
|
30 | - '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
31 | - ); |
|
32 | - } |
|
33 | - else { |
|
34 | - $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
|
35 | - } |
|
25 | + protected function renderContent() { |
|
26 | + if($this->data->get('has_stats', false)) { |
|
27 | + $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' , |
|
28 | + '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>', |
|
29 | + date('Y'), |
|
30 | + '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
31 | + ); |
|
32 | + } |
|
33 | + else { |
|
34 | + $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
|
35 | + } |
|
36 | 36 | |
37 | - return $html; |
|
38 | - } |
|
37 | + return $html; |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | 41 | } |
@@ -23,11 +23,11 @@ |
||
23 | 23 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
24 | 24 | */ |
25 | 25 | protected function renderContent() { |
26 | - if($this->data->get('has_stats', false)) { |
|
27 | - $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' , |
|
28 | - '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>', |
|
26 | + if ($this->data->get('has_stats', false)) { |
|
27 | + $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)', |
|
28 | + '<span class="odometer">'.I18N::number($this->data->get('visits_year')).'</span>', |
|
29 | 29 | date('Y'), |
30 | - '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
|
30 | + '<span class="odometer">'.I18N::number($this->data->get('visits_today')).'</span>' |
|
31 | 31 | ); |
32 | 32 | } |
33 | 33 | else { |
@@ -29,8 +29,7 @@ |
||
29 | 29 | date('Y'), |
30 | 30 | '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>' |
31 | 31 | ); |
32 | - } |
|
33 | - else { |
|
32 | + } else { |
|
34 | 33 | $html = I18N::translate('No statistics could be retrieved from Piwik.'); |
35 | 34 | } |
36 | 35 |
@@ -23,51 +23,51 @@ |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
26 | + protected function renderContent() { |
|
27 | 27 | |
28 | - return ' |
|
28 | + return ' |
|
29 | 29 | <tr> |
30 | 30 | <td class="descriptionbox wrap width33">' . |
31 | - I18N::translate('Enable Piwik Statistics') . |
|
32 | - // Ideally, would like to add helpLink, but this does not work for modules... |
|
33 | - // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
|
34 | - '</td> |
|
31 | + I18N::translate('Enable Piwik Statistics') . |
|
32 | + // Ideally, would like to add helpLink, but this does not work for modules... |
|
33 | + // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
|
34 | + '</td> |
|
35 | 35 | <td class="optionbox">' . |
36 | - FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
37 | - '</td> |
|
36 | + FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
37 | + '</td> |
|
38 | 38 | </tr>' . |
39 | 39 | |
40 | - '<tr> |
|
40 | + '<tr> |
|
41 | 41 | <td class="descriptionbox wrap width33">' . |
42 | - I18N::translate('Piwik URL') . |
|
43 | - '</td> |
|
42 | + I18N::translate('Piwik URL') . |
|
43 | + '</td> |
|
44 | 44 | <td class="optionbox"> |
45 | 45 | <input type="text" name="piwik_url" size="45" value="' . |
46 | - $this->data->get('piwik_url', '') . '" /> |
|
46 | + $this->data->get('piwik_url', '') . '" /> |
|
47 | 47 | </td> |
48 | 48 | </tr>' . |
49 | 49 | |
50 | - '<tr> |
|
50 | + '<tr> |
|
51 | 51 | <td class="descriptionbox wrap width33">' . |
52 | - I18N::translate('Piwik Token') . |
|
53 | - '</td> |
|
52 | + I18N::translate('Piwik Token') . |
|
53 | + '</td> |
|
54 | 54 | <td class="optionbox"> |
55 | 55 | <input type="text" name="piwik_token" size="45" value="' . |
56 | - $this->data->get('piwik_token', '') . '" /> |
|
56 | + $this->data->get('piwik_token', '') . '" /> |
|
57 | 57 | </td> |
58 | 58 | </tr>' . |
59 | 59 | |
60 | - '<tr> |
|
60 | + '<tr> |
|
61 | 61 | <td class="descriptionbox wrap width33">' . |
62 | - I18N::translate('Piwik Site ID') . |
|
63 | - '</td> |
|
62 | + I18N::translate('Piwik Site ID') . |
|
63 | + '</td> |
|
64 | 64 | <td class="optionbox"> |
65 | 65 | <input type="text" name="piwik_siteid" size="4" value="' . |
66 | - $this->data->get('piwik_siteid', '') . '" /> |
|
66 | + $this->data->get('piwik_siteid', '') . '" /> |
|
67 | 67 | </td> |
68 | 68 | </tr>' ; |
69 | 69 | |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | 72 | |
73 | 73 | } |
@@ -28,42 +28,42 @@ |
||
28 | 28 | return ' |
29 | 29 | <tr> |
30 | 30 | <td class="descriptionbox wrap width33">' . |
31 | - I18N::translate('Enable Piwik Statistics') . |
|
31 | + I18N::translate('Enable Piwik Statistics'). |
|
32 | 32 | // Ideally, would like to add helpLink, but this does not work for modules... |
33 | 33 | // FunctionsPrint::helpLink('piwik_enabled', $this->getName()); |
34 | 34 | '</td> |
35 | 35 | <td class="optionbox">' . |
36 | - FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')) . |
|
36 | + FunctionsEdit::editFieldYesNo('piwik_enabled', $this->data->get('piwik_enabled', '0')). |
|
37 | 37 | '</td> |
38 | 38 | </tr>' . |
39 | 39 | |
40 | 40 | '<tr> |
41 | 41 | <td class="descriptionbox wrap width33">' . |
42 | - I18N::translate('Piwik URL') . |
|
42 | + I18N::translate('Piwik URL'). |
|
43 | 43 | '</td> |
44 | 44 | <td class="optionbox"> |
45 | 45 | <input type="text" name="piwik_url" size="45" value="' . |
46 | - $this->data->get('piwik_url', '') . '" /> |
|
46 | + $this->data->get('piwik_url', '').'" /> |
|
47 | 47 | </td> |
48 | 48 | </tr>' . |
49 | 49 | |
50 | 50 | '<tr> |
51 | 51 | <td class="descriptionbox wrap width33">' . |
52 | - I18N::translate('Piwik Token') . |
|
52 | + I18N::translate('Piwik Token'). |
|
53 | 53 | '</td> |
54 | 54 | <td class="optionbox"> |
55 | 55 | <input type="text" name="piwik_token" size="45" value="' . |
56 | - $this->data->get('piwik_token', '') . '" /> |
|
56 | + $this->data->get('piwik_token', '').'" /> |
|
57 | 57 | </td> |
58 | 58 | </tr>' . |
59 | 59 | |
60 | 60 | '<tr> |
61 | 61 | <td class="descriptionbox wrap width33">' . |
62 | - I18N::translate('Piwik Site ID') . |
|
62 | + I18N::translate('Piwik Site ID'). |
|
63 | 63 | '</td> |
64 | 64 | <td class="optionbox"> |
65 | 65 | <input type="text" name="piwik_siteid" size="4" value="' . |
66 | - $this->data->get('piwik_siteid', '') . '" /> |
|
66 | + $this->data->get('piwik_siteid', '').'" /> |
|
67 | 67 | </td> |
68 | 68 | </tr>' ; |
69 | 69 |