diff --git a/application/AppController.php b/application/AppController.php index e2d4dc7fe..7a0cd74d1 100644 --- a/application/AppController.php +++ b/application/AppController.php @@ -78,7 +78,7 @@ public function preDispatch() ); $login=array( "titleUploadLogin"=>$this->t('Please log in'), - "contentUploadLogin"=>utf8_encode($this->t('You need to be logged in to be able to upload files.')) + "contentUploadLogin"=>$this->t('You need to be logged in to be able to upload files.') ); $browse=array( @@ -91,6 +91,7 @@ public function preDispatch() 'rename'=>$this->t('Rename'), 'move'=>$this->t('Move'), 'copy'=>$this->t('Copy'), + 'element'=>$this->t('element'), 'community' => array( 'invit'=>$this->t('Invite collaborators'), 'advanced'=>$this->t('Advanced properties'), diff --git a/application/controllers/BrowseController.php b/application/controllers/BrowseController.php index 1a51f78dd..438c77985 100644 --- a/application/controllers/BrowseController.php +++ b/application/controllers/BrowseController.php @@ -143,20 +143,16 @@ public function getelementinfoAction() switch ($element) { case 'community': - $community=$this->Community->load($id); + $community=$this->Community->load($id); $jsonContent=array_merge($jsonContent,$community->_toArray()); + $jsonContent['creation']=$this->Component->Date->formatDate(strtotime($community->getCreation())); + $members=$community->getMemberGroup()->getUsers(); + $jsonContent['members']=count($members); break; case 'folder': $folder=$this->Folder->load($id); $jsonContent=array_merge($jsonContent,$folder->_toArray()); - if(isset($jsonContent['date'])) - { - $jsonContent['creation']=$jsonContent['date']; - } - else - { - $jsonContent['creation']=date('c'); - } + $jsonContent['creation']=$this->Component->Date->formatDate(strtotime($jsonContent['date'])); break; case 'item': $item=$this->Item->load($id); @@ -175,6 +171,7 @@ public function getelementinfoAction() $jsonContent['translation']['Created']=$this->t('Created'); $jsonContent['translation']['File']=$this->t('File'); $jsonContent['translation']['Uploaded']=$this->t('Uploaded by'); + $jsonContent['translation']['Private']=$this->t('This community is private'); echo JsonComponent::encode($jsonContent); }//end getElementInfo diff --git a/application/controllers/DownloadController.php b/application/controllers/DownloadController.php index 9064e5061..22fa69372 100644 --- a/application/controllers/DownloadController.php +++ b/application/controllers/DownloadController.php @@ -89,7 +89,7 @@ public function indexAction() if(empty($folders)&&empty($revisions)) { - throw new Zend_Exception("Permissions problem"); + exit(); } if(empty($folders)&&count($revisions)==1) { diff --git a/application/controllers/InstallController.php b/application/controllers/InstallController.php index 4afabd8c7..92115738b 100644 --- a/application/controllers/InstallController.php +++ b/application/controllers/InstallController.php @@ -41,6 +41,7 @@ function indexAction() $this->view->writable=is_writable(BASE_PATH.'/application/configs'); $this->view->convertfound=$this->Component->Utility->IsImageMagickWorking(); $this->view->basePath=BASE_PATH; + setcookie("recentItems", '', time()+60*60*24*30,'/'); //30 days if(!empty($_POST)&&$this->view->writable) { $this->_redirect("/install/step2"); diff --git a/application/layouts/layout.phtml b/application/layouts/layout.phtml index e249acfea..bf09a43e2 100644 --- a/application/layouts/layout.phtml +++ b/application/layouts/layout.phtml @@ -126,7 +126,7 @@ - +
@@ -163,7 +163,7 @@ echo "
{$this->header}
"; } ?> -
+
layout()->content ?> diff --git a/application/views/browse/index.phtml b/application/views/browse/index.phtml index 7b1b9ae5a..8853fffc7 100644 --- a/application/views/browse/index.phtml +++ b/application/views/browse/index.phtml @@ -44,6 +44,10 @@
+
+

t('Selected')?>

+ +

Info

diff --git a/application/views/browse/uploaded.phtml b/application/views/browse/uploaded.phtml index 889b0e46f..3f6cb9d74 100644 --- a/application/views/browse/uploaded.phtml +++ b/application/views/browse/uploaded.phtml @@ -2,7 +2,7 @@ $this->headScript()->appendFile($this->webroot.'/public/js/user/user.userpage.js'); ?>
- element('Feed'); ?> + element('feed'); ?> diff --git a/application/views/community/index.phtml b/application/views/community/index.phtml index 438a9c428..f2c2b2257 100644 --- a/application/views/community/index.phtml +++ b/application/views/community/index.phtml @@ -21,6 +21,10 @@ +
+

t('Selected')?>

+ +

Info

To do diff --git a/application/views/feed/index.phtml b/application/views/feed/index.phtml index 840ccd36a..26164a0c9 100644 --- a/application/views/feed/index.phtml +++ b/application/views/feed/index.phtml @@ -8,13 +8,13 @@ element('feed')?>
- - BlaBla -

+
+MIDAS integrates multimedia server technology with Kitware?s open-source data analysis and visualization clients. The server follows open standards for data storage, access and harvesting. +
notifications)) { - echo "
+ echo "

Notifications

"; } @@ -22,7 +22,7 @@ itemThumbnails)) { - echo '
'; + echo '
'; echo '

Thumbnails

'; foreach($this->itemThumbnails as $item) { diff --git a/application/views/folder/view.phtml b/application/views/folder/view.phtml index 37856ea5a..98ff6e005 100644 --- a/application/views/folder/view.phtml +++ b/application/views/folder/view.phtml @@ -54,6 +54,10 @@
+
+

t('Selected')?>

+ +

Info

diff --git a/application/views/user/register.phtml b/application/views/user/register.phtml index dad69fb91..ab48e9c2d 100644 --- a/application/views/user/register.phtml +++ b/application/views/user/register.phtml @@ -3,7 +3,7 @@
- To do + MIDAS integrates multimedia server technology with Kitware?s open-source data analysis and visualization clients. The server follows open standards for data storage, access and harvesting.
diff --git a/application/views/user/termofservice.phtml b/application/views/user/termofservice.phtml index 2463fc203..86a9164ae 100644 --- a/application/views/user/termofservice.phtml +++ b/application/views/user/termofservice.phtml @@ -1 +1 @@ -To do \ No newline at end of file +Copyright \ No newline at end of file diff --git a/application/views/user/userpage.phtml b/application/views/user/userpage.phtml index b3e5ae6c9..f40346d95 100644 --- a/application/views/user/userpage.phtml +++ b/application/views/user/userpage.phtml @@ -114,6 +114,10 @@ $this->headScript()->appendFile($this->webroot.'/public/js/common/common.browser
+
+

t('Selected')?>

+ +

Info

diff --git a/public/css/layout/view.css b/public/css/layout/view.css index ec3ecdeb4..6a0f1367f 100644 --- a/public/css/layout/view.css +++ b/public/css/layout/view.css @@ -52,14 +52,18 @@ div.viewSideBar{ min-height: 500px; } +div.viewSelected{ + display:none; +} + div.viewNotice{ display: none; position: relative; background-color: #45b775; color: #012844; float: right; - top: -28px; - left: -10px; + top: -18px; + left: 175px; padding-left: 10px; padding-right: 10px; padding-top: 2px; diff --git a/public/js/browse/browse.index.js b/public/js/browse/browse.index.js index f181535fc..10c17316a 100644 --- a/public/js/browse/browse.index.js +++ b/public/js/browse/browse.index.js @@ -31,4 +31,7 @@ genericCallbackDblClick(node); } - \ No newline at end of file + function callbackCheckboxes(node) + { + genericCallbackCheckboxes(node); + } \ No newline at end of file diff --git a/public/js/common/common.browser.js b/public/js/common/common.browser.js index e1b8cdc4c..6a20388f0 100644 --- a/public/js/common/common.browser.js +++ b/public/js/common/common.browser.js @@ -11,7 +11,7 @@ ajaxSelectRequest = $.ajax({ type: "POST", url: json.global.webroot+'/browse/getelementinfo', - data: { type: node.attr('type'), id: node.attr('element') }, + data: {type: node.attr('type'), id: node.attr('element')}, success: function(jsonContent){ createInfo(jsonContent); $('img.infoLoading').hide(); @@ -19,6 +19,48 @@ } }); } + + var arraySelected=new Array(); + + function genericCallbackCheckboxes(node) + { + arraySelected=new Array(); + arraySelected['folders']=new Array(); + arraySelected['items']=new Array(); + + var folders=''; + var items=''; + node.find(".treeCheckbox:checked").each(function(){ + if($(this).parents('tr').attr('type')!='item') + { + arraySelected['folders'].push($(this).attr('element')); + folders+=$(this).attr('element')+'-'; + } + else + { + arraySelected['items'].push($(this).attr('element')); + items+=$(this).attr('element')+'-'; + } + }); + var link=json.global.webroot+'/download?folders='+folders+'&items='+items; + if((arraySelected['folders'].length+arraySelected['items'].length)>0) + { + $('div.viewSelected').show(); + var html=(arraySelected['folders'].length+arraySelected['items'].length); + html+=' '+json.browse.element; + if((arraySelected['folders'].length+arraySelected['items'].length)>1) + { + html+='s'; + } + html+='
'+json.browse.download+''; + $('div.viewSelected span').html(html); + } + else + { + $('div.viewSelected').hide(); + $('div.viewSelected span').html(''); + } + } function genericCallbackDblClick(node) { @@ -116,6 +158,18 @@ html+='
'; html+=' '; html+=' '; + if(arrayElement['type']=='community') + { + html+=' '; + html+=' '; + html+=' '; + html+=' '; + } if(arrayElement['type']=='item') { html+=' '; @@ -140,9 +194,14 @@ html+= ''; html+=' '; html+=' '; - html+='
'+arrayElement.translation.Created+''+arrayElement.creation+'
Member'; + if(parseInt(arrayElement['members'])>1) + { + html+='s'; + } + html+= ''+arrayElement['members']+'
'+arrayElement['nbitstream']+'
'; - + } + html+=''; + if(arrayElement['type']=='community'&&arrayElement['privacy']==2) + { + html+='

'+arrayElement.translation.Private+'

'; + } + if(arrayElement['thumbnail']!=undefined&&arrayElement['thumbnail']!='') { diff --git a/public/js/community/community.index.js b/public/js/community/community.index.js index 40e084cea..9b32ca811 100644 --- a/public/js/community/community.index.js +++ b/public/js/community/community.index.js @@ -11,5 +11,4 @@ $('a.createCommunity').click(function() $("div.TopDynamicBar").show('blind'); loadAjaxDynamicBar('login','/user/login'); } - }); diff --git a/public/js/community/community.view.js b/public/js/community/community.view.js index 6704a01d6..271cf5f28 100644 --- a/public/js/community/community.view.js +++ b/public/js/community/community.view.js @@ -33,4 +33,9 @@ function callbackDblClick(node) { genericCallbackDblClick(node); + } + + function callbackCheckboxes(node) + { + genericCallbackCheckboxes(node); } \ No newline at end of file diff --git a/public/js/folder/folder.view.js b/public/js/folder/folder.view.js index e10884c90..375fef8d3 100644 --- a/public/js/folder/folder.view.js +++ b/public/js/folder/folder.view.js @@ -18,4 +18,7 @@ genericCallbackDblClick(node); } - \ No newline at end of file + function callbackCheckboxes(node) + { + genericCallbackCheckboxes(node); + } \ No newline at end of file diff --git a/public/js/layout/jquery.treeTable.js b/public/js/layout/jquery.treeTable.js index ffd706e50..ed83f7f05 100644 --- a/public/js/layout/jquery.treeTable.js +++ b/public/js/layout/jquery.treeTable.js @@ -36,7 +36,6 @@ }); initializeAjax($(this),true); }); - initEvent(); @@ -260,6 +259,13 @@ } }); colorLines(true); + + globalElement.find(".treeCheckbox").unbind('change'); + globalElement.find(".treeCheckbox").change(function(){ + if(typeof callbackCheckboxes == 'function') { + callbackCheckboxes(globalElement); + } + }); } function colorLines(checkHidden) diff --git a/public/js/layout/main.js b/public/js/layout/main.js index 447828848..f6d4e1a6b 100644 --- a/public/js/layout/main.js +++ b/public/js/layout/main.js @@ -133,12 +133,13 @@ $(function() { } else { - showDialogWithContent(json.login.titleUploadLogin, json.login.contentUploadLogin,true); + + createNotive(json.login.contentUploadLogin,4000) $("div.TopDynamicBar").show('blind'); loadAjaxDynamicBar('login','/user/login'); } }); - + if(json.global.logged) { $('.uploadFile').cluetip({ diff --git a/public/js/user/user.userpage.js b/public/js/user/user.userpage.js index 6704a01d6..e8bd70345 100644 --- a/public/js/user/user.userpage.js +++ b/public/js/user/user.userpage.js @@ -33,4 +33,10 @@ function callbackDblClick(node) { genericCallbackDblClick(node); - } \ No newline at end of file + } + + function callbackCheckboxes(node) + { + genericCallbackCheckboxes(node); + } + \ No newline at end of file diff --git a/translation/fr-main.csv b/translation/fr-main.csv index 1417d730f..d8eb50030 100644 --- a/translation/fr-main.csv +++ b/translation/fr-main.csv @@ -95,3 +95,6 @@ Generated in;G Preview;Aperçu Uploaded by;Uploadé par File;Fichier +This community is private;Cette communauté est privée +Selected;Sélection +element;élement \ No newline at end of file