forked from science-ation/science-ation
Show awards imported from external sources differently in the awards list
Better handle award identifiers Add a missing <br /> on import
This commit is contained in:
parent
3f3d242f6d
commit
566c1d1573
@ -381,6 +381,7 @@ echo mysql_error();
|
|||||||
award_awards.id,
|
award_awards.id,
|
||||||
award_awards.name,
|
award_awards.name,
|
||||||
award_awards.order,
|
award_awards.order,
|
||||||
|
award_awards.award_sources_id,
|
||||||
award_types.type,
|
award_types.type,
|
||||||
award_sponsors.organization
|
award_sponsors.organization
|
||||||
|
|
||||||
@ -415,9 +416,11 @@ echo mysql_error();
|
|||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
$hasexternal=false;
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
{
|
{
|
||||||
echo "<tr>\n";
|
if($r->award_sources_id){ $cl="class=\"externalaward\""; $hasexternal=true; } else $cl="";
|
||||||
|
echo "<tr $cl>\n";
|
||||||
echo " <td><input type=\"text\" name=\"reorder[$r->id]\" value=\"$r->order\" size=\"3\" /></td>\n";
|
echo " <td><input type=\"text\" name=\"reorder[$r->id]\" value=\"$r->order\" size=\"3\" /></td>\n";
|
||||||
echo " <td>$r->organization</td>\n";
|
echo " <td>$r->organization</td>\n";
|
||||||
echo " <td>$r->type</td>\n";
|
echo " <td>$r->type</td>\n";
|
||||||
@ -441,7 +444,8 @@ echo mysql_error();
|
|||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
if($hasexternal)
|
||||||
|
echo "<tr class=\"externalaward\"><td colspan=\"6\">".i18n("Indicates award imported from an external source")."</td></tr>";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<input type=\"submit\" value=\"".i18n("Re-order awards")."\" />";
|
echo "<input type=\"submit\" value=\"".i18n("Re-order awards")."\" />";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
echo i18n("Award Name: %1",array($award['name_en'][0]))."<br />";
|
echo i18n("Award Name: %1",array($award['name_en'][0]))."<br />";
|
||||||
|
|
||||||
if($year==$config['FAIRYEAR']) {
|
if($year==$config['FAIRYEAR']) {
|
||||||
$tq=mysql_query("SELECT * FROM award_awards WHERE external_identifier='$identifier' AND year='$year'");
|
$tq=mysql_query("SELECT * FROM award_awards WHERE external_identifier='$identifier' AND award_sources_id='$checksource' AND year='$year'");
|
||||||
if($awardrecord=mysql_fetch_object($tq)) {
|
if($awardrecord=mysql_fetch_object($tq)) {
|
||||||
echo i18n("Award already exists, updating info")."<br />";
|
echo i18n("Award already exists, updating info")."<br />";
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ echo mysql_error();
|
|||||||
|
|
||||||
//remove any awards that are left in the $existingawards array, they must have been removed from the source
|
//remove any awards that are left in the $existingawards array, they must have been removed from the source
|
||||||
foreach($existingawards AS $aid) {
|
foreach($existingawards AS $aid) {
|
||||||
echo i18n("Removing award id %1 that was removed from external source",array($aid));
|
echo i18n("Removing award id %1 that was removed from external source",array($aid))."<br />";
|
||||||
mysql_query("DELETE FROM award_prizes WHERE award_awards_id='$aid'");
|
mysql_query("DELETE FROM award_prizes WHERE award_awards_id='$aid'");
|
||||||
mysql_query("DELETE FROM award_awards WHERE id='$aid'");
|
mysql_query("DELETE FROM award_awards WHERE id='$aid'");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user