Permalink
Browse files

More structured interface

  • Loading branch information...
1 parent 1532bb7 commit 249814d9b30662a8c6c38678eee1bf74bcc57277 FlashySearch committed Dec 27, 2012
Showing with 35 additions and 11 deletions.
  1. +35 −11 views/describe_columnfamily.php
@@ -10,11 +10,36 @@
</li>
</ul>
-<a href="columnfamily_action.php?action=browse_data&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Browse Data</a>
+<table id="describe_columnfamily_navigation" class="table table-bordered table-striped">
+ <tr>
+ <td onclick="document.location.href='describe_columnfamily.php?keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>'"><a href="describe_columnfamily.php?keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>"><?php echo $columnfamily_name; ?></a></td>
<?php if (!$is_read_only_keyspace): ?>
- <a href="columnfamily_action.php?action=create_secondary_index&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Create Secondary Index</a>
+ <td onclick="document.location.href='describe_columnfamily.php?view=details&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>'"><a href="describe_columnfamily.php?view=details&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>">Details</a></td>
<?php endif; ?>
+ </tr>
+</table>
+
+<div class="well">
+
+<?php
+if ($_GET['view'] == 'details' and !$is_read_only_keyspace):
+?>
+
+ <a href="columnfamily_action.php?action=edit&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Edit Column Family</a>
+
+ <a href="#" onclick="return truncateColumnFamily('<?php echo $keyspace_name; ?>','<?php echo $columnfamily_name; ?>');" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Truncate Column Family</a>
+
+ <a href="#" onclick="return dropColumnFamily('<?php echo $keyspace_name; ?>','<?php echo $columnfamily_name; ?>');" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Drop Column Family</a>
+
+<h3>Column Family Details</h3>
+<?php echo $columnfamily_def; ?>
+
+<?php
+else:
+?>
+
+<a href="columnfamily_action.php?action=browse_data&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Browse Data</a>
<a href="columnfamily_action.php?action=get_key&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Get Key</a>
@@ -27,16 +52,9 @@
<?php endif; ?>
<?php if (!$is_read_only_keyspace): ?>
- <a href="columnfamily_action.php?action=edit&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Edit Column Family</a>
-
- <a href="#" onclick="return truncateColumnFamily('<?php echo $keyspace_name; ?>','<?php echo $columnfamily_name; ?>');" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Truncate Column Family</a>
-
- <a href="#" onclick="return dropColumnFamily('<?php echo $keyspace_name; ?>','<?php echo $columnfamily_name; ?>');" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Drop Column Family</a>
+ <a href="columnfamily_action.php?action=create_secondary_index&amp;keyspace_name=<?php echo $keyspace_name; ?>&amp;columnfamily_name=<?php echo $columnfamily_name; ?>" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Create Secondary Index</a>
<?php endif; ?>
-<h3>Column Family Details</h3>
-<?php echo $columnfamily_def; ?>
-
<?php if (count($secondary_indexes) > 0): ?>
<h3>Secondary Indexes</h3>
@@ -47,4 +65,10 @@
'columnfamily_name' => $columnfamily_name));
endforeach;
?>
-<?php endif; ?>
+<?php endif; ?>
+
+<?php
+endif;
+?>
+
+</div>

0 comments on commit 249814d

Please sign in to comment.