diff --git a/app/controllers/Admin.php b/app/controllers/Admin.php index 25eb8ec..aa4eebb 100644 --- a/app/controllers/Admin.php +++ b/app/controllers/Admin.php @@ -44,21 +44,35 @@ public function indexAction () { * List files, display stats. */ public function filesAction () { - $this->setToken(); $this->secure ('admin'); - + $this->setToken(); + // check input vars if (!array_key_exists('currentPage',$_POST) || !is_int((int)$_POST['currentPage']) || $_POST['currentPage'] <= 0) $currentPage = 1; else $currentPage = $_POST['currentPage']; + if (array_key_exists('isDeleted', $_COOKIE) && $_COOKIE['isDeleted'] == 'true') $isDeleted = true; else $isDeleted = false; - $files = Fz_Db::getTable ('File')->find($currentPage, $isDeleted); + $filesOrder = 'name'; + if (array_key_exists('filesOrder',$_COOKIE)) + $filesOrder = $_COOKIE['filesOrder']; + + $filesOrderDirection = 'asc'; + if (array_key_exists('filesOrderDirection',$_COOKIE)) + $filesOrderDirection = $_COOKIE['filesOrderDirection']; + + $filesNameFilter = ''; + if (array_key_exists('filesNameFilter',$_COOKIE)) + $filesNameFilter = $_COOKIE['filesNameFilter']; + + $files = Fz_Db::getTable ('File')->find($currentPage, $isDeleted, + $filesOrder, $filesOrderDirection, $filesNameFilter); if ($this->isXhrRequest()) { $err = false; @@ -77,7 +91,8 @@ public function filesAction () { return json ($response); } else { set ('files', $files); - set ('numberOfFiles', Fz_Db::getTable ('File')->getNumberOfFiles($isDeleted)); + set ('numberOfFiles', + Fz_Db::getTable ('File')->getNumberOfFiles($isDeleted, $filesNameFilter)); return html('file/index.php'); } } diff --git a/app/controllers/User.php b/app/controllers/User.php index c82a5ce..2606a16 100644 --- a/app/controllers/User.php +++ b/app/controllers/User.php @@ -34,9 +34,52 @@ public function init () { */ public function indexAction () { $this->secure ('admin'); - set ('users', Fz_Db::getTable ('User')->findAll ()); // TODO paginate - set ('isInternal', $this->getUserFactory ()->isInternal ()); - return html('user/index.php'); + $this->setToken(); + + // check input vars + if (!array_key_exists('currentPage',$_POST) + || !is_int((int)$_POST['currentPage']) || $_POST['currentPage'] <= 0) + $currentPage = 1; + else + $currentPage = $_POST['currentPage']; + + $usersOrder = 'name'; + if (array_key_exists('usersOrder',$_COOKIE)) + $usersOrder = $_COOKIE['usersOrder']; + + $usersOrderDirection = 'asc'; + if (array_key_exists('usersOrderDirection',$_COOKIE)) + $usersOrderDirection = $_COOKIE['usersOrderDirection']; + + $usersNameFilter = ''; + if (array_key_exists('usersNameFilter',$_COOKIE)) + $usersNameFilter = $_COOKIE['usersNameFilter']; + + $users = Fz_Db::getTable ('User')->find($currentPage, $usersOrder, + $usersOrderDirection, $usersNameFilter); + + if ($this->isXhrRequest()) { + $err = false; + $response = ''; + $response['items'] = ''; + foreach ($users as $user_item) { + $response['items'] .= + partial('user/_user_row.php', array ('user_item' => $user_item)); + } + if ($err == false) { + $response ['status'] = 'success'; + } else { + $response ['status'] = 'error'; + $response ['statusText'] = __('Error while processing data'); + } + return json ($response); + } else { + set ('isInternal', $this->getUserFactory ()->isInternal ()); + set ('numberOfUsers', + Fz_Db::getTable ('User')->getNumberOfUsers($usersNameFilter)); + set ('users', $users); + return html('user/index.php'); + } } /** @@ -56,17 +99,19 @@ public function postnewAction () { $this->secure ('admin'); $user = new App_Model_User (); - $user->setUsername ($_POST ['username']); - $user->setPassword ($_POST ['password']); - $user->setFirstname ($_POST ['firstname']); - $user->setLastname ($_POST ['lastname']); - $user->setIsAdmin ($_POST ['is_admin'] == 'on' ? 1 : 0); - $user->setIsLocked ($_POST ['is_locked'] == 'on' ? 1 : 0); - $user->setEmail ($_POST ['email']); + $user->setUsername (array_key_exists('username',$_POST)?$_POST ['username']:''); + $user->setPassword (array_key_exists('password',$_POST)?$_POST ['password']:''); + $user->setFirstname (array_key_exists('firstname',$_POST)?$_POST ['firstname']:''); + $user->setLastname (array_key_exists('lastname',$_POST)?$_POST ['lastname']:''); + $isAdmin = array_key_exists('is_admin',$_POST)?$_POST ['is_admin']:0; + $isLocked = array_key_exists('is_locked',$_POST)?$_POST ['is_locked']:0; + $user->setIsAdmin ($isAdmin == 'on' ? 1 : 0); + $user->setIsLocked ($isLocked == 'on' ? 1 : 0); + $user->setEmail (array_key_exists('email',$_POST)?$_POST ['email']:''); // TODO improve form check // for example : test if the email and the username are not already in DB - if(filter_var($_POST ['email'], FILTER_VALIDATE_EMAIL) && null!=$_POST ['username'] && (3 <= strlen($_POST['password'])) ){ + if(filter_var($user->email, FILTER_VALIDATE_EMAIL) && null!=$_POST ['username'] && (3 <= strlen($_POST['password'])) ){ $user->save (); return redirect_to ('/admin'); } diff --git a/app/models/DbTable/File.php b/app/models/DbTable/File.php index 4e1e4c4..9323eb3 100644 --- a/app/models/DbTable/File.php +++ b/app/models/DbTable/File.php @@ -120,12 +120,39 @@ public function findById ($id) { } /** - * Retrieve all rows of the current table - * @param integer $currentPage the current page to fetch items from - * @param boolean $isDeleted include deleted files, default: false + * Retrieve rows of the current table under certain conditions + * @param $currentPage integer the current page to fetch items from + * @param $isDeleted boolean include deleted files, default: false + * @param $filesOrder string order result by $filesOrder + * {for legal values see below} + * @param $filesOrderDirection string direction of ordering * @return array Array of Fz_Table_Row_Abstrat */ - public function find ($currentPage, $isDeleted = false) { + public function find ($currentPage, $isDeleted = false, + $filesOrder, $filesOrderDirection, $filesNameFilter) { + // only allow minimal set of characters for search + $nameCondition = ''; + if ($filesNameFilter != '') { + $filesNameFilter = preg_replace('/[^A-Za-z0-9_ ]/', '', $filesNameFilter); + $nameCondition = "AND file_name LIKE '%" . $filesNameFilter . "%'"; + } + + $orderBy = array ( + 'name' => 'file_name', + 'availability' => 'available_from', + 'size' => 'file_size', + 'downloadCounter' => 'download_count' + ); + if (array_key_exists($filesOrder, $orderBy)) { + $order = " ORDER BY " . $orderBy[$filesOrder] . ' '; + if ($filesOrderDirection == 'asc') + $order .= 'ASC '; + else + $order .= 'DESC '; + } else { + $order = ''; + } + $itemsPerPage = (int)(fz_config_get('app','items_per_page')); if (!is_int($itemsPerPage)) $itemsPerPage = 10; @@ -135,7 +162,7 @@ public function find ($currentPage, $isDeleted = false) { if ($isDeleted == false) $deletedCondition = ' AND isDeleted = 0'; $sql = "SELECT * FROM ".$this->getTableName () - . " WHERE 1=1 $deletedCondition $limit"; + . " WHERE 1=1 $deletedCondition $nameCondition $order $limit"; return Fz_Db::findObjectsBySQL ($sql, $this->getRowClass ()); } @@ -143,7 +170,7 @@ public function find ($currentPage, $isDeleted = false) { * Return all file owned by $uid which are available (not deleted) * * @param App_Model_User $user - * @param boolean $expired only count expired files + * @param $expired boolean only count expired files * @return array of App_Model_File */ public function findFilesByOwnerOrderByUploadDateDesc ( @@ -264,27 +291,24 @@ public function shorthandSizeToBytes ($size) { * @param $includeDeleted include deleted files, default: false * @return integer number of files */ - public function getNumberOfFiles ($includeDeleted = false) { - $condition = ''; + public function getNumberOfFiles ($includeDeleted = false, $filesNameFilter='') { + $deletedCondition = ''; if ($includeDeleted == false) - $condition = ' WHERE isDeleted = 0'; - $sql = 'SELECT COUNT(*) AS count ' . 'FROM '.$this->getTableName () . $condition; + $deletedCondition = ' AND isDeleted = 0'; + + $nameCondition = ''; + if ($filesNameFilter != '') { + $filesNameFilter = preg_replace('/[^A-Za-z0-9_ ]/', '', $filesNameFilter); + $nameCondition = "AND file_name LIKE '%" . $filesNameFilter . "%'"; + } + $sql = 'SELECT COUNT(*) AS count ' + . 'FROM '.$this->getTableName () . ' WHERE 1=1 ' + . $deletedCondition + . $nameCondition; $res = Fz_Db::findAssocBySQL($sql); return $res[0]['count']; } - /** - * Count the number of files including deleted files - * - * @return integer number of files - */ - public function getNumberOfFilesIncludingDeleted () { - $sql = 'SELECT COUNT(*) AS count ' - . 'FROM '.$this->getTableName (); - $res = Fz_Db::findAssocBySQL($sql); - return $res[0]['count']; - } - /** * Return disk space used by everybody * diff --git a/app/models/DbTable/User.php b/app/models/DbTable/User.php index 589d88c..52df117 100644 --- a/app/models/DbTable/User.php +++ b/app/models/DbTable/User.php @@ -62,11 +62,65 @@ public function findByEmail ($email) { * * @return integer number of users */ - public function getNumberOfUsers () { - $sql = 'SELECT COUNT(*) AS count FROM '.$this->getTableName (); + public function getNumberOfUsers ($usersNameFilter='') { + $nameCondition = ''; + if ($usersNameFilter != '') { + $usersNameFilter = preg_replace('/[^A-Za-z0-9_ ]/', '', $usersNameFilter); + $nameCondition = "AND (firstname LIKE '%" . $usersNameFilter . "%'" + . "OR lastname LIKE '%" . $usersNameFilter . "%')"; + } + $sql = 'SELECT COUNT(*) AS count FROM '.$this->getTableName () + . ' WHERE 1=1 ' + . $nameCondition; $res = Fz_Db::findAssocBySQL($sql); return $res[0]['count']; } + + /** + * Retrieve rows of the current table under certain conditions + * @param $currentPage integer the current page to fetch items from + * @param $isDeleted boolean include deleted files, default: false + * @param $filesOrder string order result by $filesOrder + * {for legal values see below} + * @param $filesOrderDirection string direction of ordering + * @return array Array of Fz_Table_Row_Abstrat + */ + public function find ($currentPage, $usersOrder, $usersOrderDirection, + $usersNameFilter) { + // only allow minimal set of characters for search + $nameCondition = ''; + if ($usersNameFilter != '') { + $usersNameFilter = preg_replace('/[^A-Za-z0-9_ ]/', '', $usersNameFilter); + $nameCondition = "AND (firstname LIKE '%" . $usersNameFilter . "%'" + . "OR lastname LIKE '%" . $usersNameFilter . "%')"; + } + + $orderBy = array ( + 'name' => 'lastname', + 'email' => 'email', + 'role' => 'is_admin' + ); + if (array_key_exists($usersOrder, $orderBy)) { + $order = " ORDER BY " . $orderBy[$usersOrder] . ' '; + if ($usersOrderDirection == 'asc') + $order .= 'ASC '; + else + $order .= 'DESC '; + } else { + $order = ''; + } + + $itemsPerPage = (int)(fz_config_get('app','items_per_page')); + if (!is_int($itemsPerPage)) + $itemsPerPage = 10; + $currentPage = ($currentPage-1) * $itemsPerPage; + $limit = ' LIMIT ' . $currentPage .',' . $itemsPerPage; + + $sql = "SELECT * FROM ".$this->getTableName () + . " WHERE 1=1 $nameCondition $order $limit"; + return Fz_Db::findObjectsBySQL ($sql, $this->getRowClass ()); + } + } diff --git a/app/views/file/index.php b/app/views/file/index.php index dfe9e62..2d1eeca 100644 --- a/app/views/file/index.php +++ b/app/views/file/index.php @@ -1,68 +1,94 @@ fz_config_get('app','items_per_page')): ?> - -> - - - - - - - - + + + + + + - - - - - - + + - - - - - + - + + $file)); +?>
- $file->getDownloadUrl ()), $file->file_name); - ?> +
+ + + - url_for ('/admin/users/'.$file->getUploader()->id)), - h($file->getUploader ())); - ?> + - - $file->getAvailableFrom()->toString(option ('localeDateFormat')), - 'to' => ''.$file->getAvailableUntil ()->toString ( - option ('localeDateFormat')).'') - ); - ?> + getReadableFileSize () ?>download_count ?> - $file->getDownloadUrl () . '/delete', - 'class'=>'admin-delete'), - ''.__('Delete')); - ?> + + + > +
+ \ No newline at end of file diff --git a/i18n/de/LC_MESSAGES/default.mo b/i18n/de/LC_MESSAGES/default.mo index 198b5b9..44b2ec3 100644 Binary files a/i18n/de/LC_MESSAGES/default.mo and b/i18n/de/LC_MESSAGES/default.mo differ diff --git a/i18n/de/LC_MESSAGES/default.po b/i18n/de/LC_MESSAGES/default.po index 4dd4834..71e2d07 100644 --- a/i18n/de/LC_MESSAGES/default.po +++ b/i18n/de/LC_MESSAGES/default.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: filez-2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-12-22 14:20+0100\n" -"PO-Revision-Date: 2011-12-22 14:20+0100\n" +"POT-Creation-Date: 2011-12-24 10:34+0100\n" +"PO-Revision-Date: 2011-12-24 10:34+0100\n" "Last-Translator: Dennis Bruenig \n" "Language-Team: Universität Hildesheim \n" "MIME-Version: 1.0\n" @@ -17,11 +17,15 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-SearchPath-0: C:\\htdocs\\filez\n" -#: C:\htdocs\filez/app/controllers/Admin.php:119 +#: C:\htdocs\filez/app/controllers/Admin.php:75 +msgid "Error while processing data" +msgstr "Fehler bei der Datenverarbeitung" + +#: C:\htdocs\filez/app/controllers/Admin.php:146 msgid "[FileZ] Your file \"%file_name%\" is going to be deleted" msgstr "[FileZ] Ihre Datei \"%file_name%\" wird demnächst gelöscht" -#: C:\htdocs\filez/app/controllers/Admin.php:121 +#: C:\htdocs\filez/app/controllers/Admin.php:148 msgid "email_delete_notif (%file_name%, %file_url%, %filez_url%, %available_until%)" msgstr "" "Hallo,\n" @@ -38,29 +42,29 @@ msgstr "" msgid "Wrong username or password" msgstr "Falscher Login oder falsches Passwort" -#: C:\htdocs\filez/app/controllers/File.php:82 -#: C:\htdocs\filez/app/controllers/File.php:83 +#: C:\htdocs\filez/app/controllers/File.php:68 +#: C:\htdocs\filez/app/controllers/File.php:69 msgid "Action expired. Try again." msgstr "Aktion abgelaufen. Bitte versuchen Sie es noch einmal." -#: C:\htdocs\filez/app/controllers/File.php:86 -#: C:\htdocs\filez/app/controllers/File.php:87 +#: C:\htdocs\filez/app/controllers/File.php:72 +#: C:\htdocs\filez/app/controllers/File.php:73 msgid "File deleted." msgstr "Die Datei wurde gelöscht." -#: C:\htdocs\filez/app/controllers/File.php:224 +#: C:\htdocs\filez/app/controllers/File.php:210 msgid "File updated." msgstr "Datei wurde erfolgreich aktualisiert." -#: C:\htdocs\filez/app/controllers/File.php:235 +#: C:\htdocs\filez/app/controllers/File.php:221 msgid "File could not be updated." msgstr "Datei konnte nicht aktualisiert werden." -#: C:\htdocs\filez/app/controllers/File.php:253 +#: C:\htdocs\filez/app/controllers/File.php:239 msgid "[FileZ] \"%sender%\" wants to share a file with you" msgstr "[FileZ] %sender% möchte eine Datei mit Ihnen teilen" -#: C:\htdocs\filez/app/controllers/File.php:255 +#: C:\htdocs\filez/app/controllers/File.php:241 msgid "email_share_file (%file_name%, %file_url%, %sender%, %msg%)" msgstr "" "Hallo,\n" @@ -70,29 +74,29 @@ msgstr "" "Ihre persönliche Nachricht:\n" "%msg%" -#: C:\htdocs\filez/app/controllers/File.php:279 +#: C:\htdocs\filez/app/controllers/File.php:265 msgid "Email address \"%email%\" is incorrect, please correct it." msgstr "Die E-Mail-Adresse \"%email%\" ist falsch, bitte korrigieren." -#: C:\htdocs\filez/app/controllers/File.php:294 +#: C:\htdocs\filez/app/controllers/File.php:280 msgid "An error occured during email submission. Please try again." msgstr "Beim Versand der E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut." -#: C:\htdocs\filez/app/controllers/File.php:319 +#: C:\htdocs\filez/app/controllers/File.php:305 msgid "There are no files in this folder." msgstr "In diesem Ordner befinden sich keine Dateien." -#: C:\htdocs\filez/app/controllers/File.php:338 -#: C:\htdocs\filez/app/controllers/File.php:382 +#: C:\htdocs\filez/app/controllers/File.php:324 +#: C:\htdocs\filez/app/controllers/File.php:368 msgid "Failed to report the file. Try again." msgstr "Fehler beim Melden der Datei. Bitte versuchen Sie es später noch einmal." # Important: If you change this ID, change it in the app/File.php -#: C:\htdocs\filez/app/controllers/File.php:347 +#: C:\htdocs\filez/app/controllers/File.php:333 msgid "File is corrupt" msgstr "Download defekt" -#: C:\htdocs\filez/app/controllers/File.php:349 +#: C:\htdocs\filez/app/controllers/File.php:335 msgid "" "This is an automatically sent message by FileZ.\\n" "Your uploaded file \"%file%\" is corrupt.\\n" @@ -102,39 +106,39 @@ msgstr "" "\n" "Vielen Dank." -#: C:\htdocs\filez/app/controllers/File.php:375 +#: C:\htdocs\filez/app/controllers/File.php:361 msgid "File has been reported." msgstr "Datei wurde gemeldet." -#: C:\htdocs\filez/app/controllers/File.php:510 +#: C:\htdocs\filez/app/controllers/File.php:496 msgid "There is no file for this code" msgstr "Für diesen Code existiert keine Datei" -#: C:\htdocs\filez/app/controllers/File.php:532 +#: C:\htdocs\filez/app/controllers/File.php:518 msgid "File is locked and currently not available for download." msgstr "Die Datei ist gesperrt und steht derzeit nicht zur Verfügung." -#: C:\htdocs\filez/app/controllers/File.php:536 +#: C:\htdocs\filez/app/controllers/File.php:522 msgid "File is not available for download" msgstr "Datei ist steht nicht as Download zur Verfügung" -#: C:\htdocs\filez/app/controllers/File.php:541 +#: C:\htdocs\filez/app/controllers/File.php:527 msgid "Security restrictions do not allow public access of this file. Please contact the file uploader to solve this problem." msgstr "Die Sicherheitseinschränkungen erlauben keinen öffentlichen Zugriff auf diese Datei. Kontaktieren Sie den Datei-Uploader." -#: C:\htdocs\filez/app/controllers/File.php:556 +#: C:\htdocs\filez/app/controllers/File.php:542 msgid "You have to login before you can access the file" msgstr "Sie müssen sich einlogge, bevor Sie auf die Datei zugreifen können." -#: C:\htdocs\filez/app/controllers/File.php:563 +#: C:\htdocs\filez/app/controllers/File.php:549 msgid "Incorrect password" msgstr "Falsches Passwort" -#: C:\htdocs\filez/app/controllers/File.php:569 +#: C:\htdocs\filez/app/controllers/File.php:555 msgid "Sorry, download limit reached for this file" msgstr "Das Download-Limit wurde erreicht" -#: C:\htdocs\filez/app/controllers/File.php:602 +#: C:\htdocs\filez/app/controllers/File.php:588 msgid "You are not the owner of the file" msgstr "Sie sind nicht der Besitzer dieser Datei" @@ -198,27 +202,27 @@ msgid "You exceeded your disk space quota (%space%)." msgstr "Der verfügbare Festplattenspeicher wurde überschritten (%space%)." #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "B" msgstr "B" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "KB" msgstr "KB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "MB" msgstr "MB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "GB" msgstr "GB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "TB" msgstr "TB" @@ -242,6 +246,19 @@ msgstr "Admin dashboard" msgid "Manage %NumberOfUsers% users and %NumberOfFiles% files." msgstr "%NumberOfUsers% Benutzer und %NumberOfFiles% Dateien verwalten." +#: C:\htdocs\filez/app/views/admin/_file_row.php:15 +msgid "from %from% to %to%" +msgstr "vom %from% bis %to%" + +#: C:\htdocs\filez/app/views/admin/_file_row.php:29 +#: C:\htdocs\filez/app/views/file/editForm.php:88 +msgid "Delete" +msgstr "Löschen" + +#: C:\htdocs\filez/app/views/admin/_file_row.php:31 +msgid "deleted" +msgstr "gelöscht" + #: C:\htdocs\filez/app/views/auth/loginForm.php:8 msgid "Username" msgstr "Login" @@ -329,11 +346,6 @@ msgstr "Download erfordert Login" msgid "Edit" msgstr "Bearbeiten" -#: C:\htdocs\filez/app/views/file/editForm.php:88 -#: C:\htdocs\filez/app/views/file/index.php:40 -msgid "Delete" -msgstr "Löschen" - #: C:\htdocs\filez/app/views/file/email.php:2 msgid "Send this link via mail:" msgstr "Link per Post verschicken:" @@ -342,34 +354,34 @@ msgstr "Link per Post verschicken:" msgid "Folder listing" msgstr "Ordneransicht" -#: C:\htdocs\filez/app/views/file/index.php:4 +#: C:\htdocs\filez/app/views/file/index.php:12 +msgid "Include already deleted files" +msgstr "bereits gelöscht dateien einbeziehen" + +#: C:\htdocs\filez/app/views/file/index.php:23 msgid "Name" msgstr "Name" -#: C:\htdocs\filez/app/views/file/index.php:5 +#: C:\htdocs\filez/app/views/file/index.php:24 msgid "Uploader" msgstr "Uploader" -#: C:\htdocs\filez/app/views/file/index.php:6 +#: C:\htdocs\filez/app/views/file/index.php:25 msgid "Availability" msgstr "Verfügbarkeit" -#: C:\htdocs\filez/app/views/file/index.php:7 +#: C:\htdocs\filez/app/views/file/index.php:26 msgid "Size" msgstr "Größe" -#: C:\htdocs\filez/app/views/file/index.php:8 +#: C:\htdocs\filez/app/views/file/index.php:27 msgid "Download counter" msgstr "Downloadzähler" -#: C:\htdocs\filez/app/views/file/index.php:9 +#: C:\htdocs\filez/app/views/file/index.php:28 msgid "Actions" msgstr "Aktionen" -#: C:\htdocs\filez/app/views/file/index.php:27 -msgid "from %from% to %to%" -msgstr "vom %from% bis %to%" - #: C:\htdocs\filez/app/views/file/preview.php:20 msgid "Available from %available_from% to %available_until%" msgstr "Verfügbar ab dem %available_from% bis einschließlich zum %available_until%" @@ -491,19 +503,19 @@ msgstr "In meinem E-Mail-Programm öffnen" msgid "Send" msgstr "Abschicken" -#: C:\htdocs\filez/app/views/layout/admin.html.php:19 +#: C:\htdocs\filez/app/views/layout/admin.html.php:20 msgid "Dashboard" msgstr "Dashboard" -#: C:\htdocs\filez/app/views/layout/admin.html.php:24 +#: C:\htdocs\filez/app/views/layout/admin.html.php:25 msgid "Users" msgstr "Benutzer" -#: C:\htdocs\filez/app/views/layout/admin.html.php:29 +#: C:\htdocs\filez/app/views/layout/admin.html.php:30 msgid "Files" msgstr "Dateien" -#: C:\htdocs\filez/app/views/layout/admin.html.php:35 +#: C:\htdocs\filez/app/views/layout/admin.html.php:36 msgid "Statistics" msgstr "Statistik" @@ -544,11 +556,11 @@ msgstr "Zurück" msgid "Administration" msgstr "Administration" -#: C:\htdocs\filez/app/views/layout/_header.php:46 +#: C:\htdocs\filez/app/views/layout/_header.php:47 msgid "Switch user interface" msgstr "Benutzerschnittstelle umschalten" -#: C:\htdocs\filez/app/views/layout/_header.php:48 +#: C:\htdocs\filez/app/views/layout/_header.php:49 msgid "Log out" msgstr "Abmelden" @@ -757,7 +769,6 @@ msgid "Download %x% times" msgstr "%x%-mal heruntergeladen" #: C:\htdocs\filez/app/views/user/create.php:1 -#: C:\htdocs\filez/app/views/user/index.php:4 msgid "Create a new user" msgstr "Neuen Benutzer anlegen" @@ -965,9 +976,6 @@ msgstr "Diese Seite ist zugriffsgeschützt" #~ msgid "Expired files included" #~ msgstr "Verfallene Dateien eingeschlossen" -#~ msgid "Include expired files" -#~ msgstr "Verfallene Dateien" - #~ msgid "between %available_from% and %available_until%" #~ msgstr "vom %available_from%. bis %available_until%" diff --git a/i18n/en/LC_MESSAGES/default.mo b/i18n/en/LC_MESSAGES/default.mo index 01419e5..633c7e2 100644 Binary files a/i18n/en/LC_MESSAGES/default.mo and b/i18n/en/LC_MESSAGES/default.mo differ diff --git a/i18n/en/LC_MESSAGES/default.po b/i18n/en/LC_MESSAGES/default.po index 868ef08..34c255a 100644 --- a/i18n/en/LC_MESSAGES/default.po +++ b/i18n/en/LC_MESSAGES/default.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: filez-2.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-12-22 14:20+0100\n" -"PO-Revision-Date: 2011-12-22 14:20+0100\n" +"POT-Creation-Date: 2011-12-24 10:34+0100\n" +"PO-Revision-Date: 2011-12-24 10:34+0100\n" "Last-Translator: Dennis Bruenig \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,11 +15,15 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "X-Poedit-SearchPath-0: C:\\htdocs\\filez\n" -#: C:\htdocs\filez/app/controllers/Admin.php:119 +#: C:\htdocs\filez/app/controllers/Admin.php:75 +msgid "Error while processing data" +msgstr "Error while processing data" + +#: C:\htdocs\filez/app/controllers/Admin.php:146 msgid "[FileZ] Your file \"%file_name%\" is going to be deleted" msgstr "[FileZ] Ihre datei \"%file_name%\"wird bald gelöscht" -#: C:\htdocs\filez/app/controllers/Admin.php:121 +#: C:\htdocs\filez/app/controllers/Admin.php:148 msgid "email_delete_notif (%file_name%, %file_url%, %filez_url%, %available_until%)" msgstr "" "Hello,\n" @@ -36,29 +40,29 @@ msgstr "" msgid "Wrong username or password" msgstr "Wrong username or password" -#: C:\htdocs\filez/app/controllers/File.php:82 -#: C:\htdocs\filez/app/controllers/File.php:83 +#: C:\htdocs\filez/app/controllers/File.php:68 +#: C:\htdocs\filez/app/controllers/File.php:69 msgid "Action expired. Try again." msgstr "Action expired. Try again." -#: C:\htdocs\filez/app/controllers/File.php:86 -#: C:\htdocs\filez/app/controllers/File.php:87 +#: C:\htdocs\filez/app/controllers/File.php:72 +#: C:\htdocs\filez/app/controllers/File.php:73 msgid "File deleted." msgstr "File deleted." -#: C:\htdocs\filez/app/controllers/File.php:224 +#: C:\htdocs\filez/app/controllers/File.php:210 msgid "File updated." msgstr "File updated." -#: C:\htdocs\filez/app/controllers/File.php:235 +#: C:\htdocs\filez/app/controllers/File.php:221 msgid "File could not be updated." msgstr "File could not be updated." -#: C:\htdocs\filez/app/controllers/File.php:253 +#: C:\htdocs\filez/app/controllers/File.php:239 msgid "[FileZ] \"%sender%\" wants to share a file with you" msgstr "[FileZ] \"%sender%\" wants to share a file with you" -#: C:\htdocs\filez/app/controllers/File.php:255 +#: C:\htdocs\filez/app/controllers/File.php:241 msgid "email_share_file (%file_name%, %file_url%, %sender%, %msg%)" msgstr "" "Hello,\n" @@ -68,28 +72,28 @@ msgstr "" "The following text originates from %sender%:\n" "%msg%" -#: C:\htdocs\filez/app/controllers/File.php:279 +#: C:\htdocs\filez/app/controllers/File.php:265 msgid "Email address \"%email%\" is incorrect, please correct it." msgstr "Email address \"%email%\" is incorrect, please correct it." -#: C:\htdocs\filez/app/controllers/File.php:294 +#: C:\htdocs\filez/app/controllers/File.php:280 msgid "An error occured during email submission. Please try again." msgstr "An error occured during email submission. Please try again." -#: C:\htdocs\filez/app/controllers/File.php:319 +#: C:\htdocs\filez/app/controllers/File.php:305 msgid "There are no files in this folder." msgstr "There are no files in this folder." -#: C:\htdocs\filez/app/controllers/File.php:338 -#: C:\htdocs\filez/app/controllers/File.php:382 +#: C:\htdocs\filez/app/controllers/File.php:324 +#: C:\htdocs\filez/app/controllers/File.php:368 msgid "Failed to report the file. Try again." msgstr "Failed to report the file. Try again." -#: C:\htdocs\filez/app/controllers/File.php:347 +#: C:\htdocs\filez/app/controllers/File.php:333 msgid "File is corrupt" msgstr "File is corrupt" -#: C:\htdocs\filez/app/controllers/File.php:349 +#: C:\htdocs\filez/app/controllers/File.php:335 msgid "" "This is an automatically sent message by FileZ.\\n" "Your uploaded file \"%file%\" is corrupt.\\n" @@ -99,39 +103,39 @@ msgstr "" "Your uploaded file \"%file%\" is corrupt.\\n" "Please check the file's integrity and upload it again." -#: C:\htdocs\filez/app/controllers/File.php:375 +#: C:\htdocs\filez/app/controllers/File.php:361 msgid "File has been reported." msgstr "File has been reported." -#: C:\htdocs\filez/app/controllers/File.php:510 +#: C:\htdocs\filez/app/controllers/File.php:496 msgid "There is no file for this code" msgstr "There is no file for this code" -#: C:\htdocs\filez/app/controllers/File.php:532 +#: C:\htdocs\filez/app/controllers/File.php:518 msgid "File is locked and currently not available for download." msgstr "File is locked and currently not available for download." -#: C:\htdocs\filez/app/controllers/File.php:536 +#: C:\htdocs\filez/app/controllers/File.php:522 msgid "File is not available for download" msgstr "File is not available for download" -#: C:\htdocs\filez/app/controllers/File.php:541 +#: C:\htdocs\filez/app/controllers/File.php:527 msgid "Security restrictions do not allow public access of this file. Please contact the file uploader to solve this problem." msgstr "Security restrictions do not allow public access of this file. Please contact the file uploader to solve this problem." -#: C:\htdocs\filez/app/controllers/File.php:556 +#: C:\htdocs\filez/app/controllers/File.php:542 msgid "You have to login before you can access the file" msgstr "You have to login before you can access the file" -#: C:\htdocs\filez/app/controllers/File.php:563 +#: C:\htdocs\filez/app/controllers/File.php:549 msgid "Incorrect password" msgstr "Incorrect password" -#: C:\htdocs\filez/app/controllers/File.php:569 +#: C:\htdocs\filez/app/controllers/File.php:555 msgid "Sorry, download limit reached for this file" msgstr "Sorry, download limit reached for this file" -#: C:\htdocs\filez/app/controllers/File.php:602 +#: C:\htdocs\filez/app/controllers/File.php:588 msgid "You are not the owner of the file" msgstr "You are not the owner of the file" @@ -195,27 +199,27 @@ msgid "You exceeded your disk space quota (%space%)." msgstr "You exceeded your disk space quota (%space%)." #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "B" msgstr "B" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "KB" msgstr "KB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "MB" msgstr "MB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "GB" msgstr "GB" #: C:\htdocs\filez/app/models/File.php:177 -#: C:\htdocs\filez/app/models/DbTable/File.php:284 +#: C:\htdocs\filez/app/models/DbTable/File.php:309 msgid "TB" msgstr "TB" @@ -239,6 +243,19 @@ msgstr "Admin dashboard" msgid "Manage %NumberOfUsers% users and %NumberOfFiles% files." msgstr "Manage %NumberOfUsers% users and %NumberOfFiles% files." +#: C:\htdocs\filez/app/views/admin/_file_row.php:15 +msgid "from %from% to %to%" +msgstr "from %from% to %to%" + +#: C:\htdocs\filez/app/views/admin/_file_row.php:29 +#: C:\htdocs\filez/app/views/file/editForm.php:88 +msgid "Delete" +msgstr "Delete" + +#: C:\htdocs\filez/app/views/admin/_file_row.php:31 +msgid "deleted" +msgstr "deleted" + #: C:\htdocs\filez/app/views/auth/loginForm.php:8 msgid "Username" msgstr "Username" @@ -326,11 +343,6 @@ msgstr "Require login" msgid "Edit" msgstr "Edit" -#: C:\htdocs\filez/app/views/file/editForm.php:88 -#: C:\htdocs\filez/app/views/file/index.php:40 -msgid "Delete" -msgstr "Delete" - #: C:\htdocs\filez/app/views/file/email.php:2 msgid "Send this link via mail:" msgstr "Send this link via mail:" @@ -339,34 +351,34 @@ msgstr "Send this link via mail:" msgid "Folder listing" msgstr "Folder listing" -#: C:\htdocs\filez/app/views/file/index.php:4 +#: C:\htdocs\filez/app/views/file/index.php:12 +msgid "Include already deleted files" +msgstr "Include already deleted files" + +#: C:\htdocs\filez/app/views/file/index.php:23 msgid "Name" msgstr "Name" -#: C:\htdocs\filez/app/views/file/index.php:5 +#: C:\htdocs\filez/app/views/file/index.php:24 msgid "Uploader" msgstr "Uploader" -#: C:\htdocs\filez/app/views/file/index.php:6 +#: C:\htdocs\filez/app/views/file/index.php:25 msgid "Availability" msgstr "Availability" -#: C:\htdocs\filez/app/views/file/index.php:7 +#: C:\htdocs\filez/app/views/file/index.php:26 msgid "Size" msgstr "Size" -#: C:\htdocs\filez/app/views/file/index.php:8 +#: C:\htdocs\filez/app/views/file/index.php:27 msgid "Download counter" msgstr "Download counter" -#: C:\htdocs\filez/app/views/file/index.php:9 +#: C:\htdocs\filez/app/views/file/index.php:28 msgid "Actions" msgstr "Actions" -#: C:\htdocs\filez/app/views/file/index.php:27 -msgid "from %from% to %to%" -msgstr "from %from% to %to%" - #: C:\htdocs\filez/app/views/file/preview.php:20 msgid "Available from %available_from% to %available_until%" msgstr "Available from %available_from% to %available_until%" @@ -486,19 +498,19 @@ msgstr "Open in my email client" msgid "Send" msgstr "Send" -#: C:\htdocs\filez/app/views/layout/admin.html.php:19 +#: C:\htdocs\filez/app/views/layout/admin.html.php:20 msgid "Dashboard" msgstr "Dashboard" -#: C:\htdocs\filez/app/views/layout/admin.html.php:24 +#: C:\htdocs\filez/app/views/layout/admin.html.php:25 msgid "Users" msgstr "Users" -#: C:\htdocs\filez/app/views/layout/admin.html.php:29 +#: C:\htdocs\filez/app/views/layout/admin.html.php:30 msgid "Files" msgstr "Files" -#: C:\htdocs\filez/app/views/layout/admin.html.php:35 +#: C:\htdocs\filez/app/views/layout/admin.html.php:36 msgid "Statistics" msgstr "Statistics" @@ -539,11 +551,11 @@ msgstr "Back" msgid "Administration" msgstr "Administration" -#: C:\htdocs\filez/app/views/layout/_header.php:46 +#: C:\htdocs\filez/app/views/layout/_header.php:47 msgid "Switch user interface" msgstr "Switch user interface" -#: C:\htdocs\filez/app/views/layout/_header.php:48 +#: C:\htdocs\filez/app/views/layout/_header.php:49 msgid "Log out" msgstr "Log out" @@ -752,7 +764,6 @@ msgid "Download %x% times" msgstr "Download %x% times" #: C:\htdocs\filez/app/views/user/create.php:1 -#: C:\htdocs\filez/app/views/user/index.php:4 msgid "Create a new user" msgstr "Create a new user" diff --git a/resources/css/admin.css b/resources/css/admin.css index c3e85a9..5cb232f 100644 --- a/resources/css/admin.css +++ b/resources/css/admin.css @@ -51,27 +51,57 @@ margin-bottom: 1em; } table.data { -width: 100%; -cellspacing: 1px; -margin: 1em 0; + width: 100%; + cellspacing: 1px; + margin: 1em 0; } table.data th, table.data td { -padding: 4px 6px; + padding: 4px 6px; } table.data th { -background: #DDD; -text-align: left; -color: #999; -border: 1px solid #CCC; -text-shadow: 1px 1px 1px #FFF; + background: #DDD; + text-align: left; + color: #999; + border: 1px solid #CCC; + text-shadow: 1px 1px 1px #FFF; +} + +table.data th.sorting-enabled { + cursor: pointer; +} + +table.data tr#table-filter-row { + padding: 0px; +} + +table.data tr#table-filter-row td { + padding: 0px; + font-size: 0.6em; +} + +input#name-filter-input { + font-size: 0.8em; + width: 80%; + margin: 0px; + padding-left: 5px; + padding-right: 18px; + height: 10px; +} + +img#name-filter-clear-input { + display: inline; + line-height: 10px; + vertical-align:middle; + margin-left: -22px; + cursor: pointer; } table.data td { -background: white; -border: 1px solid #DDD; -font-size: 0.8em; + background: white; + border: 1px solid #DDD; + font-size: 0.8em; } h2#user-details-username { @@ -83,93 +113,27 @@ h2#user-details-username { filter: dropshadow(color=#505050, offx=0, offy=0) } -ul#show-user-details { +ul#show-user-details, +ul#filters { font-size: 0.8em; display: inline; padding-left: 20px; } -ul#show-user-details li { +ul#show-user-details li, +ul#filters li { list-style: none; display: inline; padding-right: 5px; } -ul#show-user-details li + li { +ul#show-user-details li + li, +ul#filters li + li { border-left: 1px solid #ccc; padding-left: 7px; } -/* -div#pagination { - padding: 0px; - margin: 0px; - float: right; -} - -div#pagination ul { - display: block; - margin-bottom: 10px; -} - -li.item-page { - color: #111111; - text-align: center; - position: relative; - display: inline-block; - border: 2px solid #303030; - margin: 2px; - padding: 2px; - font-weight: bold; - background-color: #547DE9; - -moz-user-select: none; - -khtml-user-select: none; - user-select: none; - cursor: pointer; - width: 15px; - height: 15px; - text-shadow: 1px 1px 10px #cccccc; - filter: dropshadow(color=#cccccc, offx=1, offy=1) - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; -} - -li.item-page:hover { - background-color: #1A49C6; -} -*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +/* jQuery.Paginate plugin */ .jPaginate{ height:34px; position:relative;