SF.net SVN: opencsw:[685] web/wordpresscsw/wp-content/themes/opencsw

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Mar 22 17:33:48 CET 2015


Revision: 685
          http://sourceforge.net/p/opencsw/code/685
Author:   wahwah
Date:     2015-03-22 16:33:47 +0000 (Sun, 22 Mar 2015)
Log Message:
-----------
Improve the package page template

Details:
http://lists.opencsw.org/pipermail/maintainers/2015-March/019784.html

1. On package pages (opencsw.org/package/<foo>), remove all the links from the green navigation bar, except for the Home link.
2. Remove the "Actions" heading
3. Move "Contact maintainer" into the table above, place it right under "View bugs about <foo>"
4. Move "View files in package" into the table above
5. Add a copy/pasteable code which installs the package.

Modified Paths:
--------------
    web/wordpresscsw/wp-content/themes/opencsw/header-package.php
    web/wordpresscsw/wp-content/themes/opencsw/package.php

Modified: web/wordpresscsw/wp-content/themes/opencsw/header-package.php
===================================================================
--- web/wordpresscsw/wp-content/themes/opencsw/header-package.php	2015-03-22 14:10:31 UTC (rev 684)
+++ web/wordpresscsw/wp-content/themes/opencsw/header-package.php	2015-03-22 16:33:47 UTC (rev 685)
@@ -48,7 +48,13 @@
         </div>
         <ul id="menu">
           <li class="page-item-home <?php if ( is_home() ) { ?> current_page_item <?php } ?>"><a href="<?php echo get_option('home'); ?>/"><?php _e('Home', 'default'); ?></a></li>
-          <?php greenpark_globalnav() ?>
+          <?php
+          // We don't want the Download and other links in the navbar
+          // on the package page, because it's confusing for people.
+          // It looks as if the Download link is to download a specific
+          // package. More context:
+          // http://lists.opencsw.org/pipermail/maintainers/2015-February/019637.html
+          if (0) {  greenpark_globalnav(); } ?>
         </ul>
     <div id="submenu-bg">    
       <?php

Modified: web/wordpresscsw/wp-content/themes/opencsw/package.php
===================================================================
--- web/wordpresscsw/wp-content/themes/opencsw/package.php	2015-03-22 14:10:31 UTC (rev 684)
+++ web/wordpresscsw/wp-content/themes/opencsw/package.php	2015-03-22 16:33:47 UTC (rev 685)
@@ -12,6 +12,8 @@
     $pkgDAO->connect();
 
     // Retrieve the information from the database
+
+    // Gotcha! $pkgName != $packageName.
     $pkgName              = $wp_query->get('packageName');
     $pkgInfo              = $pkgDAO->getPackageInformation($pkgName);
     $maintInfo            = $pkgDAO->getMaintainerInformation($pkgName);
@@ -19,6 +21,7 @@
     $maintainerName       = $maintInfo[1];
     $maintainerStatus     = $maintInfo[2];
     $softwareName         = $pkgInfo[0];
+    // Gotcha! $pkgName != $packageName.
     $packageName          = $pkgInfo[1];
     $packageDescription   = $pkgInfo[2];
     $packageVersion       = $pkgInfo[3];
@@ -64,16 +67,29 @@
         print "<div id=\"content\">";
         print "<div class=\"post hentry\">";
 
-        print "<h3>Details for $softwareName</h3>";
+        // print "<h3>Details</h3>";
         print "<div class=\"entry\">";
-        print "<p>Information about Solaris package $pkgName.</p>";
+        // <maciej> Using print looks inefficient. I can read neither
+        // the PHP code, nor the HTML. I'll revert to HTML with php markup here.
+        ?>
+
+	<p>Install <?php print $softwareName ?> on Solaris 10 and 11:</p>
+        <pre>pkgadd -d http://get.opencsw.org/now
+/opt/csw/bin/pkgutil -U
+/opt/csw/bin/pkgutil -y -i <?php print $softwareName; ?> 
+/usr/sbin/pkgchk -L <?php print $packageName ?> # list files
+</pre>
+        <p>See also: <a href="http://www.opencsw.org/manual/for-administrators/getting-started.html">Getting started with OpenCSW</a></p>
+
+        <?php
+        print "<h3>Package details</h3>";
         print "<table border=\"0\">";
         print "<tbody class=\"package-list\">";
         print     "<tr>\n";
-        print         "<th>Software Name</th><td>" . $softwareName . "</td>\n" ;
+        print         "<th>Catalogname</th><td>" . $softwareName . "</td>\n" ;
         print     "</tr>\n" ;
         print     "<tr>\n" ;
-        print         "<th>Package Name</th><td>" . $packageName . "</td>\n" ;
+        print         "<th>SVR4 package name</th><td>" . $packageName . "</td>\n" ;
         print     "</tr>\n" ;
         print     "<tr>\n" ;
         print         "<th>Description</th><td>" . $packageDescription . "</td>\n" ;
@@ -119,6 +135,15 @@
         }
         print         "</td>\n" ;
         print     "</tr>\n" ;
+
+        print     "<tr>\n";
+        print         "<td>\n";
+        print         "</td>\n";
+        print         "<td>\n";
+        print           "<a href=\"/composeEmail?maintainerName=$maintainerContact&emailSubject=OpenCSW question about package $pkgName&maintainerFullName=$maintainerName&softwareName=$softwareName\">Contact maintainer</a>";
+        print         "</td>\n";
+        print     "</tr>\n";
+
         print     "<tr>\n" ;
         print         "<th>Bugtracker</th><td>\n" ;
         print             "<a href='/mantis/set_project.php?project_id=" . $idMantis;
@@ -135,20 +160,17 @@
         print     "</tr>\n";
         print     "-->\n" ;
 
+        print     "<tr>\n";
+        print         "<td>\n";
+        print         "</td>\n";
+        print         "<td>\n";
+        print           "<a href=\"/search/$softwareName\">View files in package</a>";
+        print         "</td>\n";
+        print     "</tr>\n";
+
         print "</tbody>";
         print "</table>";
 
-        print "<h3>Actions</h3>";
-        print "<p>Actions availables on package $pkgName.</p>";
-        print "<ul>";
-        print     "<li>";
-        print         "<a href=\"/composeEmail?maintainerName=$maintainerContact&emailSubject=OpenCSW question about package $pkgName&maintainerFullName=$maintainerName&softwareName=$softwareName\">Contact maintainer</a>";
-        print     "</li>";
-        print     "<li>";
-        print         "<a href=\"/search/$softwareName\">View files in package</a>";
-        print     "</li>";
-        print "</ul>";
-
         print "<h3>Dependencies ( " . count($arrayPkg) . " )</h3>";
         print "<p>Oracle / Sun Solaris SUNW packages not shown.</p>";
         print "<table border=\"0\">";

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list