Example #1
0
 /**
  * Enter description here...
  *
  * @param unknown_type $row
  * @param unknown_type $id
  * @return unknown
  */
 public static function checkedOut($row, $id = 'sid')
 {
     $state = $row->get('cout');
     if ($state && $state != Sobi::My('id') && strtotime($row->get('coutTime')) > time()) {
         /* translate alternative text */
         $user = SPUser::getInstance($state);
         $uname = $user->get('name');
         $img = Sobi::Cfg('list_icons.checked_out');
         $s = Sobi::Txt($row->get('oType') . '.checked_out');
         $a = Sobi::Txt($row->get('oType') . '.checked_out_by', array('user' => $uname, 'time' => $row->get('coutTime')));
         $r = SPTooltip::toolTip($a, $s, $img);
     } else {
         $sid = $row->get('id');
         $r = "<input type=\"checkbox\" name=\"{$id}[]\" value=\"{$sid}\" onclick=\"SPCheckListElement( this )\" />";
     }
     return $r;
 }
Example #2
0
 /**
  * Creates a tooltip with the given title and text
  * @param string $tooltip
  * @param string $title
  * @param null $img
  * @return string
  */
 public static function Tooltip($tooltip, $title = null, $img = null)
 {
     SPLoader::loadClass('html.tooltip');
     return SPTooltip::_($tooltip, $title, $img);
 }