diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index 1390cd4d5de..e0f7f4d50b6 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -809,9 +809,10 @@ function getSocialNetworkSharingLinks()
* @param string $sortorder Sort order ('DESC' or 'ASC')
* @param string $langcode Language code ('' or 'en', 'fr', 'es', ...)
* @param array $otherfilters Other filters
+ * @param int $status 0 or 1, or -1 for both
* @return string HTML content
*/
-function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null')
+function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null', $status = 1)
{
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
@@ -852,7 +853,9 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$sql .= ', '.MAIN_DB_PREFIX.'categorie_website_page as cwp';
}
$sql .= " WHERE wp.fk_website = ".$website->id;
- $sql .= " AND wp.status = 1";
+ if ($status >= 0) {
+ $sql .= " AND wp.status = ".$status;
+ }
if ($langcode) {
$sql .= " AND wp.lang ='".$db->escape($langcode)."'";
}
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 4b8ed2b0894..e406bf6e1f2 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -485,6 +485,7 @@ Categories=Tags/categories
Category=Tag/category
By=By
From=From
+FromDate=From
FromLocation=From
to=to
To=to
diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang
index 9b75a2ff37e..aea757e4a15 100644
--- a/htdocs/langs/en_US/users.lang
+++ b/htdocs/langs/en_US/users.lang
@@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode
UserAccountancyCode=User accounting code
UserLogoff=User logout
UserLogged=User logged
+DateOfEmployment=Employment date
DateEmployment=Employment Start Date
DateEmploymentEnd=Employment End Date
CantDisableYourself=You can't disable your own user record
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index 0773e610754..e78d82592bb 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -7,8 +7,10 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
--btncolorbg: #fbfbfb;
--btncolorborderhover: none;
--btncolorborder: #FFF;
- --butactionbg:rgb(218, 235, 225);
--butactiondeletebg: rgb(234,228,225);
+ /* tertiary color */
+ --butactionbg:rgb(218, 235, 225);
+ /* --butactionbg:rgb(228, 218, 235); */
}
socialnetworks->enabled))
- // {
- // print '
| '.$langs->trans("Skype").' | ';
- // print '';
- // if (! empty($ldap_skype))
- // {
- // print '';
- // print $ldap_skype;
- // }
- // else
- // {
- // print '';
- // }
- // print ' |
';
- // }
-
- // // Twitter
- // if (! empty($conf->socialnetworks->enabled))
- // {
- // print '| '.$langs->trans("Twitter").' | ';
- // print '';
- // if (! empty($ldap_twitter))
- // {
- // print '';
- // print $ldap_twitter;
- // }
- // else
- // {
- // print '';
- // }
- // print ' |
';
- // }
-
- // // Facebook
- // if (! empty($conf->socialnetworks->enabled))
- // {
- // print '| '.$langs->trans("Facebook").' | ';
- // print '';
- // if (! empty($ldap_facebook))
- // {
- // print '';
- // print $ldap_facebook;
- // }
- // else
- // {
- // print '';
- // }
- // print ' |
';
- // }
-
- // // LinkedIn
- // if (! empty($conf->socialnetworks->enabled))
- // {
- // print '| '.$langs->trans("LinkedIn").' | ';
- // print '';
- // if (! empty($ldap_linkedin))
- // {
- // print '';
- // print $ldap_linkedin;
- // }
- // else
- // {
- // print '';
- // }
- // print ' |
';
- // }
// Accountancy code
if ($conf->accounting->enabled)
@@ -1661,16 +1594,22 @@ if ($action == 'create' || $action == 'adduserldap')
print "\n";
// Date employment
- print '| '.$langs->trans("DateEmployment").' | ';
+ print '
| '.$langs->trans("DateOfEmployment").' | ';
print '';
- print dol_print_date($object->dateemployment, 'day');
- print ' | ';
- print "
\n";
+ if ($object->dateemployment) {
+ print ''.$langs->trans("FromDate ").'';
+ print dol_print_date($object->dateemployment, 'day');
+ }
+ //print '';
+ //print "\n";
// Date employment
- print '| '.$langs->trans("DateEmploymentEnd").' | ';
- print '';
- print dol_print_date($object->dateemploymentend);
+ //print ' |
| '.$langs->trans("DateEmploymentEnd").' | ';
+ //print '';
+ if ($object->dateemploymentend) {
+ print ' - '.$langs->trans("To ").'';
+ print dol_print_date($object->dateemploymentend, 'day');
+ }
print ' | ';
print "
\n";
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index d59b15e15fe..7143cee779c 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -288,7 +288,7 @@ if ($action == 'replacesiteconfirm') {
$otherfilters['category'] = GETPOST('optioncategory', 'int');
}
- $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters);
+ $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1);
}
$usercanedit = $user->rights->website->write;
@@ -424,7 +424,7 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us
$db->commit();
}
// Now we reload list
- $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters);
+ $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1);
}
// Replacement of string into pages
@@ -3557,6 +3557,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
if ($action != 'createcontainer')
{
+ print ''."\n";
print '| ';
print $langs->trans('Status');
print ' | ';
@@ -3829,7 +3830,6 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print getTitleFieldOfList("Type", 0, $_SERVER['PHP_SELF'], 'type_container', '', $param, '', $sortfield, $sortorder, '')."\n";
print getTitleFieldOfList("Page", 0, $_SERVER['PHP_SELF'], 'pageurl', '', $param, '', $sortfield, $sortorder, '')."\n";
print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
- //print getTitleFieldOfList("Description", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '')."\n";
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
@@ -3859,7 +3859,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print ''.$answerrecord->description.'';
print ' | ';
- // Categories
+ // Categories - Tags
print '';
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire))
{
@@ -3868,7 +3868,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
if (is_array($existing)) {
foreach ($existing as $tmpcategory) {
//var_dump($tmpcategory);
- print 'label).'">';
+ print img_object($langs->trans("Category").' : '.$tmpcategory->label, 'category', 'style="padding-left: 2px; padding-right: 2px; color: #'.($tmpcategory->color != '' ? $tmpcategory->color : '888').'"');
}
}
}
@@ -3886,30 +3886,37 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
$param .= '&optioncategory='.GETPOST('optioncategory', 'aZ09');
$param .= '&searchstring='.urlencode($searchkey);
- // Edit properties
+ // Language
print ' | ';
+ print $answerrecord->lang;
+ print ' | ';
+
+ // Edit properties, HTML sources, status
+ print '';
$disabled = '';
$urltoedithtmlsource = $_SERVER["PHP_SELF"].'?action=editmeta&websiteid='.$website->id.'&pageid='.$answerrecord->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].$param);
if (empty($user->rights->website->write)) {
$disabled = ' disabled';
$urltoedithtmlsource = '';
}
- print ''.img_picto($langs->trans("EditPageMeta"), 'pencil-ruler').'';
- print ' | ';
+ print ''.img_picto($langs->trans("EditPageMeta"), 'pencil-ruler').'';
- // Edit HTML source
- print '';
$disabled = '';
$urltoedithtmlsource = $_SERVER["PHP_SELF"].'?action=editsource&websiteid='.$website->id.'&pageid='.$answerrecord->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].$param);
if (empty($user->rights->website->write)) {
$disabled = ' disabled';
$urltoedithtmlsource = '';
}
- print ''.img_picto($langs->trans("EditHTMLSource"), 'edit').'';
+ print ''.img_picto($langs->trans("EditHTMLSource"), 'edit').'';
+
+ print ''.ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled');
+
print ' | ';
// Action column
print '';
+
+ print ''."\n";
if ($massactionbutton || $massaction)
{
$selected = 0;
@@ -3956,10 +3963,11 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print 'ref.'&backtopage='.urlencode($backtopageurl).'">'.$langs->trans("EditCss").'';
print ' | ';
+ // Language
print '';
print ' | ';
- print '';
+ print ' | ';
print ' | ';
// Action column
@@ -3974,7 +3982,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print '
';
}
else {
- print $listofpages['message'];
+ print ''.$listofpages['message'].'
';
}
print '';