standardize code

This commit is contained in:
Laurent Destailleur 2018-04-15 16:35:18 +02:00
parent 9ae789b358
commit 9e50bbb9b1
17 changed files with 75 additions and 24 deletions

View File

@ -225,9 +225,9 @@ if ($resql)
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>'; $newcardbutton = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit); print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
// Box to select active chart of account // Box to select active chart of account
print $langs->trans("Selectchartofaccounts") . " : "; print $langs->trans("Selectchartofaccounts") . " : ";

View File

@ -148,10 +148,10 @@ if ($object->id > 0)
//print '</div>'; //print '</div>';
$createbutton = ''; $newcardbutton = '';
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
$createbutton.='<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'">'.$langs->trans("AddAction").'</a>'; $newcardbutton.='<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'">'.$langs->trans("AddAction").'</a>';
} }
if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) ))
@ -162,7 +162,7 @@ if ($object->id > 0)
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
print_barre_liste($langs->trans("ActionsOnMember"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', '', $createbutton, '', 0, 1, 1); print_barre_liste($langs->trans("ActionsOnMember"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', '', $newcardbutton, '', 0, 1, 1);
// List of all actions // List of all actions
$filters=array(); $filters=array();

View File

@ -197,7 +197,7 @@ class FormActions
$buttontoaddnewevent=''; $buttontoaddnewevent='';
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
$buttontoaddnewevent = '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(),'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:'').($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage).'">'; $buttontoaddnewevent = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(),'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid>0?'&socid='.$object->socid:'').($projectid>0?'&projectid='.$projectid:'').'&backtopage='.urlencode($urlbacktopage).'">';
$buttontoaddnewevent.= $langs->trans("AddEvent"); $buttontoaddnewevent.= $langs->trans("AddEvent");
$buttontoaddnewevent.= '</a>'; $buttontoaddnewevent.= '</a>';
} }

View File

@ -334,14 +334,14 @@ print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
// Line with explanation and button new job // Line with explanation and button new job
if (! $user->rights->cron->create) if (! $user->rights->cron->create)
{ {
$buttontoshow.='<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("CronCreateJob").'</a>'; $newcardbutton.='<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("CronCreateJob").'</a>';
} }
else else
{ {
$buttontoshow.='<a class="butAction" style="margin-right: 0px;margin-left: 0px;" href="'.DOL_URL_ROOT.'/cron/card.php?action=create">'.$langs->trans("CronCreateJob").'</a>'; $newcardbutton.='<a class="butAction" style="margin-right: 0px;margin-left: 0px;" href="'.DOL_URL_ROOT.'/cron/card.php?action=create">'.$langs->trans("CronCreateJob").'</a>';
} }
print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_setup', 0, $buttontoshow, '', $limit); print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_setup', 0, $newcardbutton, '', $limit);
print $langs->trans('CronInfo').'<br>'; print $langs->trans('CronInfo').'<br>';

View File

@ -350,7 +350,7 @@ if ($action == "view_ticketlist") {
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print_barre_liste($langs->trans('TicketList'), $page, 'public/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticketsup-32@ticketsup'); print_barre_liste($langs->trans('TicketList'), $page, 'public/list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticketsup');
/* /*
* Search bar * Search bar

View File

@ -177,7 +177,7 @@ if ($socid > 0)
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
print load_fiche_titre($langs->trans("ActionsOnCompany"), $buttoncreate, ''); print load_fiche_titre($langs->trans("ActionsOnCompany"), $buttoncreate, '');
//print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $buttoncreate, '', 0, 1, 1); //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 1);
// List of all actions // List of all actions
$filters=array(); $filters=array();

View File

@ -220,12 +220,12 @@ print '</div>';
dol_fiche_end(); dol_fiche_end();
$morehtmlcenter = ''; $newcardbutton = '';
if (! empty($conf->website->enabled)) { if (! empty($conf->website->enabled)) {
if (! empty($user->rights->societe->lire)) { if (! empty($user->rights->societe->lire)) {
$morehtmlcenter .= '<a class="butAction" href="' . DOL_URL_ROOT.'/website/websiteaccount_card.php?action=create&fk_soc='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">' . $langs->trans("AddWebsiteAccount") . '</a>'; $newcardbutton .= '<a class="butAction" href="' . DOL_URL_ROOT.'/website/websiteaccount_card.php?action=create&fk_soc='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">' . $langs->trans("AddWebsiteAccount") . '</a>';
} else { } else {
$morehtmlcenter .= '<a class="butActionRefused" href="#">' . $langs->trans("AddAction") . '</a>'; $newcardbutton .= '<a class="butActionRefused" href="#">' . $langs->trans("AddAction") . '</a>';
} }
} }
@ -322,7 +322,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $morehtmlcenter, '', $limit); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
$topicmail="Information"; $topicmail="Information";
$modelmail="websiteaccount"; $modelmail="websiteaccount";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 234 B

View File

@ -2394,8 +2394,28 @@ span.butAction, span.butActionDelete {
border-top-left-radius: 0 !important; border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
} }
.butActionNew, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
text-decoration: none;
margin: 0em 0.3em 0 0.3em !important;
padding: 0.2em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em;
font-family: <?php print $fontlist ?>;
font-weight: normal;
border-color: #c5c5c5;
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
display: inline-block;
text-align: center;
cursor: pointer;
color: #fff !important;
background: rgb(<?php echo $colorbackhmenu1 ?>);
border: 1px solid rgb(<?php echo $colorbackhmenu1 ?>);
.butAction:hover { border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}
.butAction:hover, .butActionNew:hover {
-webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
} }
@ -2696,6 +2716,12 @@ div.pagination {
div.pagination a { div.pagination a {
font-weight: normal; font-weight: normal;
} }
/*div.pagination a.butAction, div.fichehalfright a.butAction {
margin-right: 0px !important;
}
div.tabsAction a.butActionDelete:last-child, div.tabsAction a.butAction:last-child {
margin-right: 0px !important;
}*/
div.pagination ul div.pagination ul
{ {
list-style: none; list-style: none;

View File

@ -2373,6 +2373,31 @@ span.butAction, span.butActionDelete {
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
} }
.butActionNew, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active {
text-decoration: none;
border-color: #c5c5c5;
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
display: inline-block;
padding: 0.2em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em;
margin: 0em <?php echo ($dol_optimize_smallscreen?'0.7':'0.9'); ?>em;
line-height: 20px;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #ffffff !important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
background-repeat: repeat-x;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.button, .butAction { .button, .butAction {
color: #ffffff !important; color: #ffffff !important;
@ -2427,7 +2452,7 @@ a.butAction:link, a.butAction:visited, a.butAction:hover, a.butAction:active {
a.butAction:hover, a.butActionDelete:hover, a.butActionRefused:hover { a.butAction:hover, a.butActionDelete:hover, a.butActionRefused:hover {
text-decoration: none; text-decoration: none;
} }
a.butAction:hover, a.butActionDelete:hover { a.butAction:hover, a.butActionNew:hover, a.butActionDelete:hover {
opacity: 0.9; opacity: 0.9;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 234 B

View File

@ -437,9 +437,9 @@ print '<input type="hidden" name="mode" value="' . $mode . '" >';
if ($socid) print '<input type="hidden" name="socid" value="' . $socid . '" >'; if ($socid) print '<input type="hidden" name="socid" value="' . $socid . '" >';
if ($projectid) print '<input type="hidden" name="projectid" value="' . $projectid . '" >'; if ($projectid) print '<input type="hidden" name="projectid" value="' . $projectid . '" >';
$buttontocreate = '<a class="butAction" href="new.php?action=create_ticket' . ($socid ? '&socid=' . $socid : '') . ($projectid ? '&origin=projet_project&originid=' . $projectid : '') . '">' . $langs->trans('NewTicket') . '</a>'; $newcardbutton = '<a class="butAction" href="new.php?action=create_ticket' . ($socid ? '&socid=' . $socid : '') . ($projectid ? '&origin=projet_project&originid=' . $projectid : '') . '">' . $langs->trans('NewTicket') . '</a>';
print_barre_liste($langs->trans('TicketList'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_ticketsup', 0, $buttontocreate, '', $limit); print_barre_liste($langs->trans('TicketList'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_ticketsup', 0, $newcardbutton, '', $limit);
if ($mode == 'my_assign') { if ($mode == 'my_assign') {
print '<div class="opacitymedium">' . $langs->trans('TicketAssignedToMeInfos') . '</div><br>'; print '<div class="opacitymedium">' . $langs->trans('TicketAssignedToMeInfos') . '</div><br>';