forked from science-ation/science-ation
Migrate css to a theme and setup to allow multiple themes
Begin adding icons to the default theme and reorganizing the admin index
This commit is contained in:
parent
1f6da29aac
commit
517455ee13
@ -32,11 +32,19 @@
|
||||
array('Committee Main' => 'committee_main.php') );
|
||||
|
||||
echo "<br />";
|
||||
echo "<a href=\"registration.php\">".i18n("Participant Registration")."</a> <br />";
|
||||
echo "<a href=\"reports.php\">".i18n("Print / Export Reports")."</a> <br />";
|
||||
echo "<a href=\"reports_ceremony.php\">".i18n("Print Award Ceremony Scripts")."</a> <br />";
|
||||
echo "<table class=\"adminconfigtable\">";
|
||||
echo " <tr>";
|
||||
echo " <td><a href=\"registration.php\">".theme_icon("participant_registration")."<br />".i18n("Participant Registration")."</a></td>";
|
||||
echo " <td><a href=\"reports.php\">".theme_icon("print/export_reports")."<br />".i18n("Print / Export Reports")."</a></td>";
|
||||
echo " <td><a href=\"reports_ceremony.php\">".theme_icon("print_awards_ceremony_scripts")."<br />".i18n("Print Award Ceremony Scripts")."</a></td>";
|
||||
echo " </tr>";
|
||||
echo "</table>\n";
|
||||
echo "<hr />";
|
||||
echo "<a href=\"committees.php\">".i18n("Committee Management")."</a> <br />";
|
||||
echo "<table class=\"adminconfigtable\">";
|
||||
echo " <tr>";
|
||||
echo " <td><a href=\"committees.php\">".theme_icon("committee_management")."<br />".i18n("Committee Management")."</a></td>";
|
||||
echo " </tr>";
|
||||
echo "</table>\n";
|
||||
echo "<a href=\"awards.php\">".i18n("Awards Management")."</a> <br />";
|
||||
echo "<a href=\"schools.php\">".i18n("School Management")."</a> <br />";
|
||||
echo "<a href=\"judges.php\">".i18n("Judging Management")."</a> <br />";
|
||||
|
@ -178,6 +178,9 @@ while($r=mysql_fetch_object($q))
|
||||
$config['dates'][$r->name]=$r->date;
|
||||
}
|
||||
|
||||
//and now pull the theme
|
||||
require_once("theme/".$config['theme']."/theme.php");
|
||||
|
||||
require_once("committee.inc.php");
|
||||
|
||||
if($config['SFIABDIRECTORY'] == '') {
|
||||
@ -371,8 +374,8 @@ function send_header($title="", $nav=null)
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
||||
<head><title><?=i18n($title)?></title>
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/sfiab.css" type="text/css" />
|
||||
<link media=all href="<?=$config['SFIABDIRECTORY']?>/tableeditor.css" type=text/css rel=stylesheet>
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/theme/<?=$config['theme']?>/sfiab.css" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/tableeditor.css" type="text/css" media="all" />
|
||||
</head>
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript">
|
||||
@ -1058,4 +1061,12 @@ $CWSFDivisions=array(
|
||||
7=>"Physical & Mathematical Sciences"
|
||||
);
|
||||
|
||||
function theme_icon($icon) {
|
||||
global $theme;
|
||||
global $config;
|
||||
if($theme['icons'][$icon])
|
||||
return "<img src=\"".$config['SFIABDIRECTORY']."/theme/".$config['theme']."/icons/".$theme['icons'][$icon]."\" border=\"0\" alt=\"".htmlspecialchars($icon)."\">";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
?>
|
||||
|
@ -1 +1 @@
|
||||
107
|
||||
108
|
||||
|
2
db/db.update.108.sql
Normal file
2
db/db.update.108.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES (
|
||||
'theme', 'default', 'Global', 'text', '', '850', 'Theme for colours/icons', '-1');
|
BIN
theme/default/icons/accessories-text-editor.png
Normal file
BIN
theme/default/icons/accessories-text-editor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
BIN
theme/default/icons/application-pdf.png
Normal file
BIN
theme/default/icons/application-pdf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
theme/default/icons/plasmagik.png
Normal file
BIN
theme/default/icons/plasmagik.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
theme/default/icons/system-users.png
Normal file
BIN
theme/default/icons/system-users.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -294,3 +294,15 @@ tr.externalaward {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.adminconfigtable {
|
||||
border-collapse: collapse;
|
||||
font-size: 0.8em;
|
||||
|
||||
}
|
||||
|
||||
.adminconfigtable td {
|
||||
text-align: center;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
width: 128px;
|
||||
}
|
62
theme/default/theme.php
Normal file
62
theme/default/theme.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?
|
||||
/*
|
||||
This file is part of the 'Science Fair In A Box' project
|
||||
SFIAB Website: http://www.sfiab.ca
|
||||
|
||||
Copyright (C) 2008 James Grant <james@lightbox.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation, version 2.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
$theme['name']="default";
|
||||
$theme['description']="The default theme, with KDE4 icons";
|
||||
$theme['author']="James Grant <james@lightbox.org>";
|
||||
|
||||
//ADMIN ICONS
|
||||
$theme['icons']['participant_registration']="accessories-text-editor.png";
|
||||
$theme['icons']['print/export_reports']="application-pdf.png";
|
||||
$theme['icons']['print_awards_ceremony_scripts']="application-pdf.png";
|
||||
$theme['icons']['committee_management']="system-users.png";
|
||||
$theme['icons']['awards_management']="plasmagik.png";
|
||||
$theme['icons']['school_management']="";
|
||||
$theme['icons']['judging_management']="";
|
||||
$theme['icons']['translations_management']="";
|
||||
$theme['icons']['report_management']="";
|
||||
$theme['icons']['volunteer_management']="";
|
||||
$theme['icons']['tour_management']="";
|
||||
$theme['icons']['internal_document_management']="";
|
||||
$theme['icons']['enter_winning_projects']="";
|
||||
$theme['icons']['one-click_cwsf_registration']="";
|
||||
$theme['icons']['one-click_ysf_affiliation_stats']="";
|
||||
$theme['icons']['communication']="";
|
||||
|
||||
//CONFIG ICONS
|
||||
$theme['icons']['configuration_variables']="";
|
||||
$theme['icons']['important_dates']="";
|
||||
$theme['icons']['project_age_categories']="";
|
||||
$theme['icons']['project_divisions']="";
|
||||
$theme['icons']['cwsf_project_divisions']="";
|
||||
$theme['icons']['project_sub_divisions']="";
|
||||
$theme['icons']['page_texts']="";
|
||||
$theme['icons']['exhibitor_signature_page']="";
|
||||
$theme['icons']['judge_registration_questions']="";
|
||||
$theme['icons']['project_safety_questions']="";
|
||||
$theme['icons']['images']="";
|
||||
$theme['icons']['external_award_sources']="";
|
||||
$theme['icons']['language_pack_installer']="";
|
||||
$theme['icons']['new_version_checker']="";
|
||||
$theme['icons']['rollover_fair_year']="";
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user