WIP Work on Kanban view for module list
This commit is contained in:
parent
41b2ed8f89
commit
082b205149
@ -243,10 +243,36 @@ $moduledesc=$objMod->getDesc();
|
||||
$moduleauthor=$objMod->getPublisher();
|
||||
$moduledir=strtolower(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
|
||||
$text = '<span class="opacitymedium">'.$langs->trans("LastActivationDate").':</span> ';
|
||||
if (! empty($conf->global->$const_name)) $text.=dol_print_date($objMod->getLastActivationDate(), 'dayhour');
|
||||
else $text.=$langs->trans("Disabled");
|
||||
$tmp = $objMod->getLastActivationInfo();
|
||||
$authorid = $tmp['authorid'];
|
||||
if ($authorid > 0)
|
||||
{
|
||||
$tmpuser = new User($db);
|
||||
$tmpuser->fetch($authorid);
|
||||
$text.='<br><span class="opacitymedium">'.$langs->trans("LastActivationAuthor").':</span> ';
|
||||
$text.= $tmpuser->getNomUrl(1);
|
||||
}
|
||||
$ip = $tmp['ip'];
|
||||
if ($ip)
|
||||
{
|
||||
$text.='<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
|
||||
$text.= $ip;
|
||||
}
|
||||
|
||||
$moreinfo = $text;
|
||||
|
||||
$title = ($modulename?$modulename:$moduledesc);
|
||||
|
||||
print '<div class="centpercent">';
|
||||
|
||||
print load_fiche_titre(($modulename?$modulename:$moduledesc), $moreinfo, 'object_'.$objMod->picto);
|
||||
$picto = 'object_'.$objMod->picto;
|
||||
|
||||
print load_fiche_titre(($modulename?$modulename:$moduledesc), $moreinfo, $picto);
|
||||
print '<br>';
|
||||
|
||||
dol_fiche_head($head, $mode, $title, -1);
|
||||
@ -256,8 +282,6 @@ if (! $modulename)
|
||||
dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
|
||||
}
|
||||
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
|
||||
|
||||
// Load all lang files of module
|
||||
if (isset($objMod->langfiles) && is_array($objMod->langfiles))
|
||||
{
|
||||
@ -292,44 +316,22 @@ if ($mode == 'desc')
|
||||
{
|
||||
if ($moduledesc) $text .= '<br>'.$moduledesc.'<br><br><br>';
|
||||
|
||||
$text.='<strong>'.$langs->trans("Version").':</strong> '.$version;
|
||||
$text.='<span class="opacitymedium">'.$langs->trans("Version").':</span> '.$version;
|
||||
|
||||
$textexternal='';
|
||||
if ($objMod->isCoreOrExternalModule() == 'external')
|
||||
{
|
||||
$textexternal.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("ExternalModule", $dirofmodule);
|
||||
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><strong>'.$langs->trans("Publisher").':</strong> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
|
||||
$textexternal.='<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("ExternalModule", $dirofmodule);
|
||||
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><span class="opacitymedium">'.$langs->trans("Publisher").':</span> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
|
||||
$editor_url = $objMod->editor_url;
|
||||
if (! preg_match('/^http/', $editor_url)) $editor_url = 'http://'.$editor_url;
|
||||
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i', $objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> <a href="'.$editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
|
||||
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i', $objMod->editor_url)) $textexternal.= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_object('', 'globe').' <a href="'.$editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
|
||||
$text.=$textexternal;
|
||||
$text.='<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("Core").'<br>';
|
||||
}
|
||||
$text.='<br><strong>'.$langs->trans("LastActivationDate").':</strong> ';
|
||||
if (! empty($conf->global->$const_name)) $text.=dol_print_date($objMod->getLastActivationDate(), 'dayhour');
|
||||
else $text.=$langs->trans("Disabled");
|
||||
$text.='<br>';
|
||||
|
||||
$tmp = $objMod->getLastActivationInfo();
|
||||
$authorid = $tmp['authorid'];
|
||||
if ($authorid > 0)
|
||||
{
|
||||
$tmpuser = new User($db);
|
||||
$tmpuser->fetch($authorid);
|
||||
$text.='<strong>'.$langs->trans("LastActivationAuthor").':</strong> ';
|
||||
$text.= $tmpuser->getNomUrl(1);
|
||||
$text.='<br>';
|
||||
}
|
||||
$ip = $tmp['ip'];
|
||||
if ($ip)
|
||||
{
|
||||
$text.='<strong>'.$langs->trans("LastActivationIP").':</strong> ';
|
||||
$text.= $ip;
|
||||
$text.='<br>';
|
||||
$text.='<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("Core").'<br>';
|
||||
}
|
||||
|
||||
$moduledesclong=$objMod->getDescLong();
|
||||
|
||||
@ -480,13 +480,14 @@ $nbofactivatedmodules = count($conf->modules);
|
||||
$moreinfo = $langs->trans("TotalNumberOfActivatedModules", ($nbofactivatedmodules - 1), count($modules));
|
||||
if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"), $moreinfo, 'title_setup');
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
|
||||
|
||||
// Start to show page
|
||||
if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."</span><br>\n";
|
||||
if ($mode == 'marketplace') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."</span><br>\n";
|
||||
if ($mode == 'deploy') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."</span><br>\n";
|
||||
if ($mode == 'develop') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."</span><br>\n";
|
||||
if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."</span><br>\n";
|
||||
if ($mode == 'commonkanban') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."</span><br>\n";
|
||||
if ($mode == 'marketplace') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."</span><br>\n";
|
||||
if ($mode == 'deploy') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."</span><br>\n";
|
||||
if ($mode == 'develop') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."</span><br>\n";
|
||||
|
||||
$head = modules_prepare_head();
|
||||
|
||||
@ -494,7 +495,7 @@ $head = modules_prepare_head();
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
if ($mode == 'common')
|
||||
if ($mode == 'common' || $mode == 'commonkanban')
|
||||
{
|
||||
dol_set_focus('#search_keyword');
|
||||
|
||||
@ -504,12 +505,17 @@ if ($mode == 'common')
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
$newmode = $mode;
|
||||
if ($newmode == 'commonkanban') $newmode = 'common';
|
||||
|
||||
$moreforfilter = '';
|
||||
dol_fiche_head($head, $newmode, '', -1);
|
||||
|
||||
$moreforfilter = '<div class="valignmiddle">';
|
||||
$moreforfilter .= '<div class="colorbacktimesheet float valignmiddle">';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
|
||||
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
|
||||
@ -532,6 +538,16 @@ if ($mode == 'common')
|
||||
$moreforfilter .= '<input type="submit" name="buttonsubmit" class="button" value="'.dol_escape_htmltag($langs->trans("Refresh")).'">';
|
||||
$moreforfilter .= ' ';
|
||||
$moreforfilter .= '<input type="submit" name="buttonreset" class="button" value="'.dol_escape_htmltag($langs->trans("Reset")).'">';
|
||||
$moreforfilter .= '</div>';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right">';
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'));
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right margintoponly marginrightonly" style="padding-top: 3px">'.$moreinfo.'</div>';
|
||||
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (!empty($moreforfilter))
|
||||
@ -552,7 +568,6 @@ if ($mode == 'common')
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
// Show list of modules
|
||||
//$conf->global->MAIN_USE_KANBAN_FOR_MODULES=1;
|
||||
$oldfamily = '';
|
||||
|
||||
foreach ($orders as $key => $value)
|
||||
@ -637,7 +652,7 @@ if ($mode == 'common')
|
||||
$familytext = empty($familyinfo[$familykey]['label']) ? $familykey : $familyinfo[$familykey]['label'];
|
||||
print load_fiche_titre($familytext, '', '');
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_KANBAN_FOR_MODULES)) {
|
||||
if ($mode == 'commonkanban') {
|
||||
print '<div class="box-flex-container">';
|
||||
} else {
|
||||
print '<div class="div-table-responsive">';
|
||||
@ -670,7 +685,7 @@ if ($mode == 'common')
|
||||
$imginfo = "info_black";
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_KANBAN_FOR_MODULES)) {
|
||||
if ($mode == 'commonkanban') {
|
||||
// Output Kanban
|
||||
print $objMod->getKanbanView();
|
||||
} else {
|
||||
@ -880,7 +895,7 @@ if ($mode == 'common')
|
||||
|
||||
if ($oldfamily)
|
||||
{
|
||||
if (! empty($conf->global->MAIN_USE_KANBAN_FOR_MODULES)) {
|
||||
if ($mode == 'commonkanban') {
|
||||
print '</div>';
|
||||
} else {
|
||||
print "</table>\n";
|
||||
|
||||
@ -2286,31 +2286,31 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
|
||||
print '
|
||||
<div class="box-flex-item info-box-module">
|
||||
<div class="info-box info-box-sm info-box-weather info-box-weather-level4">
|
||||
<span class="info-box-icon">';
|
||||
<div class="info-box info-box-sm info-box-module">
|
||||
<div class="info-box-icon">';
|
||||
|
||||
$alttext = '';
|
||||
//if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version);
|
||||
//if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin);
|
||||
if (!empty($this->picto))
|
||||
{
|
||||
if (preg_match('/^\//i', $this->picto)) print img_picto($alttext, $this->picto, 'class="inline-block valignmiddle width50"', 1);
|
||||
else print img_object($alttext, $this->picto, 'class="inline-block valignmiddle width50"');
|
||||
if (preg_match('/^\//i', $this->picto)) print img_picto($alttext, $this->picto, 'class="inline-block valignmiddle"', 1);
|
||||
else print img_object($alttext, $this->picto, 'class="inline-block valignmiddle"');
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($alttext, 'generic', 'class="inline-block valignmiddle width50"');
|
||||
print img_object($alttext, 'generic', 'class="inline-block valignmiddle"');
|
||||
}
|
||||
|
||||
print '<img src="/dolibarr_dev/htdocs/theme/eldy/img/weather/weather-storm.png" alt="" class="inline-block valignmiddle width50"></span>
|
||||
print '<span class="info-box-icon-version" title="'.$langs->trans("Version").' '.$this->getVersion(1).'">'.$this->getVersion(1).'</span>';
|
||||
print '</div>
|
||||
<div class="info-box-content info-box-text-module">
|
||||
<span class="info-box-title">'.$this->getName().'</span>
|
||||
<span class="info-box-desc twolinesmax">'.nl2br($this->getDesc()).'</span>';
|
||||
|
||||
print '<a href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$this->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto($langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
|
||||
//print '<span class="progress-version"><span class="opacitymedium">'.$this->getVersion(1).'</span></span>';
|
||||
print '
|
||||
<span class="progress-description"><span class="opacitymedium">'.$this->getVersion(1).'</span></span>
|
||||
</div><!-- /.info-box-content -->
|
||||
</div><!-- /.info-box -->
|
||||
</div>';
|
||||
|
||||
@ -830,6 +830,8 @@ Gender=Gender
|
||||
Genderman=Man
|
||||
Genderwoman=Woman
|
||||
ViewList=List view
|
||||
ViewGantt=Gantt view
|
||||
ViewKanban=Kanban view
|
||||
Mandatory=Mandatory
|
||||
Hello=Hello
|
||||
GoodBye=GoodBye
|
||||
|
||||
@ -87,8 +87,6 @@ WhichIamLinkedToProject=which I'm linked to project
|
||||
Time=Time
|
||||
ListOfTasks=List of tasks
|
||||
GoToListOfTimeConsumed=Go to list of time consumed
|
||||
GoToListOfTasks=Show as list
|
||||
GoToGanttView=show as Gantt
|
||||
GanttView=Gantt View
|
||||
ListProposalsAssociatedProject=List of the commercial proposals related to the project
|
||||
ListOrdersAssociatedProject=List of sales orders related to the project
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
$id = GETPOST('id', 'intcomma');
|
||||
@ -234,7 +235,7 @@ if ($user->rights->projet->all->creer || $user->rights->projet->creer) {
|
||||
|
||||
$linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', $linktocreatetaskUserRight, $linktocreatetaskParam);
|
||||
|
||||
$linktolist = dolGetButtonTitle($langs->trans('GoToListOfTasks'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition'));
|
||||
$linktolist = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition'));
|
||||
|
||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||
print load_fiche_titre($title, $linktolist.' '.$linktocreatetask, 'generic');
|
||||
|
||||
@ -647,7 +647,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$title = $langs->trans("ListOfTasks");
|
||||
$linktotasks = dolGetButtonTitle($langs->trans('GoToGanttView'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition'));
|
||||
$linktotasks = dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition'));
|
||||
|
||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'generic');
|
||||
|
||||
@ -64,12 +64,15 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
line-height: 90px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.info-box-sm .info-box-icon{
|
||||
.info-box-sm .info-box-icon {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
font-size: 25px;
|
||||
line-height: 80px;
|
||||
}
|
||||
.info-box-module .info-box-icon {
|
||||
height: 106px;
|
||||
}
|
||||
.info-box-icon > img {
|
||||
max-width: 100%;
|
||||
}
|
||||
@ -92,13 +95,33 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
transition: opacity 0.5s, visibility 0s 0.5s;
|
||||
}
|
||||
|
||||
.info-box-icon-version {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 90px;
|
||||
bottom: 0px;
|
||||
color: #ffffff;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
cursor: default;
|
||||
|
||||
font-size: 10px;
|
||||
line-height: 22px;
|
||||
padding: 0px 3px;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 0.5s, visibility 0s 0.5s;
|
||||
transition: opacity 0.5s, visibility 0s 0.5s;
|
||||
}
|
||||
|
||||
|
||||
<?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?>
|
||||
.info-box-icon-text{
|
||||
opacity: 1;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
.info-box-sm .info-box-icon-text{
|
||||
.info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user