protected function renderAvailableAttributesContent()
 {
     $modelClassName = $this->model->getModelClassName();
     $model = new $modelClassName(false);
     $adapter = new ModelNumberOrCurrencyAttributesAdapter($model);
     $attributeData = $adapter->getAttributes();
     $title = Zurmo::t('DesignerModule', 'Create a math formula that is calculated from other fields.' . ' Use the Formula Name from the Available Fields grid below to create your formula.' . ' Example formula (field1 * field2) / field3');
     $spanContent = '<span id="formula-tooltip" class="tooltip" title="' . $title . '">?</span>';
     if (count($attributeData) > 0) {
         $content = '<strong>' . Zurmo::t('DesignerModule', 'Available Fields:') . '</strong> ' . $spanContent;
         $content .= '<table id="available-fields">';
         $content .= '<tr><th>' . Zurmo::t('DesignerModule', 'Field Name') . '</th>';
         $content .= '<th>' . Zurmo::t('DesignerModule', 'Formula Name') . '</th></tr>';
         foreach ($attributeData as $attributeName => $data) {
             $content .= '<tr><td>' . $data['attributeLabel'] . '</td><td>' . $attributeName . '</td></tr>';
         }
         $content .= '</table>';
     } else {
         $content = '<span class="error">' . Zurmo::t('DesignerModule', 'There are no fields in this module to be used in a formula.');
         $content .= '</span>';
     }
     $qtip = new ZurmoTip();
     $qtip->addQTip("#formula-tooltip");
     return $content;
 }
 public function run()
 {
     $defaultView = $this->defaultView;
     $inputId = $this->inputId;
     $eventsUrl = Yii::app()->createUrl('calendars/default/getEvents');
     //Set the goto date for calendar
     $startDate = $this->startDate;
     $startDateAttr = explode('-', $startDate);
     $year = $startDateAttr[0];
     $month = intval($startDateAttr[1]) - 1;
     $day = intval($startDateAttr[2]);
     $currentYear = date('Y');
     $currentMonth = intval(date('m')) - 1;
     $currentDay = date('d');
     $maxCount = CalendarItemsDataProvider::MAXIMUM_CALENDAR_ITEMS_COUNT;
     //Register full calendar script and css
     self::registerFullCalendarScriptAndCss();
     //Register qtip for event render
     $qtip = new ZurmoTip();
     $qtip->addQTip(".fc-event");
     $cs = Yii::app()->getClientScript();
     $loadingText = Zurmo::t('Core', 'Loading..');
     // Begin Not Coding Standard
     $script = "\$(document).on('ready', function() {\n                                    \$('#{$inputId}').fullCalendar({\n                                                                    editable: false,\n                                                                    header: {\n                                                                                left: 'prev,next today',\n                                                                                center: 'title',\n                                                                                right: 'month,basicWeek,basicDay'\n                                                                            },\n                                                                     defaultView: '{$defaultView}',\n                                                                     firstDay    :1,\n                                                                     ignoreTimeZone:false,\n                                                                     lazyFetching : false,\n                                                                     loading: function(bool)\n                                                                              {\n                                                                                if (bool)\n                                                                                {\n                                                                                    \$(this).makeLargeLoadingSpinner(true, '#{$inputId}');\n                                                                                }\n                                                                                else\n                                                                                {\n                                                                                    \$(this).makeLargeLoadingSpinner(false, '#{$inputId}');\n                                                                                }\n                                                                              },\n                                                                     eventSources: [\n                                                                                      getCalendarEvents('{$eventsUrl}', '{$inputId}')\n                                                                                   ],\n                                                                     eventRender: function(event, element, view) {\n                                                                                        element.qtip({\n                                                                                            content: {\n                                                                                                        text: '{$loadingText}',\n                                                                                                        ajax: {\n                                                                                                                    url: event.description,\n                                                                                                                    type: 'get'\n                                                                                                                },\n                                                                                                        title: {\n                                                                                                                  text: event.title,\n                                                                                                                  button: 'Close'\n                                                                                                               }\n                                                                                                     },\n                                                                                            style: {classes:'calendar-event-tooltip'},\n                                                                                            show:{\n                                                                                                    event: 'click'\n                                                                                            },\n                                                                                            hide: {\n                                                                                                    event: 'false'\n                                                                                                  },\n                                                                                            position: {\n                                                                                                        my: 'bottom center',\n                                                                                                        at: 'top center',\n                                                                                                        target: 'mouse',\n                                                                                                        viewport: \$('#calendar'),\n                                                                                                        adjust: {\n                                                                                                            mouse: false,\n                                                                                                            scroll: false\n                                                                                                        }\n                                                                                                      }\n                                                                                        });\n                                                                                    },\n                                                                     timeFormat: {\n                                                                                    'month'    : '',\n                                                                                    'basicDay': 'h:mm-{h:mm}tt',\n                                                                                    'basicWeek': 'h:mm-{h:mm}tt'\n                                                                                 }\n                                                                    });\n                                         \$('#{$inputId}').fullCalendar('gotoDate', {$year}, {$month}, {$day});\n                                         \$('.fc-button-today').click(function() {\n                                                                                    \$('#{$inputId}').fullCalendar('changeView', 'basicDay');\n                                                                                    \$('#{$inputId}').fullCalendar('gotoDate', {$currentYear}, {$currentMonth}, {$currentDay});\n                                                                                });\n                                 });";
     // End Not Coding Standard
     $cs->registerScript('loadCalendarScript', $script, ClientScript::POS_END);
 }
 protected static function renderHelpContent()
 {
     $title = Zurmo::t('ActivitiesModule', 'Turn roll up on to see activities from related records.');
     $content = '<span id="activities-rollup-tooltip" class="tooltip" title="' . $title . '">?</span>';
     $qtip = new ZurmoTip();
     $qtip->addQTip("#activities-rollup-tooltip");
     return $content;
 }
 protected static function renderToolTipContent()
 {
     $title = Zurmo::t('UsersModule', 'If unchecked, will use system SMTP settings.');
     $content = '<span id="custom-outbound-settings-tooltip" class="tooltip"  title="' . $title . '">?</span>';
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#custom-outbound-settings-tooltip");
     return $content;
 }
 protected static function renderTooltipContentForEnableDesktopNotifications()
 {
     $title = Zurmo::t('UsersModule', 'Check this box if the user should not be selectable. ' . 'An example is the user would not be selectable as an owner of ' . 'a record or selected as a recipient while composing email.');
     $content = ZurmoHtml::tag('span', array('id' => 'user-hide-from-selecting-tooltip', 'class' => 'tooltip', 'title' => $title), '?');
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'), 'hide' => array('event' => 'unfocus'), 'show' => array('event' => 'click'))));
     $qtip->addQTip("#user-hide-from-selecting-tooltip");
     return $content;
 }
 protected static function renderHelpSpan()
 {
     $title = Zurmo::t('NotesModule', 'Post this note to your profile to share with your colleagues');
     $content = '<span id="post-to-profile-note-tooltip" class="tooltip" title="' . $title . '">?</span>';
     $qtip = new ZurmoTip();
     $qtip->addQTip("#post-to-profile-note-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     $title = Zurmo::t('TrackingModule', 'Tracking requests must be processed as a super administrator user.');
     $content = parent::renderLabel();
     $content .= ZurmoHtml::tag('span', array('id' => 'run-tracking-from-user-tooltip', 'class' => 'tooltip', 'title' => $title), '?');
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#run-tracking-from-user-tooltip");
     return $content;
 }
 protected static function renderTooltipContent()
 {
     $title = Zurmo::t('UsersModule', 'Inactive users cannot log in using the web, mobile or web API. Login for' . ' active users is controlled by group module rights.');
     $content = '<span id="user-status-tooltip" class="tooltip"  title="' . $title . '">';
     $content .= '?</span>';
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#user-status-tooltip");
     return $content;
 }
 protected static function renderTooltipContentForEnableDesktopNotifications()
 {
     $link = ZurmoHtml::link(Zurmo::t('Core', 'Click Here'), '', array('onClick' => 'js:desktopNotifications.requestAutorization(); return false;'));
     $title = Zurmo::t('UsersModule', '<p>This feature only works in Chrome when real time updates are globally enabled. </p>' . '<p>Permissions need to be activated for each browser.</p>' . '<p>To activate, <u>{link}</u> and choose "allow" at browser request.</p>', array('{link}' => $link));
     $content = ZurmoHtml::tag('span', array('id' => 'user-enable-desktop-notifications-tooltip', 'class' => 'tooltip', 'title' => $title), '?');
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'), 'hide' => array('event' => 'unfocus'), 'show' => array('event' => 'click'))));
     $qtip->addQTip("#user-enable-desktop-notifications-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     $title = Zurmo::t('ZurmoModule', 'Your image will be resized to 32 pixels in height while maintaining the correct aspect ratio in width.');
     $content = Zurmo::t('ZurmoModule', 'Please select a logo to upload');
     $content .= '<span id="logo-upload-tooltip" class="tooltip"  title="' . $title . '">?</span>';
     $qtip = new ZurmoTip();
     $qtip->addQTip("#logo-upload-tooltip");
     return $content;
 }
 protected static function renderRestrictedEmailMessageAccessLink(EmailMessage $emailMessage)
 {
     $title = Zurmo::t('CampaignsModule', 'You cannot see the performance metrics due to limited access');
     $content = ZurmoHtml::tag('em', array(), Zurmo::t('CampaignsModule', 'Restricted'));
     $content .= ZurmoHtml::tag('span', array('id' => 'restricted-access-email-message-tooltip' . $emailMessage->id, 'class' => 'tooltip', 'title' => $title), '?');
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom left', 'at' => 'top left', 'adjust' => array('x' => 6, 'y' => -1)))));
     $qtip->addQTip('#restricted-access-email-message-tooltip' . $emailMessage->id);
     return $content;
 }
示例#12
0
 protected function renderLabel()
 {
     $title = Zurmo::t('ZurmoModule', 'Like: dc=server,dc=world for both LDAP and Active Directory');
     // Not Coding Standard
     $content = parent::renderLabel();
     $content .= '<span id="ldap-rollup-tooltip" class="tooltip" title="' . $title . '">?</span>';
     $qtip = new ZurmoTip();
     $qtip->addQTip("#ldap-rollup-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     $title = Zurmo::t('EmailMessagesModule', 'Zurmo sends out system notifications.  The notifications must appear ' . 'as coming from a super administrative user.');
     $content = parent::renderLabel();
     $content .= '<span id="send-notifications-from-user-tooltip" class="tooltip"  title="' . $title . '">';
     $content .= '?</span>';
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#send-notifications-from-user-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     $title = Zurmo::t('WorkflowsModule', 'Workflows must be processed as a super administrator user.');
     $content = parent::renderLabel();
     $content .= '<span id="run-workflows-from-user-tooltip" class="tooltip"  title="' . $title . '">';
     $content .= '?</span>';
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#run-workflows-from-user-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     if ($this->form === null) {
         return $this->getFormattedAttributeLabel();
     }
     $title = Zurmo::t('ZurmoModule', 'Check to track when recipients open an email or click any links.');
     $content = Zurmo::t('ZurmoModule', 'Enable Tracking');
     $content .= ZurmoHtml::tag('span', array('id' => 'enable-tracking-tooltip', 'class' => 'tooltip', 'title' => $title), '?');
     $enableTrackingTip = new ZurmoTip();
     $enableTrackingTip->addQTip("#enable-tracking-tooltip");
     return $content;
 }
 protected function renderLabel()
 {
     if ($this->form === null) {
         return $this->getFormattedAttributeLabel();
     }
     $title = Zurmo::t('CampaignsModule', 'When checked, email will be sent in both text and HTML format.  Uncheck to only send text emails');
     $content = Zurmo::t('ZurmoModule', 'Support HTML');
     $content .= ZurmoHtml::tag('span', array('id' => 'support-rich-text-tooltip', 'class' => 'tooltip', 'title' => $title), '?');
     $enableTrackingTip = new ZurmoTip();
     $enableTrackingTip->addQTip("#support-rich-text-tooltip");
     return $content;
 }
 protected function resolveElementDuringFormLayoutRender(&$element)
 {
     if ($element->getAttribute() == 'reCaptchaPrivateKey') {
         $title = Zurmo::t('ZurmoModule', 'ReCaptcha private key can be generated at http://recaptcha.net');
         $content = '<span id="captcha-private-key-tooltip" class="tooltip"  title="' . $title . '">?</span>';
         $qtip = new ZurmoTip();
         $qtip->addQTip("#captcha-private-key-tooltip");
         $element->editableTemplate = '<th>{label}' . $content . '</th>' . '<td colspan="{colspan}">{content}{error}</td>';
     } elseif ($element->getAttribute() == 'reCaptchaPublicKey') {
         $title = Zurmo::t('ZurmoModule', 'ReCaptcha public key can be generated at http://recaptcha.net');
         $content = '<span id="captcha-public-key-tooltip" class="tooltip"  title="' . $title . '">?</span>';
         $qtip = new ZurmoTip();
         $qtip->addQTip("#captcha-public-key-tooltip");
         $element->editableTemplate = '<th>{label}' . $content . '</th>' . '<td colspan="{colspan}">{content}{error}</td>';
     }
 }
 /**
  * @param JobLog $jobLog
  * @return string
  * @throws NotSupportedException
  */
 public static function renderStatusAndMessageListContent(JobLog $jobLog)
 {
     if ($jobLog->status == JobLog::STATUS_COMPLETE_WITH_ERROR) {
         $content = '<span class="job-label">' . Zurmo::t('JobsManagerModule', 'Completed with Errors') . '</span>';
         $content .= '<span id="active-nonmonitor-job-tooltip-' . $jobLog->id . '" class="tooltip" title="' . ZurmoHtml::encode($jobLog->message) . '">?</span>';
         $options = array('content' => array('title' => array('text' => Zurmo::t('JobsManagerModule', 'Error Log'), 'button' => Zurmo::t('Core', 'Close'))), 'hide' => array('event' => 'click'), 'show' => array('event' => 'click mouseenter', 'solo' => true), 'adjust' => array('screen' => true), 'position' => array('corner' => array('target' => 'bottomRight', 'tooltip' => 'topRight')), 'style' => array('width' => array('max' => 600)), 'api' => array('beforeHide' => 'js:function (event, api)
                                                                  { if (event.originalEvent.type !== "click")
                                                                  { return false;}}'));
         // Not Coding Standard
         $qtip = new ZurmoTip();
         $qtip->addQTip("#active-nonmonitor-job-tooltip-" . $jobLog->id, $options);
         return $content;
     } elseif ($jobLog->status == JobLog::STATUS_COMPLETE_WITHOUT_ERROR) {
         return Zurmo::t('Core', 'Completed');
     } else {
         throw new NotSupportedException();
     }
 }
 protected static function renderActiveHeaderContent()
 {
     $title = Zurmo::t('ZurmoModule', 'Active currencies can be used when creating new records and as a default currency for a user.');
     $content = Zurmo::t('Core', 'Active');
     $content .= '<span id="active-currencies-tooltip" class="tooltip"  title="' . $title . '">?</span>';
     $qtip = new ZurmoTip();
     $qtip->addQTip("#active-currencies-tooltip");
     return $content;
 }
 protected function renderTooltipContentForNotification()
 {
     $title = UserNotificationUtil::getTooltipTitleByAttribute($this->attribute);
     $content = ZurmoHtml::tag('span', array('id' => UserNotificationUtil::getTooltipIdByAttribute($this->attribute), 'class' => 'tooltip', 'title' => $title), '?');
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'), 'hide' => array('event' => 'unfocus'), 'show' => array('event' => 'click'))));
     $qtip->addQTip("#" . UserNotificationUtil::getTooltipIdByAttribute($this->attribute));
     return $content;
 }
 protected function resolveThemeColorNamesAndLabelsForLocking(GameLevel $gameLevel)
 {
     $namesAndUnlockedAtLevels = $this->model->getKanbanBoard()->getThemeColorNamesAndUnlockedAtLevel();
     $data = array();
     foreach ($this->model->getKanbanBoard()->getThemeNamesAndLabels() as $name => $label) {
         $label = '<span class="background-texture-1"></span>' . $label;
         $unlockedAtLevel = $namesAndUnlockedAtLevels[$name];
         if ($unlockedAtLevel > (int) $gameLevel->value) {
             $title = Zurmo::t('GamificationModule', 'Unlocked at level {level}', array('{level}' => $unlockedAtLevel));
             $content = '<span id="background-texture-tooltip-' . $name . '" title="' . $title . '"><i class="icon-lock"></i></span>' . $label;
             // Not Coding Standard
             $qtip = new ZurmoTip();
             $qtip->addQTip("#background-texture-tooltip-" . $name);
         } else {
             $content = $label;
         }
         $data[$name] = $content;
     }
     return $data;
 }
 protected function renderAvailableAttributesContent()
 {
     $modelClassName = $this->model->getModelClassName();
     $model = new $modelClassName(false);
     $adapter = new ModelNumberOrCurrencyAttributesAdapter($model);
     $attributeDataNumerOrCurrency = $adapter->getAttributes();
     $title = Zurmo::t('DesignerModule', 'Create a formula that is evaluated based on other fields. ' . 'The formula can be a math expression calculated from number ' . 'fields, for example, you can use an expression like ' . '(field1 * field2) / field3. The formula can also include an if ' . 'statement, use the IF(condition;trueValue;falseValue) syntax. ' . 'Within the condition and values you can use strings, string fields, ' . 'number fields or math expressions. Strings should be surrounded by ' . '\'. In the condition you can ' . 'use the operators <, >, ==, !=, <= and >=. An example of an if ' . 'statement is IF(field1 == field4;field2/365;0)');
     // Not Coding Standard
     $spanContent = '<span id="formula-tooltip" class="tooltip" title="' . $title . '">?</span>';
     $content = null;
     $adapter = new ModelAttributesAdapter($model);
     $attributeData = $adapter->getAttributes();
     if (count($attributeData) > 0) {
         $content .= '<strong>' . Zurmo::t('DesignerModule', 'Available Fields For Formula:') . '</strong> ';
         $content .= $spanContent;
         $content .= '<table id="available-fields">';
         $content .= '<tr><th>' . Zurmo::t('DesignerModule', 'Field Name') . '</th>';
         $content .= '<th>' . Zurmo::t('DesignerModule', 'Formula Name') . '</th>';
         $content .= '<th>' . Zurmo::t('DesignerModule', 'Can be used in math expression') . '</th></tr>';
         foreach ($attributeData as $attributeName => $data) {
             $content .= '<tr><td>' . $data['attributeLabel'] . '</td>';
             $content .= '<td>' . $attributeName . '</td>';
             $canBeUsedInMathExpression = Zurmo::t('DesignerModule', 'No');
             if (in_array($attributeName, array_keys($attributeDataNumerOrCurrency))) {
                 $canBeUsedInMathExpression = Zurmo::t('DesignerModule', 'Yes');
             }
             $content .= '<td>' . $canBeUsedInMathExpression . '</td></tr>';
         }
         $content .= '</table>';
     } else {
         $content .= '<span class="error">' . Zurmo::t('DesignerModule', 'There are no fields in this module to be used in an expression.');
         $content .= '</span>';
     }
     $qtip = new ZurmoTip();
     $qtip->addQTip("#formula-tooltip");
     return ZurmoHtml::tag('div', array('class' => 'field-instructions'), $content);
 }
 protected function renderBadgeContent()
 {
     $content = null;
     if (count($this->params['badgeData']) > 0) {
         foreach ($this->params['badgeData'] as $badge) {
             $badgeRulesClassName = $badge->type . 'GameBadgeRules';
             $tooltipSpanId = 'user-badge-tooltip-' . $badge->type;
             $value = $badgeRulesClassName::getItemCountByGrade((int) $badge->grade);
             //$content .= '<span id="' . $tooltipSpanId . '" class="tooltip"  title="' . $badgeRulesClassName::getPassiveDisplayLabel($value) . '">';
             $content .= '<div class="badge ' . $badge->type . '"><div class="gloss"></div>' . '<strong class="badge-icon" title="' . $badgeRulesClassName::getPassiveDisplayLabel($value) . '"></strong><span class="badge-grade">' . $badge->grade . '</span></div>';
             //$content .= '</span>';
             $zTip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
             //$zTip->addQTip("#" . $tooltipSpanId);
         }
         $zTip->addQTip(".badge-icon");
     } else {
         $content .= '<span class="empty">' . Zurmo::t('GamificationModule', 'No achievements earned.') . '</span>';
     }
     return $content;
 }
 protected static function renderTooltipContent()
 {
     $title = Zurmo::t('UsersModule', 'Your Gravatar is an image that follows you from site to site appearing beside your ' . 'name when you do things like comment or post on a blog.');
     $content = '<span id="user-gravatar-tooltip" class="tooltip"  title="' . $title . '">?</span>';
     $qtip = new ZurmoTip(array('options' => array('position' => array('my' => 'bottom right', 'at' => 'top left'))));
     $qtip->addQTip("#user-gravatar-tooltip");
     return $content;
 }
 /**
  * Generate a tooltip to show the user the default value of a policy.
  * If no default value is set, the function returns null.
  * @return String The HTML code for the tooltip.
  */
 protected function resolveAndRenderPolicyDefaultStringContent()
 {
     $delimiter = FormModelUtil::DELIMITER;
     list($moduleName, $policyName) = explode($delimiter, $this->attribute);
     $policyDefault = $moduleName::getPolicyDefault($this->getFormattedAttributeLabel());
     if ($policyDefault != null) {
         $title = Zurmo::t('ZurmoModule', 'The default value is {policyDefault}', array('{policyDefault}' => $policyDefault));
         $content = '<span class="tooltip policy-default-tooltip" title="' . $title . '">?</span>';
         $qtip = new ZurmoTip();
         $qtip->addQTip(".policy-default-tooltip");
         return $content;
     }
 }
 /**
  * Renders email address stage based on last email activity
  * @param String $emailAddress
  * @param RedBeanModel $model
  * @return string $content
  */
 public static function renderEmailAddressState($emailAddress, RedBeanModel $model)
 {
     assert('is_string($emailAddress) || $emailAddress == null');
     if ($emailAddress == null) {
         return;
     }
     $records = ExternalApiEmailMessageActivity::resolveAndGetByEmailAddress($emailAddress, 'sendgrid');
     if (!empty($records)) {
         $record = $records[0];
         if ($record->type == EmailMessageActivity::TYPE_BOUNCE || $record->type == EmailMessageActivity::TYPE_HARD_BOUNCE || $record->type == EmailMessageActivity::TYPE_SOFT_BOUNCE) {
             $tooltipTitle = $record->reason;
             $tooltip = '<span id="last-email-activity-status-tooltip" class="tooltip" title="' . $tooltipTitle . '">?</span>';
             $content = '<i>&#9679;</i><span>' . Zurmo::t('MarketingModule', 'Bounced') . '</span>' . $tooltip;
             $content = ZurmoHtml::tag('div', array('class' => 'email-recipient-stage-status stage-false'), $content);
             $content = ZurmoHtml::tag('div', array('class' => 'clearfix'), $content);
             $content = ZurmoHtml::tag('div', array('class' => 'continuum', 'id' => 'bouncedcontact'), $content);
         }
         if ($record->type == EmailMessageActivity::TYPE_SPAM) {
             $tooltipTitle = $record->reason;
             $tooltip = '<span id="last-email-activity-status-tooltip" class="tooltip" title="' . $tooltipTitle . '">?</span>';
             $content = '<i>&#9679;</i><span>' . Zurmo::t('MarketingModule', 'Spam') . '</span>' . $tooltip;
             $content = ZurmoHtml::tag('div', array('class' => 'email-recipient-stage-status queued'), $content);
             $content = ZurmoHtml::tag('div', array('class' => 'clearfix'), $content);
             $content = ZurmoHtml::tag('div', array('class' => 'continuum', 'id' => 'spammedcontact'), $content);
         }
         $qtip = new ZurmoTip();
         $qtip->addQTip("#last-email-activity-status-tooltip");
         $content = ZurmoHtml::tag('div', array('class' => 'last-email-activity-status'), $content);
         return $content;
     }
     return null;
 }
 /**
  * Generate the element tooltip help content
  * @return A string containing the element's tooltip
  */
 protected function generateElementTooltipHelpContent($id)
 {
     $title = Zurmo::t('Core', 'Original values will be overwritten.');
     $content = '<span id="' . $id . '" class="tooltip" title="' . $title . '">?</span>';
     // Not Coding Standard
     $qtip = new ZurmoTip();
     $qtip->addQTip("#{$id}");
     return $content;
 }
 /**
  * @param RedBeanModel $model
  * @param string $attribute
  * @return null|string
  */
 protected function resolveTooltipHelpContentByElementType($model, $attribute)
 {
     static $idIncrement = 0;
     // Currently this function only works for simple attributes of type Tag Cloud
     if (strpos($attribute, '__') !== false || strpos($attribute, '___') !== false) {
         return null;
     }
     $modelClassName = get_class($model);
     $modelMetadata = $modelClassName::getMetadata();
     $id = $attribute . '_tooltip_' . $idIncrement++;
     $allowedActionTypes = array(ActionForWorkflowForm::TYPE_UPDATE_SELF, ActionForWorkflowForm::TYPE_UPDATE_RELATED);
     try {
         if (is_object($model->{$attribute}) && get_class($model->{$attribute}) == 'OwnedMultipleValuesCustomField' && isset($modelMetadata[$modelClassName]['elements'][$attribute]) && $modelMetadata[$modelClassName]['elements'][$attribute] == 'TagCloud' && in_array($this->type, $allowedActionTypes)) {
             $title = Zurmo::t('Core', 'Original values will be overwritten.');
             $content = '<span id="' . $id . '" class="tooltip" title="' . $title . '">?</span>';
             // Not Coding Standard
             $qtip = new ZurmoTip();
             $qtip->addQTip("#{$id}");
             return $content;
         } else {
             return null;
         }
     } catch (NotSupportedException $e) {
         return null;
     }
 }
 protected function resolveThemeColorNamesAndLabelsForLocking(GameLevel $gameLevel)
 {
     $namesAndUnlockedAtLevels = Yii::app()->themeManager->getThemeColorNamesAndUnlockedAtLevel();
     $data = array();
     foreach (Yii::app()->themeManager->getThemeColorNamesAndLabels() as $name => $label) {
         $colorArray = Yii::app()->themeManager->themeColorNamesAndColors[$name];
         $spans = '<span class="theme-color-1" style="background-color:' . $colorArray[1] . '"></span>';
         $spans .= '<span class="theme-color-2" style="background-color:' . $colorArray[2] . '"></span>';
         $spans .= '<span class="theme-color-3" style="background-color:' . $colorArray[4] . '"></span>';
         $label = $spans . $label;
         $unlockedAtLevel = $namesAndUnlockedAtLevels[$name];
         if ($unlockedAtLevel > (int) $gameLevel->value && $this->shouldDisableLocked) {
             $title = Zurmo::t('GamificationModule', 'Unlocked at level {level}', array('{level}' => $unlockedAtLevel));
             $content = '<span id="theme-color-tooltip-' . $name . '" title="' . $title . '"><i class="icon-lock"></i></span>' . $label;
             // Not Coding Standard
             $qtip = new ZurmoTip();
             $qtip->addQTip("#theme-color-tooltip-" . $name);
         } else {
             $content = $label;
         }
         if ($unlockedAtLevel <= 1 || $this->showLocked) {
             $data[$name] = $content;
         }
     }
     return $data;
 }
 protected function renderSuggestedFrequencyContent()
 {
     $content = '<h3>' . Zurmo::t('JobsManagerModule', 'How often should I run each Job?') . '</h3>';
     $content .= '<table id="jobs-frequency">';
     $content .= '<colgroup>';
     $content .= '<col style="width:40%" /><col style="width:60%" />';
     $content .= '</colgroup>';
     $content .= '<tbody>';
     $content .= '<tr><th>' . Zurmo::t('JobsManagerModule', 'Job Name') . '</th>';
     $content .= '<th>' . Zurmo::t('JobsManagerModule', 'Recommended Frequency') . '</th>';
     $content .= '</tr>';
     $content .= '<tr>';
     $content .= '<td>' . ZurmoHtml::encode($this->monitorJobData['label']) . '</td>';
     $content .= '<td>' . ZurmoHtml::encode($this->monitorJobData['recommendedFrequencyContent']) . '</td>';
     $content .= '</tr>';
     foreach ($this->jobsData as $type => $jobData) {
         $title = Zurmo::t('JobsManagerModule', 'Cron or scheduled job name: {type}', array('{type}' => $type));
         $content .= '<tr>';
         $content .= '<td>';
         $content .= '<span class="job-label">' . ZurmoHtml::encode($jobData['label']) . '</span>';
         $content .= '<span id="suggested-frequency-job-tooltip-' . $type . '" class="tooltip" title="' . $title . '">?</span>';
         $content .= '</td>';
         $content .= '<td>' . ZurmoHtml::encode($jobData['recommendedFrequencyContent']) . '</td>';
         $content .= '</tr>';
         $qtip = new ZurmoTip();
         $qtip->addQTip("#suggested-frequency-job-tooltip-{$type}");
     }
     $content .= '</tbody>';
     $content .= '</table>';
     return $content;
 }