/**
  * @inheritDoc IElementType::getEditorHtml()
  *
  * @param BaseElementModel $element
  *
  * @return string
  */
 public function getEditorHtml(BaseElementModel $element)
 {
     return sprintf('<div class="pane"><a class="btn submit" href="%s" target="_blank">%s</a></div>', $element->getCpEditUrl(), Craft::t('Edit form'));
 }
 /**
  * @inheritDoc IElementType::getTableAttributeHtml()
  *
  * @param BaseElementModel $element
  * @param string           $attribute
  *
  * @return string
  */
 public function getTableAttributeHtml(BaseElementModel $element, $attribute)
 {
     switch ($attribute) {
         case 'notes':
             $notes = craft()->db->createCommand()->select('COUNT(*)')->from('amforms_notes')->where('submissionId=:submissionId', array(':submissionId' => $element->id))->queryScalar();
             return sprintf('<a href="%s">%d</a>', $element->getCpEditUrl() . '/notes', $notes);
             break;
         default:
             return parent::getTableAttributeHtml($element, $attribute);
             break;
     }
 }