Merge branch 'master' of https://github.com/Inachos/fetsite into testgallery

Conflicts:
	app/views/layouts/application.html.erb
This commit is contained in:
Andreas Stephanides
2015-01-15 15:40:36 +01:00
56 changed files with 1154 additions and 125 deletions

View File

@@ -23,11 +23,10 @@
//= require bootstrap
//= require bootstrap/colorpicker
//= require bootstrap/datepicker
//= require bootstrap/load-image.min
//= require bootstrap/image-gallery.min
//= require jquery-fileupload
// require jquery.remotipart
//= require jquery.datetimepicker
//= require blueimp-gallery-all
function insertAttachment(url,name) {
var ext = url.split('.').pop().toLowerCase();

View File

@@ -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/

View File

@@ -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/

View File

@@ -1,22 +1,21 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* 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.
*
* 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.
*
*= require_self
* require_tree .
*= require 'calendars'
*= require jquery.fileupload-ui
* require 'bootstrap'
*= require 'tinymce'
*/
* This is a manifest file that'll be compiled into application.css, which will include all the files
* 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.
*
* 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.
*= require_self
* require_tree .
*= require 'calendars'
*= require jquery.fileupload-ui
* require 'bootstrap'
*= require 'tinymce'
*/
// Colorshema #0A64A4
$color_prim: #0A64A4;
$color_prim_light: #0B65A5;
@@ -45,34 +44,34 @@ $sansFontFamily: Helvetica, Arial;
@import 'font-awesome';
h1 {
font-size: 23px
font-size: 23px
}
h2 {
font-size: 19px
font-size: 19px
}
body,html {
padding:0;
margin:0;
padding:0;
margin:0;
}
a:hover {
text-decoration:none;
text-decoration:none;
}
div.header {
display: block;
// background: url('/header1.png') no-repeat;
background-color: #FFF;
background-position: right;
border-bottom:1px solid black;
height:41px;
color:#000;
padding-left:87px;
padding-top:0px;
overflow:hidden;
margin-bottom: 20px
display: block;
// background: url('/header1.png') no-repeat;
background-color: #FFF;
background-position: right;
border-bottom:1px solid black;
height:41px;
color:#000;
padding-left:87px;
padding-top:0px;
overflow:hidden;
margin-bottom: 20px
}
div.header h1 {
padding:0;
@@ -81,40 +80,40 @@ font-size:20px;
line-height:32px;
}
#menudiv {
width:100%;
width:100%;
}
.navbar .nav li {
min-width:100%;
min-width:100%;
}
.navbar .nav .divider {
border-style: solid;
border-width: 1px 0px 0px 0px;
border-color: grey;
min-width: 100%;
border-style: solid;
border-width: 1px 0px 0px 0px;
border-color: grey;
min-width: 100%;
}
.navbar .navbar-inner
{
border:none;
box-shadow:none;
border:none;
box-shadow:none;
}
#contentdiv
{
background: #FFFFFF
background: #FFFFFF
}
#contentdiv .container-fluid
{
padding:0;
padding:0;
}
a.linkbox, div.contentbox
{
display:block;
padding:5px;
border-radius: 10px;
border: lightgray solid 1px;
display:block;
padding:5px;
border-radius: 10px;
border: lightgray solid 1px;
}
@@ -132,16 +131,18 @@ margin-bottom:10px;
}
ul.linkbox-list
{
max-width:70em;
max-width:70em;
}
div.contentbox
{
margin: 5px;
margin: 5px;
}
.navbar .nav li {
min-width:100%;
background:44F;
}
}
@import 'galleries';

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the Fetmeetings controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the Fetmeetingtops controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -2,39 +2,6 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
//.modal.fade {
// top: -25%;
// transition: opacity 0.3s linear 0s, top 0.3s ease-out 0s;
//}
//.modal-gallery {
// max-height: none;
// outline: medium none;
// width: auto;
//}
//.modal {
// color: #333333;
//}
//.hide {
// display: none;
//}
//.modal {
//background-clip: padding-box;
// background-color: #FFFFFF;
// border: 1px solid rgba(0, 0, 0, 0.3);
//border-radius: 6px 6px 6px 6px;
// box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
// left: 50%;
// margin-left: -280px;
// outline: medium none;
// position: fixed;
// top: 10%;;
// z-index: 1050;
//}
//.fade {
// opacity: 0;
// transition: opacity 0.15s linear 0s;
//}
div.gallery-block
{
padding: 10px;

View File

@@ -1,3 +1,6 @@
@import 'blueimp-gallery-all';
h1 {
font-size: 23px
}

View File

@@ -15,7 +15,6 @@
*= require jquery.datetimepicker
*= require jquery.ui.dialog
* require 'bootstrap'
* require 'neuigkeiten'
*/

View File

@@ -0,0 +1,84 @@
class FetmeetingsController < ApplicationController
# GET /fetmeetings
# GET /fetmeetings.json
def index
@fetmeetings = Fetmeeting.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @fetmeetings }
end
end
# GET /fetmeetings/1
# GET /fetmeetings/1.json
def show
@fetmeeting = Fetmeeting.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @fetmeeting }
end
end
# GET /fetmeetings/new
# GET /fetmeetings/new.json
def new
@fetmeeting = Fetmeeting.new
@fetmeeting.calentry=Calentry.new(typ: 0, object: @fetmeetings)
respond_to do |format|
format.html # new.html.erb
format.json { render json: @fetmeeting }
end
end
# GET /fetmeetings/1/edit
def edit
@fetmeeting = Fetmeeting.find(params[:id])
end
# POST /fetmeetings
# POST /fetmeetings.json
def create
@fetmeeting = Fetmeeting.new(params[:fetmeeting])
respond_to do |format|
if @fetmeeting.save
format.html { redirect_to @fetmeeting, notice: 'Fetmeeting was successfully created.' }
format.json { render json: @fetmeeting, status: :created, location: @fetmeeting }
else
format.html { render action: "new" }
format.json { render json: @fetmeeting.errors, status: :unprocessable_entity }
end
end
end
# PUT /fetmeetings/1
# PUT /fetmeetings/1.json
def update
@fetmeeting = Fetmeeting.find(params[:id])
respond_to do |format|
if @fetmeeting.update_attributes(params[:fetmeeting])
format.html { redirect_to @fetmeeting, notice: 'Fetmeeting was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @fetmeeting.errors, status: :unprocessable_entity }
end
end
end
# DELETE /fetmeetings/1
# DELETE /fetmeetings/1.json
def destroy
@fetmeeting = Fetmeeting.find(params[:id])
@fetmeeting.destroy
respond_to do |format|
format.html { redirect_to fetmeetings_url }
format.json { head :no_content }
end
end
end

View File

@@ -0,0 +1,83 @@
class FetmeetingtopsController < ApplicationController
# GET /fetmeetingtops
# GET /fetmeetingtops.json
def index
@fetmeetingtops = Fetmeetingtop.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @fetmeetingtops }
end
end
# GET /fetmeetingtops/1
# GET /fetmeetingtops/1.json
def show
@fetmeetingtop = Fetmeetingtop.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @fetmeetingtop }
end
end
# GET /fetmeetingtops/new
# GET /fetmeetingtops/new.json
def new
@fetmeetingtop = Fetmeetingtop.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @fetmeetingtop }
end
end
# GET /fetmeetingtops/1/edit
def edit
@fetmeetingtop = Fetmeetingtop.find(params[:id])
end
# POST /fetmeetingtops
# POST /fetmeetingtops.json
def create
@fetmeetingtop = Fetmeetingtop.new(params[:fetmeetingtop])
respond_to do |format|
if @fetmeetingtop.save
format.html { redirect_to @fetmeetingtop, notice: 'Fetmeetingtop was successfully created.' }
format.json { render json: @fetmeetingtop, status: :created, location: @fetmeetingtop }
else
format.html { render action: "new" }
format.json { render json: @fetmeetingtop.errors, status: :unprocessable_entity }
end
end
end
# PUT /fetmeetingtops/1
# PUT /fetmeetingtops/1.json
def update
@fetmeetingtop = Fetmeetingtop.find(params[:id])
respond_to do |format|
if @fetmeetingtop.update_attributes(params[:fetmeetingtop])
format.html { redirect_to @fetmeetingtop, notice: 'Fetmeetingtop was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @fetmeetingtop.errors, status: :unprocessable_entity }
end
end
end
# DELETE /fetmeetingtops/1
# DELETE /fetmeetingtops/1.json
def destroy
@fetmeetingtop = Fetmeetingtop.find(params[:id])
@fetmeetingtop.destroy
respond_to do |format|
format.html { redirect_to fetmeetingtops_url }
format.json { head :no_content }
end
end
end

View File

@@ -2,8 +2,12 @@ class HomeController < ApplicationController
def index
@beispiele = Beispiel.last([Beispiel.count, 3].min)
@neuigkeiten = Neuigkeit.recent
if Thema.count>0
t=YAML.load_file("#{::Rails.root.to_s}/config/start_topic.yml")
@starttopic= @themen = Thema.where(:id=>t).first
else
@starttopic=@themen = nil
end
end
def dev

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
class NeuigkeitenController < ApplicationController
class NeuigkeitenController < ApplicationController
before_filter :load_toolbar_elements, :only=>[:show,:find_link]
before_filter :load_toolbar_elements_edit, :only=>[:edit]

View File

@@ -0,0 +1,2 @@
module FetmeetingsHelper
end

View File

@@ -0,0 +1,2 @@
module FetmeetingtopsHelper
end

11
app/models/fetmeeting.rb Normal file
View File

@@ -0,0 +1,11 @@
class Fetmeeting < ActiveRecord::Base
attr_accessible :tnlist, :typ, :calentry_attributes
has_many :fetmeetingtops
validates :typ, presence: true
validates :calentry, presence: true
has_one :calentry , as: :object
accepts_nested_attributes_for :calentry
def public
true
end
end

View File

@@ -0,0 +1,7 @@
class Fetmeetingtop < ActiveRecord::Base
attr_accessible :discussion, :ersteller, :fetmeeting_id, :text, :title
belongs_to :fetmeeting
validates :fetmeeting, presence: true
validates :title, presence: true , length:{minimum: 4}
validates :ersteller, presence: true
end

View File

@@ -0,0 +1,14 @@
<%= semantic_form_for @fetmeeting do |f| %>
<%= f.inputs do %>
<%= f.input :tnlist %>
<%= f.input :typ %>
<%= f.semantic_fields_for :calentry , @fetmeeting.calentry do |calentry| %>
<%= render 'calentries/nested_fields', :f => calentry %>
<% end %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing fetmeeting</h1>
<%= render 'form' %>
<%= link_to 'Show', @fetmeeting %> |
<%= link_to 'Back', fetmeetings_path %>

View File

@@ -0,0 +1,25 @@
<h1>Listing fetmeetings</h1>
<table>
<tr>
<th>Tnlist</th>
<th>Typ</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @fetmeetings.each do |fetmeeting| %>
<tr>
<td><%= fetmeeting.tnlist %></td>
<td><%= fetmeeting.typ %></td>
<td><%= link_to 'Show', fetmeeting %></td>
<td><%= link_to 'Edit', edit_fetmeeting_path(fetmeeting) %></td>
<td><%= link_to 'Destroy', fetmeeting, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Fetmeeting', new_fetmeeting_path %>

View File

@@ -0,0 +1,5 @@
<h1>New fetmeeting</h1>
<%= render 'form' %>
<%= link_to 'Back', fetmeetings_path %>

View File

@@ -0,0 +1,20 @@
<p id="notice"><%= notice %></p>
<p>
<b>Tnlist:</b>
<%= @fetmeeting.tnlist %>
</p>
<p>
<b>Typ:</b>
<%= @fetmeeting.typ %>
</p>
<p>
<ul>
<% @fetmeeting.fetmeetingtops.each do |top|%>
<li><%= render top %></li>
<% end %>
</ul>
</p>
<%= link_to 'Edit', edit_fetmeeting_path(@fetmeeting) %> |
<%= link_to 'Back', fetmeetings_path %>

View File

@@ -0,0 +1 @@
<%= fetmeetingtop.title %> (<i><%= fetmeetingtop.ersteller %></i>)

View File

@@ -0,0 +1,14 @@
<%= semantic_form_for @fetmeetingtop do |f| %>
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :text %>
<%= f.input :discussion , as: :tinymce_text %>
<%= f.input :ersteller %>
<%= f.input :fetmeeting_id %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>
<%= tinymce %>

View File

@@ -0,0 +1,6 @@
<h1>Editing fetmeetingtop</h1>
<%= render 'form' %>
<%= link_to 'Show', @fetmeetingtop %> |
<%= link_to 'Back', fetmeetingtops_path %>

View File

@@ -0,0 +1,31 @@
<h1>Listing fetmeetingtops</h1>
<table>
<tr>
<th>Title</th>
<th>Text</th>
<th>Discussion</th>
<th>Ersteller</th>
<th>Fetmeeting</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @fetmeetingtops.each do |fetmeetingtop| %>
<tr>
<td><%= fetmeetingtop.title %></td>
<td><%= fetmeetingtop.text %></td>
<td><%= fetmeetingtop.discussion %></td>
<td><%= fetmeetingtop.ersteller %></td>
<td><%= fetmeetingtop.fetmeeting_id %></td>
<td><%= link_to 'Show', fetmeetingtop %></td>
<td><%= link_to 'Edit', edit_fetmeetingtop_path(fetmeetingtop) %></td>
<td><%= link_to 'Destroy', fetmeetingtop, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Fetmeetingtop', new_fetmeetingtop_path %>

View File

@@ -0,0 +1,5 @@
<h1>New fetmeetingtop</h1>
<%= render 'form' %>
<%= link_to 'Back', fetmeetingtops_path %>

View File

@@ -0,0 +1,30 @@
<p id="notice"><%= notice %></p>
<p>
<b>Title:</b>
<%= @fetmeetingtop.title %>
</p>
<p>
<b>Text:</b>
<%= @fetmeetingtop.text %>
</p>
<p>
<b>Discussion:</b>
<%= @fetmeetingtop.discussion %>
</p>
<p>
<b>Ersteller:</b>
<%= @fetmeetingtop.ersteller %>
</p>
<p>
<b>Fetmeeting:</b>
<%= @fetmeetingtop.fetmeeting_id %>
</p>
<%= link_to 'Edit', edit_fetmeetingtop_path(@fetmeetingtop) %> |
<%= link_to 'Back', fetmeetingtops_path %>

View File

@@ -39,45 +39,51 @@
<div style="clear:both"></div>
<div class="fluid-row" style="margin:20px">
<!-- modal-gallery is the modal dialog used for the image gallery -->
<div id="modal-gallery" class="modal hide fade modal-gallery modal-fullscreen modal-loading" tabindex="-1">
<div class="modal-header">
<a class="close" data-dismiss="modal">&times;</a>
<h3 class="modal-title"></h3>
</div>
<div class="modal-body"><div class="modal-image"></div></div>
<div class="modal-footer">
<a class="btn btn-info modal-prev"><i class="icon-arrow-left icon-white"></i></a>
<a class="btn btn-primary modal-next"><i class="icon-arrow-right icon-white"></i></a>
<a class="btn btn-success modal-play modal-slideshow" data-slideshow="5000"><i class="icon-play icon-white"></i> <%=I18n.t('fotos.slideshow')%></a>
<a class="btn modal-download" target="_blank"><i class="icon-download"></i> Download</a>
</div>
</div>
<div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<h3 class="title"></h3>
<a class="prev"></a>
<a class="next"></a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">&times;</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="links">
<% @fotos.each_index do |i| %>
<% f= @fotos[i] %>
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery>
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid img-rounded"}) if @showind.include? i %></a>
<% end %>
</div>
</div>
<%= render 'layouts/pretty_toolbar' %>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/load-image.js"></script>
<script src="js/bootstrap-image-gallery.js"></script>
<script type="text/javascript">
$('#modal-gallery.fade').css('top', '50%');
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="js/bootstrap-image-gallery.min.js"></script>
<%= render 'layouts/pretty_toolbar' %>