r21197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21196‎ | r21197 | r21198 >
Date:12:07, 12 April 2007
Author:vrandezo
Status:old
Tags:
Comment:
Better seperated lines
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -51,6 +51,8 @@
5252 $html .= '<input type="text" name="article" value="' . htmlspecialchars($articletext) . '" />' . "\n";
5353 $html .= '<input type="submit" value="' . wfMsg('smw_browse_go') . "\"/>\n</form>\n";
5454
 55+ $vsep = '<tr><td colspan="2"><div class="smwhr"><hr /></div></td></tr>';
 56+
5557 if ('' == $articletext) { // empty, no article name given
5658 $html .= wfMsg('smw_browse_docu') . "\n";
5759 } elseif ('in' == $mode) { // incoming links
@@ -82,7 +84,7 @@
8385 // no need to show the navigation bars when there is not enough to navigate
8486 if (($offset>0) || (count($results)>$limit))
8587 $html .= $navigation;
86 - $html .= '<table style="width: 100%; "><tr><td colspan="2"><hr /></td></tr>' . "\n";
 88+ $html .= '<table style="width: 100%; ">' . $vsep . "\n";
8789 foreach ($results as $result) {
8890 $innerlimit = 6;
8991 $subjectoptions = new SMWRequestOptions();
@@ -96,13 +98,13 @@
9799 $innercount += 1;
98100 if (($innercount < $innerlimit) || !$more) {
99101 $subjectlink = SMWInfolink::newBrowsingLink('+',$subject->getText(), FALSE);
100 - $html .= $skin->makeKnownLinkObj($subject) . '&nbsp;' . $subjectlink->getHTML($skin);
 102+ $html .= $skin->makeKnownLinkObj($subject) . '&nbsp;&nbsp;' . $subjectlink->getHTML($skin);
101103 if ($innercount<$subjectcount) $html .= ", \n";
102104 } else {
103105 $html .= '<a href="' . $skin->makeSpecialUrl('SearchByRelation', 'type=' . urlencode($result->getText()) . '&target=' . urlencode($article->getText())) . '">' . wfMsg("smw_browse_more") . "</a><br />\n";
104106 }
105107 }
106 - $html .= '</td><td class="smwrelright">' . $skin->makeLinkObj($result, $result->getText()) . " " . $article->getText() . '</td></tr><tr><td colspan="2"><hr /></td></tr>' . "\n";
 108+ $html .= '</td><td class="smwrelright">' . $skin->makeLinkObj($result, $result->getText()) . " " . $article->getText() . '</td></tr>' . $vsep . "\n";
107109 }
108110 $html .= "</table>\n";
109111 }
@@ -118,18 +120,22 @@
119121 $html .= wfMsg( 'smw_browse_noout', $skin->makeSpecialUrl('SMWBrowse', 'article=' . urlencode($articletext) . '&mode=in' ));
120122 } else {
121123 $html .= 'See all <a href="' . $skin->makeSpecialUrl('SMWBrowse', 'mode=in&article=' . urlencode($articletext)) . '">incoming links of ' . $article->getText() . "</a><br /><br />\n"; // TODO
122 - $html .= '<table style="width: 100%; ">' . "\n";
 124+ $html .= '<table style="width: 100%; ">'. $vsep . "\n";
123125 foreach ($results as $result) {
124126 $objectoptions = new SMWRequestOptions();
125127 $html .= '<tr><td class="smwattname">' . "\n";
126128 $html .= $skin->makeLinkObj($result, $result->getText()) . "\n";
127129 $html .= '</td><td class="smwatts">' . "\n";
128130 $objects = &smwfGetStore()->getRelationObjects($article, $result, $objectoptions);
 131+ $objectcount = count($objects);
 132+ $count = 0;
129133 foreach ($objects as $object) {
 134+ $count += 1;
130135 $searchlink = SMWInfolink::newBrowsingLink('+',$object->getText());
131 - $html .= $skin->makeLinkObj($object) . $searchlink->getHTML($skin) . "<br />\n";
 136+ $html .= $skin->makeLinkObj($object) . '&nbsp;&nbsp;' . $searchlink->getHTML($skin);
 137+ if ($count<$objectcount) $html .= ", ";
132138 }
133 - $html .= "</td></tr>\n";
 139+ $html .= '</td></tr>'.$vsep."\n";
134140 }
135141 $html .= "</table>\n";
136142 }
Index: trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css
@@ -104,6 +104,11 @@
105105 border-top: 1px dotted #AAAAAA;
106106 }
107107
 108+div.smwhr hr{
 109+ background-color: #DDDDDD;
 110+ color: #DDDDDD;
 111+}
 112+
108113 /* warning messages */
109114
110115 span.smwwarning{

Status & tagging log