work in progress
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
|
||||
@import 'blueimp-gallery-all';
|
||||
|
||||
.left
|
||||
{
|
||||
float: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
/* etc. */
|
||||
}
|
||||
h1 {
|
||||
font-size: 23px
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ class GalleriesController < ApplicationController
|
||||
# GET /galleries/1/edit
|
||||
def edit
|
||||
@gallery = Gallery.find(params[:id])
|
||||
@fotos_old = @gallery.fotos
|
||||
end
|
||||
|
||||
# POST /galleries
|
||||
@@ -81,6 +82,10 @@ class GalleriesController < ApplicationController
|
||||
@foto = Foto.new
|
||||
respond_to do |format|
|
||||
if @gallery.update_attributes(params[:gallery])
|
||||
|
||||
Foto.where(:gallery_id=>nil).each do |tbd|
|
||||
tbd.destroy
|
||||
end
|
||||
format.html { redirect_to @gallery, notice: 'Gallery was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
class Gallery < ActiveRecord::Base
|
||||
WORD_COUNT = 20
|
||||
attr_accessible :datum, :desc, :name
|
||||
attr_accessible :datum, :desc, :name, :foto_ids
|
||||
has_many :fotos
|
||||
has_many :nlinks, as: :link
|
||||
# scope :search, ->(query) {where("name like ? or galleries.desc like ?", "%#{query}%", "%#{query}%")}
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
<%= semantic_form_for @gallery do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :datum %>
|
||||
<% end %>
|
||||
<div class="container-fluid">
|
||||
<div class="fluid-row">
|
||||
<div class="span4">
|
||||
<%= semantic_form_for @gallery do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :datum %>
|
||||
<%= f.input :fotos,:label=>"test", :as=>:check_boxes, :member_label =>Proc.new{|u| u.title.html_safe+"<br>".html_safe+image_tag(u.datei.thumb.url,{:class=>"img-polaroid img-rounded"})}, :wrapper_html => {:class => "left"}%>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<%= @fotos_old %>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
production:
|
||||
solr:
|
||||
hostname: localhost
|
||||
port: 8080
|
||||
port: 8983
|
||||
log_level: WARNING
|
||||
path: /solr-4.10.2/default #production #ollection1 #production
|
||||
# solr_home: solr
|
||||
path: /solr/production
|
||||
# read_timeout: 2
|
||||
# open_timeout: 0.5
|
||||
|
||||
|
||||
@@ -60,17 +60,11 @@
|
||||
<fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
|
||||
<!-- *** This fieldType is used by Sunspot! *** -->
|
||||
<fieldType name="text" class="solr.TextField" omitNorms="false">
|
||||
<analyzer type="index">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<analyzer>
|
||||
<tokenizer class="solr.StandardTokenizerFactory"/>
|
||||
<filter class="solr.StandardFilterFactory"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="30"/>
|
||||
<filter class="solr.TrimFilterFactory" />
|
||||
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="30"/>
|
||||
</analyzer>
|
||||
<analyzer type="query">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.TrimFilterFactory" />
|
||||
<filter class="solr.PorterStemFilterFactory"/>
|
||||
</analyzer>
|
||||
</fieldType>
|
||||
<!-- *** This fieldType is used by Sunspot! *** -->
|
||||
|
||||
Reference in New Issue
Block a user