Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplified nav/styling

  • Loading branch information...
commit 6e0e77722754a67262d77fe110708e069ab5984c 1 parent d24bfa8
Oliver Searle-Barnes authored
View
20 app/views/databases/index.html.erb
@@ -1,25 +1,13 @@
<% title "Databases" %>
<table>
- <tr>
- <th>Name</th>
- <th>Username</th>
- <th>Password</th>
- <th>Hostname</th>
- <th>Schema</th>
- </tr>
<% for database in @databases %>
<tr>
- <td><%=h database.name %></td>
- <td><%=h database.username %></td>
- <td><%=h database.password %></td>
- <td><%=h database.hostname %></td>
- <td><%=h database.schema %></td>
- <td><%= link_to "Show", database %></td>
- <td><%= link_to "Edit", edit_database_path(database) %></td>
- <td><%= link_to "Destroy", database, :confirm => 'Are you sure?', :method => :delete %></td>
+ <td><%= link_to database.name, database %></td>
+ <td><%= link_to "edit", edit_database_path(database) %></td>
+ <td><%= link_to "remove", database, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
-<p><%= link_to "New Database", new_database_path %></p>
+<p><%= link_to "New", new_database_path %></p>
View
13 app/views/databases/show.html.erb
@@ -1,14 +1,5 @@
-<% title @database.name %>
-<p>
- <strong>Hostname:</strong>
- <%=h @database.hostname %>
-</p>
-<p>
- <strong>Schema:</strong>
- <%=h @database.schema %>
-</p>
-
-<h2>Reports</h2>
+<% title @database.name, false %>
+<h1 class="with_details"><%= @database.name %></h1>(<%=h @database.hostname %>/<%=h @database.schema %>)
<table>
<% for report in @database.reports %>
View
5 app/views/layouts/application.html.erb
@@ -9,7 +9,10 @@
<body>
<div id="container">
<ul class="nav">
- <li><%= link_to 'Databases', databases_path %></li>
+ <li class="first"><%= link_to 'Databases', databases_path %></li>
+ <% if @database %>
+ <li><%= link_to @database.name, @database %></li>
+ <% end %>
</ul>
<%- flash.each do |name, msg| -%>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
View
2  app/views/reports/_form.html.erb
@@ -6,7 +6,7 @@
</p>
<p>
<%= f.label :query %><br />
- <%= f.text_field :query %>
+ <%= f.text_area :query %>
</p>
<p>
<%= f.submit "Save" %>
View
10 app/views/reports/show.html.erb
@@ -1,16 +1,10 @@
-<% title @report.name %>
-
+<% title @report.name, false %>
+<h1 class="with_details"><%= @report.name %></h1><%= link_to "Edit", edit_report_path(@report) %>
<p>
<strong>Query:</strong>
<%=h @report.query %>
</p>
-<p>
- <%= link_to "Edit", edit_report_path(@report) %> |
- <%= link_to "Remove", @report, :confirm => 'Are you sure?', :method => :delete %> |
- <%= link_to "#{@report.database.name} reports", database_path(@report.database) %>
-</p>
-
<table>
<thead>
<% @column_names.each do |column_name| %>
View
20 public/stylesheets/application.css
@@ -84,7 +84,25 @@ a {
list-style:none;
padding:0;
margin:0;
- float:right;
+ width:100%;
+ border-bottom:1px solid black;
+}
+
+.nav li {
+ display:inline;
+}
+
+.nav li:before {
+ content:' > '
+}
+
+.nav li.first:before {
+ content:'';
+}
+
+h1.with_details {
+ display:inline-block;
+ padding:0px 10px 0px 0px;
}
a {
Please sign in to comment.
Something went wrong with that request. Please try again.