Skip to content

Commit

Permalink
Merge branch 'feature/layout'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbulat committed Jul 28, 2015
2 parents 940b34a + 21d1d08 commit fd4aa3f
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 21 deletions.
10 changes: 4 additions & 6 deletions app/assets/javascripts/plutus/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
// compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
5 changes: 5 additions & 0 deletions app/assets/stylesheets/bootstrap-theme.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions app/assets/stylesheets/bootstrap.min.css

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions app/assets/stylesheets/plutus/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_self
*= require_tree .
*/
*= require bootstrap.min
*= require bootstrap-theme.min
*= require_self
*/
body { padding-top: 60px; }
2 changes: 1 addition & 1 deletion app/controllers/plutus/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Plutus
# controller will inherit.
#
# @author Michael Bulat
class AccountsController < ApplicationController
class AccountsController < Plutus::ApplicationController
unloadable

# @example
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/plutus/application_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Plutus
class ApplicationController < ActionController::Base
end
end
2 changes: 1 addition & 1 deletion app/controllers/plutus/entries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Plutus
# controller will inherit.
#
# @author Michael Bulat
class EntriesController < ApplicationController
class EntriesController < Plutus::ApplicationController
unloadable
# @example
# GET /entries
Expand Down
9 changes: 9 additions & 0 deletions app/views/layouts/plutus/_messages.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%# Rails flash messages styled for Bootstrap 3.0 %>
<% flash.each do |name, msg| %>
<% if msg.is_a?(String) %>
<div class="alert alert-<%= name.to_s == 'notice' ? 'success' : 'danger' %>">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
</div>
<% end %>
<% end %>
19 changes: 19 additions & 0 deletions app/views/layouts/plutus/_navigation.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%# navigation styled for Bootstrap 3.0 %>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">&nbsp;Plutus</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<%= render 'layouts/plutus/navigation_links' %>
</ul>
</div>
</div>
</nav>
2 changes: 2 additions & 0 deletions app/views/layouts/plutus/_navigation_links.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%# add navigation links to this file %>
<li><%= link_to "Dashboard", root_path%></li>
19 changes: 19 additions & 0 deletions app/views/layouts/plutus/application.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plutus</title>
<%= stylesheet_link_tag "plutus/application", media: "all" %>
<%= javascript_include_tag "plutus/application" %>
<%= csrf_meta_tags %>
</head>
<body>
<header>
<%= render 'layouts/plutus/navigation' %>
</header>
<main role="main">
<%= render 'layouts/plutus/messages' %>
<%= yield %>
</main>
</body>
</html>
4 changes: 2 additions & 2 deletions app/views/plutus/accounts/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="plutus_container">
<div class="container">
<h1>Listing Accounts</h1>

<table>
<table class="table table-striped table-hover">
<tr>
<th class="nobg">ID</th>
<th>Name</th>
Expand Down
4 changes: 2 additions & 2 deletions app/views/plutus/accounts/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="plutus_container">
<div class="container">
<h1><%=h @account.name %> Account</h1>

<table>
<table class="table table-striped table-hover">
<tr>
<th class="nobg">ID</th>
<th>Name</th>
Expand Down
4 changes: 2 additions & 2 deletions app/views/plutus/entries/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="plutus_container">
<div class="container">
<h1>Entries</h1>

<table cellspacing="0">
<table class="table table-striped table-hover">
<thead>
<tr>
<th class="nobg">ID</th>
Expand Down
4 changes: 2 additions & 2 deletions app/views/plutus/entries/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="plutus_container">
<div class="container">
<h1><%=h @entry.description %> Entry</h1>

<table cellspacing="0">
<table class="table table-striped table-hover">
<thead>
<tr>
<th class="nobg">ID</th>
Expand Down

0 comments on commit fd4aa3f

Please sign in to comment.