This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
628 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ gem 'jquery-rails' | |
|
||
# To use debugger | ||
# gem 'debugger' | ||
gem 'simple_form' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ | |
// | ||
//= require jquery | ||
//= require jquery_ujs | ||
//= require twitter/bootstrap | ||
//= require_tree . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jQuery -> | ||
$("a[rel=popover]").popover() | ||
$(".tooltip").tooltip() | ||
$("a[rel=tooltip]").tooltip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@import "twitter/bootstrap/bootstrap"; | ||
body { padding-top: 60px; } | ||
|
||
@import "twitter/bootstrap/responsive"; | ||
|
||
// Set the correct sprite paths | ||
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); | ||
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); | ||
|
||
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) | ||
@fontAwesomeEotPath: asset-path('fontawesome-webfont.eot'); | ||
@fontAwesomeWoffPath: asset-path('fontawesome-webfont.woff'); | ||
@fontAwesomeTtfPath: asset-path('fontawesome-webfont.ttf'); | ||
@fontAwesomeSvgzPath: asset-path('fontawesome-webfont.svgz'); | ||
@fontAwesomeSvgPath: asset-path('fontawesome-webfont.svg'); | ||
|
||
// Font Awesome | ||
@import "fontawesome"; | ||
|
||
// Your custom LESS stylesheets goes here | ||
// | ||
// Since bootstrap was imported above you have access to its mixins which | ||
// you may use and inherit here | ||
// | ||
// If you'd like to override bootstrap's own variables, you can do so here as well | ||
// See http://twitter.github.com/bootstrap/less.html for their names and documentation | ||
// | ||
// Example: | ||
// @linkColor: #ff0000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
|
||
class PatientsController < ApplicationController | ||
# GET /patients | ||
# GET /patients.json | ||
def index | ||
@patients = Patient.all | ||
|
||
respond_to do |format| | ||
format.html # index.html.erb | ||
format.json { render json: @patients } | ||
end | ||
end | ||
|
||
# GET /patients/1 | ||
# GET /patients/1.json | ||
def show | ||
@patient = Patient.find(params[:id]) | ||
|
||
respond_to do |format| | ||
format.html # show.html.erb | ||
format.json { render json: @patient } | ||
end | ||
end | ||
|
||
# GET /patients/new | ||
# GET /patients/new.json | ||
def new | ||
@patient = Patient.new | ||
|
||
respond_to do |format| | ||
format.html # new.html.erb | ||
format.json { render json: @patient } | ||
end | ||
end | ||
|
||
# GET /patients/1/edit | ||
def edit | ||
@patient = Patient.find(params[:id]) | ||
end | ||
|
||
# POST /patients | ||
# POST /patients.json | ||
def create | ||
@patient = Patient.new(params[:patient]) | ||
|
||
respond_to do |format| | ||
if @patient.save | ||
format.html { redirect_to @patient, notice: 'Patient was successfully created.' } | ||
format.json { render json: @patient, status: :created, location: @patient } | ||
else | ||
format.html { render action: "new" } | ||
format.json { render json: @patient.errors, status: :unprocessable_entity } | ||
end | ||
end | ||
end | ||
|
||
# PUT /patients/1 | ||
# PUT /patients/1.json | ||
def update | ||
@patient = Patient.find(params[:id]) | ||
|
||
respond_to do |format| | ||
if @patient.update_attributes(params[:patient]) | ||
format.html { redirect_to @patient, notice: 'Patient was successfully updated.' } | ||
format.json { head :no_content } | ||
else | ||
format.html { render action: "edit" } | ||
format.json { render json: @patient.errors, status: :unprocessable_entity } | ||
end | ||
end | ||
end | ||
|
||
# DELETE /patients/1 | ||
# DELETE /patients/1.json | ||
def destroy | ||
@patient = Patient.find(params[:id]) | ||
@patient.destroy | ||
|
||
respond_to do |format| | ||
format.html { redirect_to patients_url } | ||
format.json { head :no_content } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module PatientsHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Patient < ActiveRecord::Base | ||
attr_accessible :birthdate, :city, :firstname, :gender, :insurance, :insurantnumber, :lastname, :mco, :plz, :street | ||
|
||
validates_presence_of :lastname, :firstname, :birthdate, :gender | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Praxis</title> | ||
<head> | ||
<title>Praxis Software</title> | ||
<!--[if lt IE 9]> | ||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> | ||
<![endif]--> | ||
<%= stylesheet_link_tag "application", :media => "all" %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
<div class="navbar navbar-fixed-top"> | ||
<div class="navbar-inner"> | ||
<div class="container"> | ||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</a> | ||
<a class="brand" href="#">BlueCare Praxis</a> | ||
<div class="nav-collapse"> | ||
<ul class="nav"> | ||
<li><%= link_to "Patientenliste", patients_path %></li> | ||
<li><%= link_to "Kalender" %></li> | ||
<li><%= link_to "Info" %></li> | ||
</ul> | ||
<form class="navbar-search pull-right"> | ||
<input type="text" class="search-query" placeholder="Search"> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container"> | ||
<% flash.each do |name, msg| %> | ||
<div class="alert alert-<%= name == :notice ? "success" : "error" %>"> | ||
<a class="close" data-dismiss="alert">x</a> | ||
<%= msg %> | ||
</div> | ||
<% end %> | ||
<div class="row"> | ||
<div class="span9"> | ||
<%= yield %> | ||
</div> | ||
<div class="span3"> | ||
<h2>Information</h2> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<%= yield %> | ||
|
||
</body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<%= simple_form_for @patient, :html => { :class => 'form-horizontal' } do |f| %> | ||
<fieldset> | ||
<legend><%= controller.action_name.capitalize %> Patient</legend> | ||
<%= f.input :lastname %> | ||
<%= f.input :firstname %> | ||
<%= f.input :gender %> | ||
<%= f.input :birthdate %> | ||
<%= f.input :street %> | ||
<%= f.input :city %> | ||
<%= f.input :plz %> | ||
<%= f.input :insurance %> | ||
<%= f.input :insurantnumber %> | ||
<%= f.input :mco %> | ||
|
||
<div class="form-actions"> | ||
<%= f.submit nil, :class => 'btn btn-primary' %> | ||
<%= link_to t('.cancel', :default => t("helpers.links.cancel")), | ||
patients_path, :class => 'btn' %> | ||
</div> | ||
</fieldset> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%- model_class = @patient.class -%> | ||
<div class="page-header"> | ||
<h1><%=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, | ||
:default => "Edit #{model_class.model_name.human}") %></h1> | ||
</div> | ||
<%= render :partial => 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<%- model_class = Patient.new.class -%> | ||
<div class="page-header"> | ||
<h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1> | ||
</div> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Vorname</th> | ||
<th>Geburtsdatum</th> | ||
<th>Hausarztmodell</th> | ||
<th><%=t '.actions', :default => t("helpers.actions") %></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @patients.each do |patient| %> | ||
<tr> | ||
<td><%= link_to patient.lastname, patient_path(patient) %></td> | ||
<td><%= patient.firstname %></td> | ||
<td><%= patient.birthdate %></td> | ||
<td>Nein/Ja/prüfen</td> | ||
<td> | ||
<%= link_to t('.edit', :default => t("helpers.links.edit")), | ||
edit_patient_path(patient), :class => 'btn btn-mini' %> | ||
<%= link_to t('.destroy', :default => t("helpers.links.destroy")), | ||
patient_path(patient), | ||
:method => :delete, | ||
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), | ||
:class => 'btn btn-mini btn-danger' %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
|
||
<%= link_to t('.new', :default => t("helpers.links.new")), | ||
new_patient_path, | ||
:class => 'btn btn-primary' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%- model_class = @patient.class -%> | ||
<div class="page-header"> | ||
<h1><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, | ||
:default => "New #{model_class.model_name.human}") %></h1> | ||
</div> | ||
<%= render :partial => 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<%- model_class = @patient.class -%> | ||
<div class="page-header"> | ||
<h1><%=t '.title', :default => model_class.model_name.human %></h1> | ||
</div> | ||
|
||
<dl class="dl-horizontal"> | ||
<dt><strong><%= model_class.human_attribute_name(:firstname) %>:</strong></dt> | ||
<dd><%= @patient.firstname %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:lastname) %>:</strong></dt> | ||
<dd><%= @patient.lastname %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:gender) %>:</strong></dt> | ||
<dd><%= @patient.gender %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:birthdate) %>:</strong></dt> | ||
<dd><%= @patient.birthdate %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:street) %>:</strong></dt> | ||
<dd><%= @patient.street %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:city) %>:</strong></dt> | ||
<dd><%= @patient.city %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:plz) %>:</strong></dt> | ||
<dd><%= @patient.plz %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:insurance) %>:</strong></dt> | ||
<dd><%= @patient.insurance %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:insurantnumber) %>:</strong></dt> | ||
<dd><%= @patient.insurantnumber %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:mco) %>:</strong></dt> | ||
<dd><%= @patient.mco %></dd> | ||
</dl> | ||
|
||
<div class="form-actions"> | ||
<%= link_to t('.back', :default => t("helpers.links.back")), | ||
patients_path, :class => 'btn' %> | ||
<%= link_to t('.edit', :default => t("helpers.links.edit")), | ||
edit_patient_path(@patient), :class => 'btn' %> | ||
<%= link_to t('.destroy', :default => t("helpers.links.destroy")), | ||
patient_path(@patient), | ||
:method => 'delete', | ||
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), | ||
:class => 'btn btn-danger' %> | ||
</div> |
Oops, something went wrong.