/** * Creates and returns the HTML representatation of the change set. * * @since 0.1 * * @param SWLChangeSet $changeSet * * @return string */ protected static function getChangeListHTML(SWLChangeSet $changeSet) { $propertyHTML = array(); foreach ($changeSet->getAllProperties() as $property) { $propertyHTML[] = self::getPropertyHTML($property, $changeSet->getAllPropertyChanges($property)); } return implode('', $propertyHTML); }
/** * Creates and returns the HTML representatation of the change set. * * @since 0.1 * * @param SWLChangeSet $changeSet * @param SWLGroup $group * * @return string */ protected static function getChangeListHTML(SWLChangeSet $changeSet, SWLGroup $group) { $propertyHTML = array(); $customTexts = new SWLCustomTexts($group); foreach ($changeSet->getAllProperties() as $property) { $propertyHTML[] = self::getPropertyHTML($property, $changeSet->getAllPropertyChanges($property), $customTexts); } return implode('', $propertyHTML); }
/** * Gets the HTML for a single change set (edit). * * @since 0.1 * * @param SWLChangeSet $changeSet * * @return string */ protected function getChangeSetHTML( SWLChangeSet $changeSet ) { global $wgLang; $edit = $changeSet->getEdit(); $html = ''; $html .= '<li>'; $html .= '<p>' . $wgLang->time( $edit->getTime(), true ) . ' ' . Html::element( 'a', array( 'href' => $edit->getTitle()->getLocalURL() ), $edit->getTitle()->getText() ) . ' (' . Html::element( 'a', array( 'href' => $edit->getTitle()->getLocalURL( 'action=history' ) ), wfMsg( 'hist' ) ) . ') . . ' . Html::element( 'a', array( 'href' => $edit->getUser()->getUserPage()->getLocalURL() ), $edit->getUser()->getName() ) . ' (' . Html::element( 'a', array( 'href' => $edit->getUser()->getTalkPage()->getLocalURL() ), wfMsg( 'talkpagelinktext' ) ) . ' | ' . ( $edit->getUser()->isAnon() ? '' : Html::element( 'a', array( 'href' => SpecialPage::getTitleFor( 'Contributions', $edit->getUser()->getName() )->getLocalURL() ), wfMsg( 'contribslink' ) ) . ' | ' ) . Html::element( 'a', array( 'href' => SpecialPage::getTitleFor( 'Block', $edit->getUser()->getName() )->getLocalURL() ), wfMsg( 'blocklink' ) ) . ')' . ( $edit->getTime() > $this->lastViewed ? ' [NEW]' : '' ) . '</p>' ; $propertyHTML= array(); foreach ( $changeSet->getAllProperties() as /* SMWDIProperty */ $property ) { $propertyHTML[] = $this->getPropertyHTML( $property, $changeSet->getAllPropertyChanges( $property ) ); } $html .= implode( '', $propertyHTML ); $html .= '</li>'; return $html; }