Author: jablko
Date: 2008-09-11 13:04:37 -0700 (Thu, 11 Sep 2008)
New Revision: 8
Modified:
trunk/apps/dreambit/modules/default/actions/listAction.class.php
trunk/apps/dreambit/modules/default/templates/listSuccess.php
Log:
Get deployment names from Subversion PROPFIND response, instead of place
holders.
Modified: trunk/apps/dreambit/modules/default/actions/listAction.class.php
===================================================================
--- trunk/apps/dreambit/modules/default/actions/listAction.class.php
2008-09-09 23:58:07 UTC (rev 7)
+++ trunk/apps/dreambit/modules/default/actions/listAction.class.php
2008-09-11 20:04:37 UTC (rev 8)
@@ -26,6 +26,10 @@
$browser = new sfWebBrowser;
$browser->call('http://amos.artefactual.com/svn/vendor/arbor.qubitron.net/',
'PROPFIND', null, $headers);
+
$this->doc = $browser->getResponseDom();
+
+ $this->xpath = new DOMXPath($this->doc);
+ $this->xpath->registerNamespace('D', 'DAV:');
}
}
Modified: trunk/apps/dreambit/modules/default/templates/listSuccess.php
===================================================================
--- trunk/apps/dreambit/modules/default/templates/listSuccess.php
2008-09-09 23:58:07 UTC (rev 7)
+++ trunk/apps/dreambit/modules/default/templates/listSuccess.php
2008-09-11 20:04:37 UTC (rev 8)
@@ -1,20 +1,23 @@
<br><br>
<table>
<thead>
- <tr>
- <th scope="col">Qubit Instance</th>
- <th scope="col">SVN Status</th>
- <th scope="col">select</th>
- </tr>
+ <tr>
+ <th scope="col">Qubit Instance</th>
+ <th scope="col">SVN Status</th>
+ <th scope="col">select</th>
+ </tr>
</thead>
<tbody>
- <?php foreach (array('bcal', 'archives', 'foo', 'bar') as $href): ?>
- <tr onMouseOver="this.className='odd'"
onMouseOut="this.className='normal'">
- <td scope="row"><?php echo $href ?></td>
- <td>Rev 23</td>
- <td><input type="checkbox" class="form-checkbox"/></td>
- </tr>
+ <!-- FIXME: Fix output escaping issues -->
+ <?php foreach ($sf_data->getRaw('xpath')->query('D:response/D:href',
$sf_data->getRaw('doc')->documentElement) as $href): ?>
+ <?php $components = preg_split('/\//', $href->textContent, null,
PREG_SPLIT_NO_EMPTY) ?>
+ <?php if (count($components) > 3): ?>
+ <tr onMouseOver="this.className='odd'"
onMouseOut="this.className='normal'">
+ <td scope="row"><?php echo $components[3] ?></td>
+ <td>Rev 23</td>
+ <td><input type="checkbox" class="form-checkbox"/></td>
+ </tr>
+ <?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
-
_______________________________________________
commits mailing list
[EMAIL PROTECTED]
http://mail.qubit-toolkit.org/mailman/listinfo/commits_qubit-toolkit.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---