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 #28

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
679dfed
First pass CSS Merge
pontifechs Oct 7, 2015
314f259
CAMP-786 Removed the fish icons
DavidRappleye Nov 10, 2015
b652f2b
CAMP-853: Merged Ryan's CSS Changes
Dec 28, 2015
944c7c1
CAMP-853: Merged Ryan's CSS Changes
Dec 28, 2015
950ad45
CAMP-853: Final CSS Changes
chisumism Jan 14, 2016
7eb1c2a
CAMP-853: Finalizing CSS
chisumism Jan 27, 2016
2f18930
CAMP-853: Final CSS
chisumism Jan 29, 2016
a34dd86
Added Help Link to Logout Menu
chisumism Feb 22, 2016
90e5c2a
CAMP-925: Merged Organizations v 1.4 into our code
Mar 2, 2016
2d29dbd
Refactoring for multi-language images in menu and module change list
Mar 7, 2016
d8617ec
CAMP-925: Various Layout Fixes/Issues and Downtime CSS
chisumism Mar 9, 2016
cb6462b
CAMP-925: Various Layout Fixes/Issues and Downtime CSS
chisumism Mar 9, 2016
f5fbe12
Fixed bad syntax at line 1051 -- echo_('Last Name' changed to echo _(…
Mar 10, 2016
0714d69
Added Classes to Buttons
chisumism Mar 30, 2016
168fa62
Merge branch 'master' of https://github.com/pontifechs/organizations
chisumism Mar 31, 2016
7d1f861
Made Sort Arrows Consistent
chisumism Mar 31, 2016
0346881
New French Translations
Apr 4, 2016
f81cfe4
New French Translations
Apr 4, 2016
3ed5a33
Language Normalization in Drop-down
Apr 4, 2016
5c5613c
Language Normalization in Drop-down
Apr 4, 2016
ce5631b
Changes for additional languages
Apr 6, 2016
9813ddc
Fixed bindtextdomain path
Apr 7, 2016
ff11454
fixed changed default locale to get 5 characters instead of 2
Apr 11, 2016
719b53d
Merge branch 'master' of https://github.com/pontifechs/organizations
Apr 11, 2016
77f8d18
New French Images
May 2, 2016
5018b40
Moved Language Dropdown/Main Menu Images
chisumism May 3, 2016
1529043
Patched Security Hole
May 4, 2016
4e266a0
Newly Designed Menus
chisumism May 10, 2016
6418991
Translations for Menus and Landing Page
May 10, 2016
62b666e
Fixed Change Module Menu
May 10, 2016
50840f7
Menu Fix
May 10, 2016
fb98bbb
Newly Designed Title Bars
chisumism May 11, 2016
d5b13d7
French Translations for New Title Header
May 11, 2016
8a7cd64
French Translations for New Title Header
May 11, 2016
fec2b07
French Translations for New Title Header
May 11, 2016
fe18bce
Added Open Sans Font
chisumism May 11, 2016
9ad1a68
Hello, logout, and help translations
May 12, 2016
c632486
Added missed localization strings
May 17, 2016
ea98d45
fixed missed translations
May 18, 2016
9aa4698
fixed missed translations
May 18, 2016
40dea53
fixed missed translations
May 18, 2016
9edce59
added missed translation
May 18, 2016
739f23b
added missed translation
May 18, 2016
a832115
Replaced space colon with colon in French Translations
Jun 6, 2016
8a597d0
Fixed Language Code -- changed all references to look at 5 characters…
Jun 13, 2016
6e7dde2
Changed Helpful Links to Be Translatable
chisumism Jun 13, 2016
1049840
Updated French Language
Jun 13, 2016
e5f9076
Changes found during the merge to CORAL
Jun 17, 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
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";
}
}
?>
40 changes: 20 additions & 20 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

include_once 'directory.php';

$pageTitle='Administration';
$pageTitle=_('Administration');
include 'templates/header.php';

//set referring page
Expand All @@ -30,11 +30,11 @@
?>
<table class="headerTable">
<tr><td align='left'>
<span class="headerText">Users</span>&nbsp;&nbsp;<span id='span_User_response'></span>
<br /><span id='span_newUser' class='adminAddInput'><a href='ajax_forms.php?action=getAdminUserUpdateForm&height=185&width=250&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'></span>
<br /><span id='span_newUser' class='adminAddInput'><a href='ajax_forms.php?action=getAdminUserUpdateForm&height=185&width=250&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 @@ -45,11 +45,11 @@

<table class="headerTable">
<tr><td align='left'>
<span class="headerText">Organization Role</span>&nbsp;&nbsp;<span id='span_OrganizationRole_response'></span>
<br /><span id='span_newOrganizationRole' class='adminAddInput'><a href='javascript:showAdd("OrganizationRole");'>add new organization role</a></span>
<span class="headerText"><?php echo _("Organization Role");?></span>&nbsp;&nbsp;<span id='span_OrganizationRole_response'></span>
<br /><span id='span_newOrganizationRole' class='adminAddInput'><a href='javascript:showAdd("OrganizationRole");'><?php echo _("add new organization role");?></a></span>
<br /><br />
<div id='div_OrganizationRole'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -59,11 +59,11 @@

<table class="headerTable">
<tr><td align='left'>
<span class="headerText">Contact Role</span>&nbsp;&nbsp;<span id='span_ContactRole_response'></span>
<br /><span id='span_newContactRole' class='adminAddInput'><a href='javascript:showAdd("ContactRole");'>add new contact role</a></span>
<span class="headerText"><?php echo _("Contact Role");?></span>&nbsp;&nbsp;<span id='span_ContactRole_response'></span>
<br /><span id='span_newContactRole' class='adminAddInput'><a href='javascript:showAdd("ContactRole");'><?php echo _("add new contact role");?></a></span>
<br />
<div id='div_ContactRole'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -74,11 +74,11 @@

<table class="headerTable">
<tr><td align='left'>
<span class="headerText">Alias Type</span>&nbsp;&nbsp;<span id='span_AliasType_response'></span>
<br /><span id='span_newAliasType' class='adminAddInput'><a href='javascript:showAdd("AliasType");'>add new alias type</a></span>
<span class="headerText"><?php echo _("Alias Type");?></span>&nbsp;&nbsp;<span id='span_AliasType_response'></span>
<br /><span id='span_newAliasType' class='adminAddInput'><a href='javascript:showAdd("AliasType");'><?php echo _("add new alias type");?></a></span>
<br />
<div id='div_AliasType'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -88,22 +88,22 @@

<table class="headerTable">
<tr><td align='left'>
<span class="headerText">External Login Type</span>&nbsp;&nbsp;<span id='span_ExternalLoginType_response'></span>
<br /><span id='span_newExternalLoginType' class='adminAddInput'><a href='javascript:showAdd("ExternalLoginType");'>add new external login type</a></span>
<span class="headerText"><?php echo _("External Login Type");?></span>&nbsp;&nbsp;<span id='span_ExternalLoginType_response'></span>
<br /><span id='span_newExternalLoginType' class='adminAddInput'><a href='javascript:showAdd("ExternalLoginType");'><?php echo _("add new external login type");?></a></span>
<br />
<div id='div_ExternalLoginType'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>

<table class="headerTable">
<tr><td align='left'>
<span class="headerText">Issue Type</span>&nbsp;&nbsp;<span id='span_IssueLogType_response'></span>
<br /><span id='span_newIssueLogType' class='adminAddInput'><a href='javascript:showAdd("IssueLogType");'>add new issue type</a></span>
<span class="headerText"><?php echo _("Issue Type");?></span>&nbsp;&nbsp;<span id='span_IssueLogType_response'></span>
<br /><span id='span_newIssueLogType' class='adminAddInput'><a href='javascript:showAdd("IssueLogType");'><?php echo _("add new issue type");?></a></span>
<br />
<div id='div_IssueLogType'>
<img src = "images/circle.gif">Loading...
<img src = "images/circle.gif"><?php echo _("Loading...");?>
</div>
</td></tr>
</table>
Expand All @@ -115,7 +115,7 @@

//end else for admin
}else{
echo "You do not have permissions to access this screen.";
echo _("You do not have permissions to access this screen.");
}

include 'templates/footer.php';
Expand Down
188 changes: 96 additions & 92 deletions admin/classes/common/DBService.php
Original file line number Diff line number Diff line change
@@ -1,92 +1,96 @@
<?php
/*
**************************************************************************************************************************
** CORAL Organizations 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 DBService extends Object {

protected $db;
protected $config;
protected $error;

protected function init(NamedArguments $arguments) {
parent::init($arguments);
$this->config = new Configuration;
$this->connect();
}

protected function dealloc() {
$this->disconnect();
parent::dealloc();
}

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

protected function connect() {
$host = $this->config->database->host;
$username = $this->config->database->username;
$password = $this->config->database->password;
$databaseName = $this->config->database->name;
$this->db = mysqli_connect($host, $username, $password, $databaseName);
$this->checkForError();
}

protected function disconnect() {
//mysqli_close($this->db);
}

public function escapeString($value) {
return mysqli_real_escape_string($this->db, $value);
}

public function getDatabase() {
return $this->db;
}

public function processQuery($sql, $type = NULL) {

$result = mysqli_query($this->db, $sql);
$this->checkForError();
$data = array();

if ($result instanceof mysqli_result) {
$resultType = MYSQLI_NUM;
if ($type == 'assoc') {
$resultType = MYSQLI_ASSOC;
}
while ($row = mysqli_fetch_array($result, $resultType)) {
if (mysqli_affected_rows($this->db) > 1) {
array_push($data, $row);
} else {
$data = $row;
}
}
mysqli_free_result($result);
} else if ($result) {
$data = mysqli_insert_id($this->db);
}

return $data;
}

}

?>
<?php
/*
**************************************************************************************************************************
** CORAL Organizations 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 DBService extends Object {

protected $db;
protected $config;
protected $error;

protected function init(NamedArguments $arguments) {
parent::init($arguments);
$this->config = new Configuration;
$this->connect();
}

protected function dealloc() {
$this->disconnect();
parent::dealloc();
}

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

protected function connect() {
$host = $this->config->database->host;
$username = $this->config->database->username;
$password = $this->config->database->password;
$this->db = new mysqli($host, $username, $password);
$this->checkForError();
$this->db->set_charset('utf8');

$databaseName = $this->config->database->name;
$this->db->select_db($databaseName);
$this->checkForError();
}

protected function disconnect() {
//mysqli_close($this->db);
}

public function escapeString($value) {
return $this->db->real_escape_string($value);
}

public function getDatabase() {
return $this->db;
}

public function processQuery($sql, $type = NULL) {

$result = $this->db->query($sql);
$this->checkForError();
$data = array();

if ($result instanceof mysqli_result) {
$resultType = MYSQLI_NUM;
if ($type == 'assoc') {
$resultType = MYSQLI_ASSOC;
}
while ($row = $result->fetch_array($resultType)) {
if ($this->db->affected_rows > 1) {
array_push($data, $row);
} else {
$data = $row;
}
}
$result->free();
} else if ($result) {
$data = $this->db->insert_id;
}

return $data;
}

}

?>
Loading