Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SirsiDynix UI Update #34

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
fe7f159
First pass CSS Merge
pontifechs Oct 7, 2015
6ee0996
Merging Ryan's CSS
pontifechs Oct 7, 2015
7d28764
Mis-merges
pontifechs Oct 8, 2015
d4f711a
Fixing whitespace causing underlines
pontifechs Oct 9, 2015
c70ffc8
CAMP-786 Removed the fish icons
DavidRappleye Nov 10, 2015
42eb20d
CAMP-786 Updated the usage favicon link
DavidRappleye Nov 12, 2015
987bc89
CAMP-853: Merged Ryan's CSS Changes
Dec 28, 2015
cdf1d7d
CAMP-853: Merged Ryan's CSS Changes
Dec 28, 2015
5117e2b
CAMP-853: Final CSS Changes
chisumism Jan 14, 2016
6200c98
CAMP-834: Fixed a bug in the install script for step 4 of the install…
Jan 19, 2016
450662f
CAMP-853: Finalizing CSS
chisumism Jan 27, 2016
9834a87
CAMP-853: Final CSS
chisumism Jan 29, 2016
fb6b43d
Added ajax error callback function for error 499 failues
Feb 2, 2016
c62d1d1
Added ajax error callback function for error 499 failues
Feb 2, 2016
d905e87
Added ajax error callback function for error 499 failues
Feb 2, 2016
d38e52e
Removed ajax error callback function for error 499 failues -- didn't …
Feb 3, 2016
1f0795d
Added Help Link to Logout Menu
chisumism Feb 22, 2016
36d05d7
CAMP-925: Various Layout Fixes/Issues and Downtime CSS
chisumism Mar 9, 2016
e444a96
CAMP-925: Various Layout Fixes/Issues and Downtime CSS
chisumism Mar 9, 2016
d93b4d2
Added Classes to Buttons
chisumism Mar 30, 2016
bf4a014
Made Sort Arrows Consistent
chisumism Mar 31, 2016
c91e956
Adding Localization
Apr 13, 2016
665a6d2
Adding Localization
Apr 14, 2016
25a29f6
Adding Localization
Apr 14, 2016
84e5b09
Adding Localization
Apr 17, 2016
304229c
Adding Localization
Apr 18, 2016
ee1f1fb
Merge branch 'master' of https://github.com/pontifechs/usage
Apr 18, 2016
c0d3c6a
Adding Localization
Apr 18, 2016
b513fcf
Adding Localization
Apr 18, 2016
48ca6cc
Adding Localization
Apr 18, 2016
21bdbcb
Adding Localization
Apr 18, 2016
8f5dae0
Adding Localization
Apr 18, 2016
6698ee0
Adding Localization
Apr 18, 2016
b4e3e5b
Adding Localization
Apr 19, 2016
0b29b99
Relocating Language Dropdown
chisumism May 2, 2016
841c964
New French Images
May 2, 2016
b0f7ea5
Moved Language Dropdown/Main Menu Images
chisumism May 3, 2016
8d6adee
New French Images
May 4, 2016
5329127
Updated French Images
May 4, 2016
d722d45
Patched Security Hole
May 4, 2016
fb9c6d5
Merged V1.2
May 5, 2016
326c854
New Translatable Menu and Change Module Drop-Down
May 10, 2016
dad203b
Images for new translatable menu and drop-down
May 10, 2016
b66fe15
Menu Fix
May 10, 2016
4c72c1f
Newly Designed Title Bars
chisumism May 11, 2016
724614d
French Translations for New Title Header
May 11, 2016
14af64d
French Translations for New Title Header
May 11, 2016
e8d0804
Added Open Sans Font
chisumism May 11, 2016
2536d31
Hello, logout, and help translations
May 12, 2016
f809598
Replaced space colon with colon in French translations
Jun 6, 2016
e988eb5
Fixed Language Code -- changed all references to look at 5 characters…
Jun 13, 2016
f6bdd8f
Changed Modal Scrollability
chisumism Jun 13, 2016
db4c6b8
Updates from merging our code with CORAL's
Jun 23, 2016
8d65815
Updates from merging our code with CORAL's
Jun 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
/admin/configuration.ini
/archive/*
/logs/*
/sushistore/*
.DS_Store
/admin/configuration.ini
/archive/*
/logs/*
/sushistore/*
*.bak
29 changes: 29 additions & 0 deletions LangCodes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* @author: Cesar Hernandez
* getLanguage: This method return the language code
* getNameLang: This method return the name of the language
*/
class LangCodes{
public function getLanguage($code){
$all_lang=array(
'fr_FR'=>'fr_FR',
'en_US'=>'en_US'//,
//'zh_CN'=>'zh_CN',
//'zh_TW'=>'zh_TW',
//'de_DE'=>'de_DE'
);
return array_key_exists($code, $all_lang) ? $all_lang[$code] : "en_US";
}
public function getNameLang($code_lang){
$name_lang=array(
'fr_FR'=>'Français',
'en_US'=>'English'//,
//'zh_CN'=>'中文 (中国)',
//'zh_TW'=>'中文 (台灣)',
//'de_DE'=>'Deutsch'
);
return array_key_exists($code_lang, $name_lang) ? $name_lang[$code_lang] : "English";
}
}
?>
77 changes: 38 additions & 39 deletions README
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
**************************
Installation
Copy this entire directory to your web server under a directory named '/coral/usage/', then point your web browser to:
http://your_server/coral/usage/install/
and follow instructions

For the manual install, refer to the Technical Documentation available on http://erm.library.nd.edu


**************************
License / Copyright notices

Copyright (c) 2013 University of Notre Dame
This file is part of CORAL.
CORAL 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, either version 3 of the License, or (at your option) any later version.
CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.


Parts of code used in the SushiService class is reused from Sushi Starters. Here is their license:
Copyright (c) 2011, Cranfield University
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



More information on Sushi Starters here:
http://cclibweb-4.dmz.cranfield.ac.uk/projects/sushistarters/



**************************
To contact the CORAL Developers:
[email protected]
**************************
Installation
Copy this entire directory to your web server under a directory named '/coral/usage/', then point your web browser to:
http://your_server/coral/usage/install/
and follow instructions

For the manual install, refer to the Technical Documentation available on http://erm.library.nd.edu

**************************
License / Copyright notices

Copyright (c) 2013 University of Notre Dame
This file is part of CORAL.
CORAL 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, either version 3 of the License, or (at your option) any later version.
CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.


Parts of code used in the SushiService class is reused from Sushi Starters. Here is their license:
Copyright (c) 2011, Cranfield University
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



More information on Sushi Starters here:
http://cclibweb-4.dmz.cranfield.ac.uk/projects/sushistarters/



**************************
To contact the CORAL Developers:
[email protected]
18 changes: 9 additions & 9 deletions admin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$pageTitle = 'Administration';
$pageTitle = _('Administration');
include 'templates/header.php';


Expand All @@ -9,11 +9,11 @@

<table class="headerTable">
<tr><td>
<span class="headerText">Users</span>&nbsp;&nbsp;<span id='span_User_response' class='redText'></span>
<br /><span id='span_newUser' class='adminAddInput'><a href='ajax_forms.php?action=getAdminUserUpdateForm&height=196&width=248&modal=true' class='thickbox' id='expression'>add new user</a></span>
<span class="headerText"><?php echo _("Users");?></span>&nbsp;&nbsp;<span id='span_User_response' class='redText'></span>
<br /><span id='span_newUser' class='adminAddInput'><a href='ajax_forms.php?action=getAdminUserUpdateForm&height=196&width=248&modal=true' class='thickbox' id='expression'><?php echo _("add new user");?></a></span>
<br /><br />
<div id='div_User'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -24,11 +24,11 @@

<table class="headerTable">
<tr><td>
<span class="headerText">Email addresses for logs</span>&nbsp;&nbsp;<span id='span_EmailAddress_response'></span>
<br /><span id='span_newEmailAddress' class='adminAddInput'><a href='ajax_forms.php?action=getLogEmailAddressForm&height=122&width=238&modal=true' class='thickbox'>add new email address</a></span>
<span class="headerText"><?php echo _("Email addresses for logs");?></span>&nbsp;&nbsp;<span id='span_EmailAddress_response'></span>
<br /><span id='span_newEmailAddress' class='adminAddInput'><a href='ajax_forms.php?action=getLogEmailAddressForm&height=122&width=238&modal=true' class='thickbox'><?php echo _("add new email address");?></a></span>
<br /><br />
<div id='div_emailAddresses'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -40,10 +40,10 @@

<table class="headerTable">
<tr><td>
<span class="headerText">Outlier Parameters</span>&nbsp;&nbsp;<span id='span_Outlier_response'></span>
<span class="headerText"><?php echo _("Outlier Parameters");?></span>&nbsp;&nbsp;<span id='span_Outlier_response'></span>
<br /><br />
<div id='div_outliers'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand Down
66 changes: 35 additions & 31 deletions admin/classes/common/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
<?php
/*
**************************************************************************************************************************
** CORAL Usage Statistics Module
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL 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, either version 3 of the License, or (at your option) any later version.
**
** CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/


class Configuration extends DynamicObject {

public function init(NamedArguments $arguments) {
$arguments->setDefaultValueForArgumentName('filename', BASE_DIR . '/admin/configuration.ini');
$config = parse_ini_file($arguments->filename, true);
foreach ($config as $section => $entries) {
$this->$section = Utility::objectFromArray($entries);
}
}

}

<?php
/*
**************************************************************************************************************************
** CORAL Usage Statistics Module
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL 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, either version 3 of the License, or (at your option) any later version.
**
** CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/


class Configuration extends DynamicObject {

public function init(NamedArguments $arguments) {
$arguments->setDefaultValueForArgumentName('filename', BASE_DIR . 'admin/configuration.ini');
if ((file_exists($arguments->filename)) and (is_readable($arguments->filename))) {
$config = parse_ini_file($arguments->filename, true);
} else {
die( BASE_DIR . 'admin/configuration.ini is missing or unreadable.');
}
foreach ($config as $section => $entries) {
$this->$section = Utility::objectFromArray($entries);
}
}

}

?>
2 changes: 1 addition & 1 deletion admin/classes/common/DBService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function dealloc() {

protected function checkForError() {
if ($this->error = mysqli_error($this->db)) {
throw new Exception("There was a problem with the database: " . $this->error);
throw new Exception(_("There was a problem with the database: ") . $this->error);
}
}

Expand Down
126 changes: 63 additions & 63 deletions admin/classes/common/LdapPerson.php
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
<?php
/*
**************************************************************************************************************************
** CORAL Usage Statistics Module
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL 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, either version 3 of the License, or (at your option) any later version.
**
** CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/


class LdapPerson extends DynamicObject {

public function __construct($userKey) {

$config = new Configuration;

//try to connect to ldap if the settings are entered
if ($config->ldap->host) {

//If you are using OpenLDAP 2.x.x you can specify a URL instead of the hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL support, configure PHP with SSL, and set this parameter as ldaps://hostname/.
//note that connect happens regardless if host is valid
$ds = ldap_connect($config->ldap->host);

//may need ldap_bind( $ds, $username, $password )
$bd = ldap_bind($ds) or die("<br /><h3>Could not connect to " . $config->ldap->host . "</h3>");

if ($bd){
$filter = $config->ldap->search_key . "=" . $userKey;

$sr = ldap_search($ds, $config->ldap->base_dn, $filter);

if ($entries = ldap_get_entries($ds, $sr)) {
$entry = $entries[0];

$fieldNames = array('fname', 'lname', 'email', 'phone', 'department', 'title', 'address');

foreach ($fieldNames as $fieldName) {
$configName = $fieldName . '_field';

$this->$fieldName = $entry[$config->ldap->$configName][0];

}
$this->fullname = addslashes($this->fname . ' ' . $this->lname);

}

ldap_close($ds);

}
}
}

}

<?php
/*
**************************************************************************************************************************
** CORAL Usage Statistics Module
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL 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, either version 3 of the License, or (at your option) any later version.
**
** CORAL 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 CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
class LdapPerson extends DynamicObject {
public function __construct($userKey) {
$config = new Configuration;
//try to connect to ldap if the settings are entered
if ($config->ldap->host) {
//If you are using OpenLDAP 2.x.x you can specify a URL instead of the hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL support, configure PHP with SSL, and set this parameter as ldaps://hostname/.
//note that connect happens regardless if host is valid
$ds = ldap_connect($config->ldap->host);
//may need ldap_bind( $ds, $username, $password )
$bd = ldap_bind($ds) or die("<br /><h3>"._("Could not connect to ") . $config->ldap->host . "</h3>");
if ($bd){
$filter = $config->ldap->search_key . "=" . $userKey;
$sr = ldap_search($ds, $config->ldap->base_dn, $filter);
if ($entries = ldap_get_entries($ds, $sr)) {
$entry = $entries[0];
$fieldNames = array('fname', 'lname', 'email', 'phone', 'department', 'title', 'address');
foreach ($fieldNames as $fieldName) {
$configName = $fieldName . '_field';
$this->$fieldName = $entry[$config->ldap->$configName][0];
}
$this->fullname = addslashes($this->fname . ' ' . $this->lname);
}
ldap_close($ds);
}
}
}
}
?>
Loading