mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
projectmanager: added a moreOptions dropdown list to the link add widget in elements view to be able to assign eRoles to added elements quick; added a preference to give a downloaded merge document a default name
This commit is contained in:
parent
1d9f9e4ee3
commit
a1b44f8df7
@ -751,9 +751,10 @@ abstract class bo_merge
|
||||
*
|
||||
* @param string $document vfs-path of document
|
||||
* @param array $ids array with contact id(s)
|
||||
* @param string $name='' name to use for downloaded document
|
||||
* @return string with error-message on error, otherwise it does NOT return
|
||||
*/
|
||||
public function download($document,$ids)
|
||||
public function download($document,$ids,$name='')
|
||||
{
|
||||
$content_url = egw_vfs::PREFIX.$document;
|
||||
switch (($mimetype = egw_vfs::mime_content_type($document)))
|
||||
@ -804,6 +805,18 @@ abstract class bo_merge
|
||||
{
|
||||
return $err;
|
||||
}
|
||||
if(!empty($name))
|
||||
{
|
||||
if(empty($ext))
|
||||
{
|
||||
$ext = '.'.pathinfo($document,PATHINFO_EXTENSION);
|
||||
}
|
||||
$name .= $ext;
|
||||
}
|
||||
else
|
||||
{
|
||||
$name = basename($document);
|
||||
}
|
||||
if (isset($archive))
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
@ -821,7 +834,7 @@ abstract class bo_merge
|
||||
{
|
||||
exec('/usr/bin/zip -F '.escapeshellarg($archive));
|
||||
}
|
||||
html::content_header(basename($document),$mimetype,filesize($archive));
|
||||
html::content_header($name,$mimetype,filesize($archive));
|
||||
readfile($archive,'r');
|
||||
}
|
||||
else
|
||||
@ -837,7 +850,7 @@ abstract class bo_merge
|
||||
$mimetype = 'application/vnd.ms-excel'; // to open it automatically in excel or oocalc
|
||||
}
|
||||
}
|
||||
ExecMethod2('phpgwapi.browser.content_header',basename($document),$mimetype);
|
||||
ExecMethod2('phpgwapi.browser.content_header',$name,$mimetype);
|
||||
echo $merged;
|
||||
}
|
||||
common::egw_exit();
|
||||
|
@ -838,3 +838,12 @@ td.lettersearch {
|
||||
.egwGridView_grid input[type=checkbox] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.egwLinkMoreOptions {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: 2px solid black;
|
||||
border-left: 2px solid black;
|
||||
border-right: 2px solid black;
|
||||
}
|
||||
|
@ -1068,3 +1068,12 @@ td.lettersearch {
|
||||
.egwGridView_grid input[type=checkbox] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.egwLinkMoreOptions {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: 2px solid black;
|
||||
border-left: 2px solid black;
|
||||
border-right: 2px solid black;
|
||||
}
|
||||
|
@ -1012,3 +1012,12 @@ td.lettersearch {
|
||||
.egwGridView_grid input[type=checkbox] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.egwLinkMoreOptions {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: 2px solid black;
|
||||
border-left: 2px solid black;
|
||||
border-right: 2px solid black;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user