fügt eine navbar und eine Indexseite hinzu

This commit is contained in:
Florian Bogenhard
2014-08-08 22:56:13 +02:00
parent dae819f069
commit 9d574f5511
8 changed files with 67 additions and 14 deletions
+2
View File
@@ -0,0 +1,2 @@
class DocumentsController < ApplicationController
end
+2
View File
@@ -0,0 +1,2 @@
class Document < ActiveRecord::Base
end
+1
View File
@@ -0,0 +1 @@
| Hallo
-14
View File
@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Klaus</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
doctype html
html
head
title
| Klausurverwaltung
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body
nav.navbar.navbar-default role="navigation"
div.container-fluid
div.navbar-header
button.navbar-toggle type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
spansr-only Toggle navigation
spanicon-bar
spanicon-bar
spanicon-bar
= link_to 'Klaus', root_path, class: 'navbar-brand'
div.collapse.navbar-collapse#bs-example-navbar-collapse-1
div.row
div.col-md-12
= yield
+3
View File
@@ -1,4 +1,7 @@
Rails.application.routes.draw do
resources :documents
root 'documents#index'
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
@@ -0,0 +1,9 @@
class CreateDocuments < ActiveRecord::Migration
def change
create_table :documents do |t|
t.string :name
t.timestamps
end
end
end
+28
View File
@@ -0,0 +1,28 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140808200903) do
create_table "doc_types", force: true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "documents", force: true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
end
end