Add period support to chant and chant_edit pages
This commit is contained in:
parent
e628dad50e
commit
d1ef6af25c
|
|
@ -125,7 +125,7 @@ if(count($c_p) > 0) {
|
||||||
echo "<h4>Sources</h4>\n<ul>\n";
|
echo "<h4>Sources</h4>\n<ul>\n";
|
||||||
$cnt = 1;
|
$cnt = 1;
|
||||||
foreach($c_p as $s) {
|
foreach($c_p as $s) {
|
||||||
$source_label = "<i>".$sources[$s[0]]['title'].", ".$sources[$s[0]]['editor'].", ".$sources[$s[0]]['year']."</i>".($s[1]>''?", p. ".$s[1]:'');
|
$source_label = "<i>".$sources[$s[0]]['title'].", ".$sources[$s[0]]['editor'].", ".($sources[$s[0]]['period']?$sources[$s[0]]['period']:$sources[$s[0]]['year'])."</i>".($s[1]>''?", p. ".$s[1]:'');
|
||||||
if (count($s) > 2) {
|
if (count($s) > 2) {
|
||||||
echo '<li><a href="#source_'.$cnt.'">'.$source_label."</a></li>\n";
|
echo '<li><a href="#source_'.$cnt.'">'.$source_label."</a></li>\n";
|
||||||
$sources_img .= '<p><a name="source_'.$cnt.'">'.$source_label."</a> ";
|
$sources_img .= '<p><a name="source_'.$cnt.'">'.$source_label."</a> ";
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ if(!$logged_in) {
|
||||||
$sources_box = '<select class="sources" name="source[]">'."\n";
|
$sources_box = '<select class="sources" name="source[]">'."\n";
|
||||||
$sources_box .= '<option value="0">Choose source</option>'."\n";
|
$sources_box .= '<option value="0">Choose source</option>'."\n";
|
||||||
foreach ($sources as $k => $s) {
|
foreach ($sources as $k => $s) {
|
||||||
$sources_box .= '<option value="'.$k.'"'.($k==$so?' selected="selected"':'').">".$s['year'].' - '.$s['title'].' ('.$s['editor'].")</option>\n";
|
$sources_box .= '<option value="'.$k.'"'.($k==$so?' selected="selected"':'').">".($s['period']?$s['period']:$s['year']).' - '.$s['title'].' ('.$s['editor'].")</option>\n";
|
||||||
}
|
}
|
||||||
$sources_box .= "</select>\n";
|
$sources_box .= "</select>\n";
|
||||||
echo $sources_box;
|
echo $sources_box;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue