Merge branch 'master' of https://github.com/HausdorffHimself/fetsite
This commit is contained in:
BIN
app/assets/images/no_image_128.png
Normal file
BIN
app/assets/images/no_image_128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/assets/images/no_image_64.png
Normal file
BIN
app/assets/images/no_image_64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -33,4 +33,16 @@
|
|||||||
//.fade {
|
//.fade {
|
||||||
// opacity: 0;
|
// opacity: 0;
|
||||||
// transition: opacity 0.15s linear 0s;
|
// transition: opacity 0.15s linear 0s;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
div.gallery-block
|
||||||
|
{
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.gallery-block:hover
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
box-shadow: 1px 1px 2px 2px lightgray;
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ class GalleriesController < ApplicationController
|
|||||||
# GET /galleries.json
|
# GET /galleries.json
|
||||||
def index
|
def index
|
||||||
@galleries = Gallery.all
|
@galleries = Gallery.all
|
||||||
|
@toolbar_elements << {:hicon => 'icon-plus', :text => I18n.t('fotos.new-gallery'), :path => new_gallery_path }
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # index.html.erb
|
format.html # index.html.erb
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
class Gallery < ActiveRecord::Base
|
class Gallery < ActiveRecord::Base
|
||||||
|
WORD_COUNT = 20
|
||||||
attr_accessible :datum, :desc, :name
|
attr_accessible :datum, :desc, :name
|
||||||
has_many :fotos
|
has_many :fotos
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,5 +2,7 @@
|
|||||||
|
|
||||||
<%= render 'form' %>
|
<%= render 'form' %>
|
||||||
|
|
||||||
|
<!--
|
||||||
<%= link_to 'Show', @gallery %> |
|
<%= link_to 'Show', @gallery %> |
|
||||||
<%= link_to 'Back', galleries_path %>
|
<%= link_to 'Back', galleries_path %>
|
||||||
|
-->
|
||||||
|
|||||||
@@ -1,26 +1,35 @@
|
|||||||
<h1><%= I18n.t('fotos.galleries')%></h1>
|
<h1><%= I18n.t('fotos.galleries')%></h1>
|
||||||
<%= %>
|
<% @galleries.each_slice(2) do |row| %>
|
||||||
<div class="container-fluid">
|
<div class="row-fluid">
|
||||||
<div class="row-fluid">
|
<% row.each do |gallery| %>
|
||||||
<div class="span12">
|
<div class="span6">
|
||||||
<% @galleries.each do |gallery| %>
|
<%= link_to gallery, :class => 'gallery-block' do %>
|
||||||
<%= link_to gallery do %>
|
<div class="media gallery-block">
|
||||||
<div class="media">
|
<div class="pull-left" href="#">
|
||||||
<div class="pull-left" href="#">
|
<%= if(gallery.fotos.empty?)
|
||||||
<%= image_tag gallery.fotos.first.datei.big_thumb.url %>
|
image_tag "no_image_128.png", {:class => "img-rounded"}
|
||||||
</div>
|
else
|
||||||
<div class="media-body">
|
image_tag gallery.fotos.sample.datei.big_thumb.url, {:class => "img-rounded"}
|
||||||
<h1><%= gallery.datum %> - <%= gallery.name %></h1>
|
end %>
|
||||||
<p><%= gallery.desc %>
|
</div>
|
||||||
</p>
|
<div class="media-body">
|
||||||
</div>
|
<small class="pull-left"><%= gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
|
||||||
</div>
|
<small class="pull-right"><%=I18n.l(gallery.try(:datum).try(:to_date)) unless gallery.try(:datum).try(:to_date).nil? %></small></br>
|
||||||
<% end %>
|
<h1><%= gallery.name %></h1>
|
||||||
|
<p>
|
||||||
<% end %>
|
<%= if gallery.desc.split.size > Gallery::WORD_COUNT
|
||||||
</div>
|
gallery.desc.split[0..Gallery::WORD_COUNT].join(" ") + " ..."
|
||||||
</div>
|
else
|
||||||
</div
|
gallery.desc
|
||||||
|
end%>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %> <!-- end link -->
|
||||||
|
</div> <!-- close span6 -->
|
||||||
|
<% end %> <!-- end row -->
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<%= link_to I18n.t('fotos.new-gallery'), new_gallery_path %>
|
<%= render :partial => 'layouts/pretty_toolbar' %>
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
|
|
||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
<div>
|
<div>
|
||||||
<small> <%= @gallery.datum %> </small>
|
<small class="pull-left"><%= @gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
|
||||||
|
<small class="pull-right"><%=I18n.l(@gallery.try(:datum).try(:to_date)) unless @gallery.try(:datum).try(:to_date).nil? %></small></br>
|
||||||
<h1>
|
<h1>
|
||||||
<%= @gallery.name %>
|
<%= @gallery.name %>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= @gallery.desc %>
|
<%= @gallery.desc %>
|
||||||
</p>
|
</p>
|
||||||
|
</br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- modal-gallery is the modal dialog used for the image gallery -->
|
<!-- 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 id="modal-gallery" class="modal hide fade modal-gallery modal-fullscreen modal-loading" tabindex="-1">
|
||||||
@@ -32,13 +31,13 @@
|
|||||||
<div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
|
<div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
|
||||||
<% @gallery.fotos.each do |f| %>
|
<% @gallery.fotos.each do |f| %>
|
||||||
|
|
||||||
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
|
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
|
||||||
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %></a>
|
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %></a>
|
||||||
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</br>
|
||||||
<%= render 'layouts/pretty_toolbar' %>
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
|
|
||||||
|
|
||||||
@@ -48,6 +47,5 @@
|
|||||||
<script src="js/load-image.js"></script>
|
<script src="js/load-image.js"></script>
|
||||||
<script src="js/bootstrap-image-gallery.js"></script>
|
<script src="js/bootstrap-image-gallery.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
//$('#modal-gallery.fade').css('top', '50%');
|
||||||
//$('#modal-gallery.fade').css('top', '50%');
|
</script>
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<%= link_to themengruppe,{:class=>'themengruppe'} do %>
|
<%= link_to themengruppe,{:class=>'themengruppe'} do %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<%= image_tag themengruppe.picture.thumb.url,{:class=>"img-circle"} %>
|
<%= image_tag themengruppe.picture.thumb.url,{:class=>"img-rounded"} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="span10">
|
<div class="span10">
|
||||||
<h3><%=themengruppe.title%> </h3>
|
<h3><%=themengruppe.title%> </h3>
|
||||||
|
|||||||
5
config/locales/galleries.de.yml
Normal file
5
config/locales/galleries.de.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
de:
|
||||||
|
fotos:
|
||||||
|
galleries: "Bildergalerien"
|
||||||
|
new-gallery: "neue Galerie"
|
||||||
|
bilder: "Bilder"
|
||||||
5
config/locales/galleries.en.yml
Normal file
5
config/locales/galleries.en.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
en:
|
||||||
|
fotos:
|
||||||
|
galleries: "Picture Gallery"
|
||||||
|
new-gallery: "new gallery"
|
||||||
|
bilder: "pictures"
|
||||||
Reference in New Issue
Block a user