Merge remote-tracking branch 'origin'

This commit is contained in:
2015-01-03 10:54:48 +01:00
81 changed files with 974 additions and 74 deletions

View File

@@ -115,3 +115,4 @@ gem 'sunspot_solr'
gem 'sitemap_generator' gem 'sitemap_generator'
gem 'whenever' gem 'whenever'
gem 'yaml_db' gem 'yaml_db'
gem 'etherpad-lite'

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

@@ -0,0 +1,3 @@
// Place all the styles related to the meetings 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 meetingtyps 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,134 @@
class DocumentsController < ApplicationController
# require('etherpad-lite')
load_and_authorize_resource
def index
respond_to do |format|
format.html {redirect_to rubriken_path}
end
end
def new
@document=Document.new
@parent=params[:parent_type].constantize.find(params[:parent_id])
@document.parent=@parent
@document.typ = 1
respond_to do |format|
format.js
end
end
def edit
@document = Document.find(params[:id])
@parent=@document.parent
respond_to do |format|
format.js
end
end
def dump_to_etherpad
@document = Document.find(params[:id])
@document.dump_to_etherpad
@document.save
# author = ether.author('author_1')
# pad=group.pad(@document.etherpadkey)
# pad.html='<div>'+@document.text+'</div>'
redirect_to action: :show
end
def read_from_etherpad
@document = Document.find(params[:id])
@document.read_from_etherpad
@document.save
render :show
end
def write_etherpad
@document = Document.find(params[:id])
ether=Document.ether
author = Document.ether.author("fetsite_"+current_user.uid, :name => current_user.text)
author = Document.ether.author("author_1")
session[:ep_sessions]={} if session[:ep_sessions].nil?
group=@document.ep_group
sess = session[:ep_sessions][group.id] ? ether.get_session(session[:ep_sessions][group.id]) : group.create_session(author, 60)
if sess.expired?
sess.delete
sess = group.create_session(author, 60)
end
session[:ep_sessions][group.id] = sess.id
# Set the EtherpadLite session cookie. This will automatically be picked up by the jQuery plugin's iframe.
cookies[:sessionID] = {:value => sess.id, :domain => "www.fet.at"}
#cookies[:sessionID] = {:value => sess.id}
cookies[:sessionID1]=sess.id
# cookies[:sdf]=sess.id
# pad=ether.pad(@document.etherpadkey)
# redirect_to "http://www.fet.at/etherpad/p/"+@document.ep_pad.id
#render :write
end
def write
@document = Document.find(params[:id])
if @document.is_etherpad?
redirect_to action: :write_etherpad
else
@parent=@document.parent
respond_to do |format|
format.html
end
end
end
def create
@document = Document.new(params[:document])
@parent=@document.parent
respond_to do |format|
if @document.save
# format.html { redirect_to @document, notice: 'Document was successfully created.' }
#format.json { render json: @document, status: :created, location: @document }
format.js
else
# format.html { render action: "new" }
# format.json { render json: @document.errors, status: :unprocessable_entity }
format.js { render action: "new" }
end
end
end
def update
@document = Document.find(params[:id])
@parent=@document.parent
respond_to do |format|
if @document.update_attributes(params[:document])
format.html { redirect_to @document, notice: 'Document was successfully updated.' }
format.json { head :no_content }
format.js
else
# format.html { render action: "edit" }
# format.json { render json: @document.errors, status: :unprocessable_entity }
format.js { render action: "edit"}
end
end
end
def destroy
logger.info("-------------delete------------------")
@document = Document.find(params[:id])
@parent=@document.parent
@document_id = params[:id]
@document.destroy
respond_to do |format|
#format.html { redirect_to @object}
#format.json { head :no_content }
format.js
end
end
end

View File

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

View File

@@ -0,0 +1,132 @@
class MeetingsController < ApplicationController
# load_and_authorize_resource
def index
parent=params[:parent_type].constantize.find(params[:parent_id])
unless parent.nil?
#authorize! :show, parent
if params[:filter]=="upcomming"
@meetings=parent.meetings.includes(:calentry).where("calentries.start>?",1.hour.ago)
else
@meetings=parent.meetings
end
@parent=parent
end
respond_to do |format|
format.html {redirect_to rubriken_path}
format.js
end
end
def announce
m=Meeting.find(params[:id])
m.create_announcement(current_user)
m.save
respond_to do |format|
format.html {redirect_to m.parent}
format.js {render action: :show}
end
end
def show
m=Meeting.find(params[:id])
respond_to do |format|
format.html {redirect_to m.parent}
format.js
end
end
def new
@meeting=Meeting.new
@meeting.parent=params[:parent_type].constantize.find(params[:parent_id])
@parent=@meeting.parent
@meeting.calentry=Calentry.new
@meeting.calentry.typ = 2
respond_to do |format|
format.js
end
end
def create_protocol
@meeting = Meeting.find(params[:id])
@meeting.create_protocol
@meeting.save
respond_to do |format|
format.js {render action: :show}
end
end
def create_agenda
@meeting = Meeting.find(params[:id])
@meeting.create_agenda
respond_to do |format|
format.js {render action: :show}
end
end
def edit
@meeting = Meeting.find(params[:id])
@parent=@meeting.parent
respond_to do |format|
format.js
end
end
def create
@meeting = Meeting.new(params[:meeting])
@parent=@meeting.parent
#@meeting.assign_attributes(params[:meeting])
respond_to do |format|
if @meeting.save
# format.html { redirect_to @meeting, notice: 'Meeting was successfully created.' }
#format.json { render json: @meeting, status: :created, location: @meeting }
format.js
else
# format.html { render action: "new" }
# format.json { render json: @meeting.errors, status: :unprocessable_entity }
format.js { render action: "new" }
end
end
end
def update
@meeting = Meeting.find(params[:id])
@parent=@meeting.parent
respond_to do |format|
if @meeting.update_attributes(params[:meeting])
format.html { redirect_to @meeting, notice: 'Meeting was successfully updated.' }
format.json { head :no_content }
format.js
else
# format.html
# format.json { render json: @meeting.errors, status: :unprocessable_entity }
format.js { render action: "edit" }
end
end
end
def destroy
logger.info("-------------delete------------------")
@meeting = Meeting.find(params[:id])
@parent=@meeting.parent
@meeting_id = params[:id]
@meeting.destroy
respond_to do |format|
#format.html { redirect_to @object}
#format.json { head :no_content }
format.js
end
end
end

View File

@@ -0,0 +1,2 @@
class MeetingtypsController < ApplicationController
end

View File

@@ -112,13 +112,13 @@ class NeuigkeitenController < ApplicationController
end end
@calentries1=@neuigkeit.calentries @calentries1=@neuigkeit.calentries
@nlink_search = Neuigkeit::LINKTYPES.clone nlink_search = Neuigkeit::LINKTYPES.clone
nlink_search.collect!{|t| t.constantize}
# @nlink_search.collect!{|t| t.search(params[:query]).limit(2)}
@results= Sunspot.search nlink_search do
fulltext params[:query]
end
@nlink_search.collect!{|t| t.constantize}
@nlink_search.collect!{|t| t.search(params[:query]).limit(2)}
@nlink_search.flatten!
respond_to do |format| respond_to do |format|
format.html { render action:"show" } format.html { render action:"show" }
format.js format.js

View File

@@ -29,7 +29,7 @@ class RubrikenController < ApplicationController
@rubrik = Rubrik.find(params[:id]) @rubrik = Rubrik.find(params[:id])
@moderatoren=User.with_role(:newsmoderator,@rubrik) @moderatoren=User.with_role(:newsmoderator,@rubrik)
@calentries= @rubrik.calentries @calentries= @rubrik.calendar.calentries
if can?(:showunpublished, Neuigkeit) if can?(:showunpublished, Neuigkeit)
@neuigkeiten = @rubrik.neuigkeiten.page(params[:page]).per(3) @neuigkeiten = @rubrik.neuigkeiten.page(params[:page]).per(3)
else else

View File

@@ -40,6 +40,11 @@ class ThemenController < ApplicationController
# @thema.text = @thema.text.sanitize # @thema.text = @thema.text.sanitize
render :edit render :edit
end end
def version
@thema = Thema.find(params[:id])
end
def verwalten def verwalten
@thema = Thema.find(params[:id]) @thema = Thema.find(params[:id])
@attachment=Attachment.new @attachment=Attachment.new
@@ -107,7 +112,14 @@ class ThemenController < ApplicationController
format.js format.js
end end
end end
def attachments def documents
@thema = Thema.find(params[:id])
@documents=@thema.documents
respond_to do |format|
format.js
end
end
def attachments
@thema = Thema.find(params[:id]) @thema = Thema.find(params[:id])
@attachments=@thema.attachments @attachments=@thema.attachments
@attachment=Attachment.new @attachment=Attachment.new

View File

@@ -1,7 +1,28 @@
module ApplicationHelper module ApplicationHelper
def current_url1(overwrite={})
url_for :params => params.merge(overwrite).except(:controller,:action,:ansicht) def strip_control_chars(value)
end value.chars.inject("") do |str, char|
unless char.ascii_only? && (char.ord < 32 || char.ord == 127)
str << char
end
str
end
end
def convert_topic_to_meeting(t,mt)
m=Meeting.new_with_date_and_typ(t,t.title.to_date+16.hour,mt)
m.save
m.create_protocol
m.protocol.text=t.text
m.protocol.save
m.update_time_from_protocol
m.save
t.meetings << m
t.save
end
def current_url1(overwrite={})
url_for :params => params.merge(overwrite).except(:controller,:action,:ansicht)
end
def switch_locale_url(target_locale) def switch_locale_url(target_locale)

View File

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

View File

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

View File

@@ -114,10 +114,22 @@ class Ability
unless user.has_role?("fetadmin") unless user.has_role?("fetadmin")
cannot :delete, Rubrik cannot :delete, Rubrik
cannot :delete, Neuigkeit cannot :delete, Neuigkeit
end end
# Calendar
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
can :manage, Document
can :manage, Meeting
can :manage, Meetingtyp
end
unless user.has_role?( "fetadmin")
cannot :delete, Document
cannot :delete, Meeting
end
if user.has_role?( "fetadmin")
can :manage, Meetingtyp
end
# Rechteverwaltung Kalender # Rechteverwaltung Kalender
can [:show, :index], Calendar, :public => true can [:show, :index], Calendar, :public => true
@@ -125,8 +137,6 @@ class Ability
can [:show], Calentry can [:show], Calentry
if( user.has_role?("fetuser") || user.has_role?("fetadmin")) if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
can [:show,:index], Calendar can [:show,:index], Calendar
can [:edit, :update,:new,:create,:verwalten], Calendar can [:edit, :update,:new,:create,:verwalten], Calendar
can [:edit, :update,:new,:create,:verwalten,:delete], Calentry can [:edit, :update,:new,:create,:verwalten,:delete], Calentry

View File

@@ -57,7 +57,7 @@ end
end end
def name def name
unless self.object.nil? unless self.object.nil?
self.object.name self.object.title
else else
summary summary
end end

64
app/models/document.rb Normal file
View File

@@ -0,0 +1,64 @@
class Document < ActiveRecord::Base
attr_accessible :name, :parent, :text, :typ, :parent_id, :parent_type
belongs_to :parent, :polymorphic => true
validate :name, :length=>{minimum:3}
validate :text, :presence=>true
validate :typ, :presence=>true
validate :parent, :presence=>true
has_paper_trail
TYPS = { 1=>"fet_docs", 10=>"protocol", 11=> "agenda"}
def self.new_divid_for(parent)
"document_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
end
def divid
"document_"+self.id.to_s
end
def self.ether
EtherpadLite.connect('http://www.fet.at/etherpad', File.new('/home/andreas/www/APIKEY.txt'))
end
def ether
if @ep.nil?
@ep=Document.ether
end
@ep
end
def is_etherpad?
!(etherpadkey.nil? || etherpadkey.empty?)
end
def move_to_etherpad
unless self.is_etherpad? || self.id.nil?
self.etherpadkey="document_"+ self.id.to_s
self.ep_pad.html = '<div>'+self.text+'</div>'
end
end
def dump_to_etherpad
if self.is_etherpad?
self.ep_pad.html = '<div>'+self.text+'</div>'
else
self.move_to_etherpad
end
end
def read_from_etherpad
self.text=strip_control_chars(self.ep_pad.html)
end
def ep_pad
self.ep_group.pad(self.etherpadkey)
end
def ep_group
t= (self.typ.nil?) ? 1 : self.typ
Document.ether.group(Document::TYPS[t])
end
searchable do
text :text
text :name, :boost=>4.0
if typ = 10 || typ=11
text :meeting do
parent.text unless parent.nil?
end
end
end
end

View File

@@ -15,7 +15,11 @@ class Gallery < ActiveRecord::Base
attr_accessible :datum, :desc, :name attr_accessible :datum, :desc, :name
has_many :fotos has_many :fotos
has_many :nlinks, as: :link has_many :nlinks, as: :link
scope :search, ->(query) {where("name like ? or galleries.desc like ?", "%#{query}%", "%#{query}%")} # scope :search, ->(query) {where("name like ? or galleries.desc like ?", "%#{query}%", "%#{query}%")}
searchable do
text :desc
text :name, :boost=>3.0
end
def title def title
name name

View File

@@ -22,7 +22,11 @@ class Gremium < ActiveRecord::Base
attr_accessible :desc, :name, :typ, :geschlecht,:thema_id, :memberships_attributes attr_accessible :desc, :name, :typ, :geschlecht,:thema_id, :memberships_attributes
has_many :memberships, dependent: :destroy # Mitgliedschaften bei dem Gremium has_many :memberships, dependent: :destroy # Mitgliedschaften bei dem Gremium
has_many :nlinks, as: :link, dependent: :destroy has_many :nlinks, as: :link, dependent: :destroy
scope :search, ->(query) {where("gremien.name like ? or gremien.desc like ?", "%#{query}%", "%#{query}%")} # scope :search, ->(query) {where("gremien.name like ? or gremien.desc like ?", "%#{query}%", "%#{query}%")}
searchable do
text :desc
text :name, :boost=>4.0
end
belongs_to :thema # Gehört zu einem Thema belongs_to :thema # Gehört zu einem Thema
scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste

View File

@@ -47,7 +47,7 @@ class Lva < ActiveRecord::Base
has_and_belongs_to_many :lecturers has_and_belongs_to_many :lecturers
has_many :nlinks, as: :link has_many :nlinks, as: :link
scope :search, ->(query) {where("name like ? or lvas.desc like ?", "%#{query}%", "%#{query}%")} # scope :search, ->(query) {where("name like ? or lvas.desc like ?", "%#{query}%", "%#{query}%")}
validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht
validates_presence_of :ects # ECTS vorhanden? validates_presence_of :ects # ECTS vorhanden?

130
app/models/meeting.rb Normal file
View File

@@ -0,0 +1,130 @@
class Meeting < ActiveRecord::Base
belongs_to :parent, :polymorphic=>true
belongs_to :meetingtyp
attr_accessible :desc, :intern, :name, :parent_id, :parent_type, :calentry,:calentry_attributes, :meetingtyp_id
belongs_to :neuigkeit
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
has_one :agenda , :as=>:parent,:conditions=>{:typ=>11}, :class_name=>'Document'
has_one :calentry, as: :object
accepts_nested_attributes_for :calentry
# validate :agenda, :presence=>true
# validate :protocol, :presence=>true
validate :parent, :presence=>true
validate :calentry, :presence=>true
before_validation :fix_calentry
def title
self.text
end
def text
unless self.meetingtyp.try(:name).to_s.empty?
t = self.meetingtyp.name.to_s+", "
else
t=""
t = parent.title.to_s + ", " if self.name.empty?
end
t= t+ self.name.to_s
t = t + " " + I18n.l(self.calentry.start) unless self.calentry.nil?
t
end
def create_announcement(user)
n = Neuigkeit.new
n.title=self.text
n.text ="Agenda im Anhang"
n.rubrik = self.meetingtyp.rubrik
n.author=user
self.neuigkeit= n
end
def fix_calentry
self.calentry.object=self unless self.calentry.nil?
end
def public?
! (self.intern)
end
def create_protocol
if self.protocol.nil?
d=Document.new
d.typ=10
d.name="Protokoll"
d.save
self.protocol=d
end
end
def create_calentry
if self.calentry.nil?
ce =Calentry.new
ce.typ=2
self.calentry=ce
end
end
def create_agenda
if self.agenda.nil?
d=Document.new
d.typ=11
d.name="Agenda"
d.save
self.agenda=d
end
end
def self.new_with_date_and_typ(parent,start, typ)
m= Meeting.new
m.parent=parent
m.calentry=Calentry.new
m.calentry.typ=2
m.calentry.start=start
m.calentry.dauer=4
m.meetingtyp=typ
m
end
def self.new_divid_for(parent)
"meeting_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
end
def divid
"meeting_"+self.id.to_s
end
def update_time_from_protocol
st= /Beginn[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s
st= /Anfang[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s if st.empty?
self.calentry.start=(self.calentry.start.to_date.to_s + " " +st).to_datetime unless st.empty?
st= /Ende[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s
self.calentry.ende=(self.calentry.ende.to_date.to_s + " " +st).to_datetime unless st.empty?
end
def agenda_text
unless self.agenda.nil?
t= self.agenda.text
else
t= ""
end
t
end
def protocol_text
unless self.protocol.nil?
t= self.protocol.text
else
t= ""
end
t
end
searchable do
text :text
text :name, :boost=>4.0
text :meetingtyp do
meetingtyp.name
end
text :protocol do
self.protocol_text
end
text :agenda do
self.agenda_text
end
end
end

6
app/models/meetingtyp.rb Normal file
View File

@@ -0,0 +1,6 @@
class Meetingtyp < ActiveRecord::Base
attr_accessible :agendaintern, :desc, :name, :protocolintern
belongs_to :rubrik
validate :rubrik, :presence=>true
end

View File

@@ -23,7 +23,7 @@ class Neuigkeit < ActiveRecord::Base
has_many :calentries, as: :object has_many :calentries, as: :object
has_many :nlinks has_many :nlinks
has_one :meeting
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
default_scope order(:datum).reverse_order default_scope order(:datum).reverse_order
@@ -38,7 +38,9 @@ class Neuigkeit < ActiveRecord::Base
before_validation :sanitize before_validation :sanitize
def is_annoncement?
self.meeting.nil?
end
def self.published def self.published
where("datum <= ? AND datum IS NOT NULL", Time.now.to_date) where("datum <= ? AND datum IS NOT NULL", Time.now.to_date)
end end

View File

@@ -16,6 +16,7 @@ class Rubrik < ActiveRecord::Base
has_many :published, :class_name => "Neuigkeit", :conditions=>["Neuigkeit.published"] has_many :published, :class_name => "Neuigkeit", :conditions=>["Neuigkeit.published"]
has_many :calentries, :through => :neuigkeiten, :as=>:object has_many :calentries, :through => :neuigkeiten, :as=>:object
resourcify resourcify
has_many :meetingtyps
has_one :calendar has_one :calendar
validates :calendar , :presence=>true validates :calendar , :presence=>true
before_validation :sanitize before_validation :sanitize

View File

@@ -29,7 +29,7 @@
class Studium < ActiveRecord::Base class Studium < ActiveRecord::Base
attr_accessible :desc, :name,:abkuerzung, :typ, :zahl, :semester, :picture, :picture_cache, :qualifikation,:struktur, :jobmoeglichkeiten, :lvas_attributes attr_accessible :desc, :name,:abkuerzung, :typ, :zahl, :semester, :picture, :picture_cache, :qualifikation,:struktur, :jobmoeglichkeiten, :lvas_attributes
has_many :modulgruppen, inverse_of: :studium, :class_name => "Modulgruppe", :dependent => :destroy has_many :modulgruppen, inverse_of: :studium, :class_name => "Modulgruppe", :dependent => :destroy
scope :search, ->(query) {where("name like ? or studien.desc like ?", "%#{query}%", "%#{query}%")} # scope :search, ->(query) {where("name like ? or studien.desc like ?", "%#{query}%", "%#{query}%")}
has_many :moduls, :through=>:modulgruppen has_many :moduls, :through=>:modulgruppen
has_many :lvas, :through=>:moduls has_many :lvas, :through=>:moduls
has_many :semester, :dependent => :destroy has_many :semester, :dependent => :destroy

View File

@@ -21,24 +21,24 @@ include Rails.application.routes.url_helpers
validates :themengruppe, :presence => true validates :themengruppe, :presence => true
validates :title, :presence => true validates :title, :presence => true
validates :text, :presence => true validates :text, :presence => true
has_many :meetings, :as=>:parent
has_many :documents, :as=>:parent
scope :public, where(:isdraft=>false).includes(:themengruppe).where("themengruppen.public"=>true) scope :public, where(:isdraft=>false).includes(:themengruppe).where("themengruppen.public"=>true)
default_scope order("themen.priority").reverse_order default_scope order("themen.priority").reverse_order
# scope :search, ->(query) {where("themen.text like ? or themen.title like ?", "%#{query}%", "%#{query}%")} # scope :search, ->(query) {where("themen.text like ? or themen.title like ?", "%#{query}%", "%#{query}%")}
searchable do searchable do
text :text text :text
text :title, :boost=>4.0 text :title, :boost=>4.0
end end
scope :outdated, -> {includes(:translations).where("thema_translations.updated_at<?",2.month.ago).where("thema_translations.locale"=>I18n.t.locale)
}
scope :outdated, -> {includes(:translations).where("thema_translations.updated_at<?",2.month.ago).where("thema_translations.locale"=>I18n.t.locale)
}
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
def is_outdated? def is_outdated?
unless translation.try(:updated_at).nil? unless translation.try(:updated_at).nil?
translation.updated_at < 2.month.ago translation.updated_at < 2.month.ago
else else
false false
end end
end end
def text_first_words def text_first_words
@@ -48,16 +48,13 @@ scope :outdated, -> {includes(:translations).where("thema_translations.updated_a
"...." "...."
else else
words[0..100].join(" ")+ " ..." unless words.nil? words[0..100].join(" ")+ " ..." unless words.nil?
end end
end end
def fix_links(host) def fix_links(host)
full_url= URI.parse(root_url(:host=>host)) full_url= URI.parse(root_url(:host=>host))
self.text.gsub!(/src="[\.\/]*uploads\/attachment\/datei\/(\d+)\/thumb_big[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.thumb_big.url; 'src="'+full_url.to_s+'"'} self.text.gsub!(/src="[\.\/]*uploads\/attachment\/datei\/(\d+)\/thumb_big[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.thumb_big.url; 'src="'+full_url.to_s+'"'}
self.text.gsub!(/src="[\.\/^"]*uploads\/attachment\/datei\/(\d+)\/[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.url; 'src="'+full_url.to_s+'"'} self.text.gsub!(/src="[\.\/^"]*uploads\/attachment\/datei\/(\d+)\/[^"]*"/){|s| full_url.path=Attachment.find($1.to_i).datei.url; 'src="'+full_url.to_s+'"'}
self.text.gsub!(/href="[^"]*themen\/(\d+)[^"]*"/){|s| full_url.path=thema_path(Thema.find($1.to_i)); 'href="'+full_url.to_s+'"'} self.text.gsub!(/href="[^"]*themen\/(\d+)[^"]*"/){|s| full_url.path=thema_path(Thema.find($1.to_i)); 'href="'+full_url.to_s+'"'}
end end
end end

View File

@@ -1,4 +1,4 @@
<% data_ext = attachment.datei.file.extension.downcase %> <% data_ext = attachment.datei.file.try(:extension).try(:downcase) %>
<% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %> <% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %>

View File

@@ -1,10 +1,15 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span1"></div><div class="span1"> <div class="span1"></div>
<%= fa_icon("calendar 2x") %> <div class="span1">
<%= fa_icon("calendar 2x") %>
</div>
<div class="span4">
<%= f.input :start, :as => :datetimepicker %></div><div class="span4">
<%= f.input :dauer , :as => :string, :append=>"h" %></div><div class="span1">
<% f.input :typ %>
</div>
<div class="span1">
<%= f.check_box :_destroy %>
<%= I18n.t 'common.delete' %>
</div>
</div> </div>
<div class="span4">
<%= f.input :start, :as => :datetimepicker %></div><div class="span4">
<%= f.input :dauer , :as => :string, :append=>"h" %></div><div class="span1">
<% f.input :typ %></div> <div class="span1"><%= f.check_box :_destroy %> <%= I18n.t 'common.delete' %></div>
</div>

View File

@@ -4,10 +4,15 @@
<%= semantic_form_for @calentry, :remote=>true, :html=>{:class=>"inline"} do |f| %> <%= semantic_form_for @calentry, :remote=>true, :html=>{:class=>"inline"} do |f| %>
<%= f.input :start, :as => :datetimepicker %> <%= f.input :start, :as => :datetimepicker %>
<%= f.input :dauer , :as => :string, :append=>"h" %> <% if @calentry.typ==1 %>
<%= f.input :dauer , :as => :string, :append=>"h" %>
<% else %>
<%= f.input :ende, :as => :datetimepicker %>
<% end %>
<%= f.input :object_id , :as => :hidden %> <%= f.input :object_id , :as => :hidden %>
<%= f.input :object_type , :as => :hidden %> <%= f.input :object_type , :as => :hidden %>
<%= f.input :typ , :as => :hidden %> <%= f.input :typ , :as => :hidden %>
<%= f.action :submit, :as => :input_ %> <%= f.action :submit, :as => :input_ %>

View File

@@ -0,0 +1,9 @@
<div class="contentbox" id="document_<%= document.id%>">
<% image_tag("/iconnavy/time.png") %>
<%= fa_icon("file-text") %>
<%= link_to document.name, document %>
<%= link_to "edit", edit_document_path(document),:remote=>true if can? :edit, document %>
<%= link_to 'Delete', document, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, document %>
</div>

View File

@@ -0,0 +1,7 @@
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
<%= f.input :text, :as=>:tinymce_text %>
<%= f.action :submit, :as => :input_ %>
<% end %>
<%= tinymce %>

View File

@@ -0,0 +1,13 @@
<%= fa_icon("calendar 2x") %>
<p id="notice"><%= notice %></p>
<%= semantic_form_for @document, :remote=>true, :html=>{:class=>""} do |f| %>
<%= f.input :name %>
<%= f.input :parent_id, :as=>:hidden %>
<%= f.input :parent_type, :as=>:hidden %>
<%= f.action :submit, :as => :input_ %>
<% end %>

View File

@@ -0,0 +1 @@
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent)%>\"></div><%=escape_javascript( render :partial=>"document", :object=>@document)%>");

View File

@@ -0,0 +1 @@
$("#document_<%= @document_id %>").remove();

View File

@@ -0,0 +1,7 @@
$("#<%= @document.divid %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@document)%>");

View File

@@ -0,0 +1,5 @@
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent) %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@document) %></div>");

View File

@@ -0,0 +1,9 @@
<li><%= link_to "Back to parent" , @document.parent %></li>
<li><%= link_to ff_icon("icon-pencil") + "Edit", write_document_path(@document) %></li>
<li><%= link_to ff_icon("icon-refresh")+"Refresh from Etherpad", read_from_etherpad_document_path(@document) if @document.is_etherpad? %></li>
<li><%= link_to "Copy Document to Etherpad", dump_to_etherpad_document_path(@document) , confirm: "Sicher? Löscht alle Änderungen im Etherpad"%></li>
<h2><%= @document.name %></h2>
<div id="">
<%= raw(@document.text) %>
</div>

View File

@@ -0,0 +1 @@
$("#document_<%= @document.id %>").replaceWith("<%=escape_javascript( render :partial=>"document", :object=>@document)%>");

View File

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

View File

@@ -0,0 +1 @@
<%= link_to "weiter" , "http://www.fet.at/etherpad/p/"+@document.ep_pad.id , target: :blank %>

View File

@@ -1,7 +1,7 @@
<%= tinymce_assets %> <%= tinymce_assets %>
<%= semantic_form_for @frage do |f| %> <%= semantic_form_for @frage do |f| %>
<%= f.inputs do %> <%= f.inputs do %>
<%= f.input :title %> <%= f.input :title , :as=>:text %>
<%= f.input :thema %> <%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%> <%= f.input :text, :as=>:tinymce_text%>
<% end %> <% end %>

View File

@@ -1,7 +1,7 @@
<%= tinymce_assets %> <%= tinymce_assets %>
<%= semantic_form_for @frage , :remote=>true do |f| %> <%= semantic_form_for @frage , :remote=>true do |f| %>
<%= f.inputs do %> <%= f.inputs do %>
<%= f.input :title %> <%= f.input :title, :as=>:text %>
<%= f.input :thema %> <%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%> <%= f.input :text, :as=>:tinymce_text%>
<% end %> <% end %>

View File

@@ -1,5 +1,6 @@
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<h1><%= I18n.t('home.willkommen') %></h1></p> <h1><%= I18n.t('home.willkommen') %></h1>
<%= render partial: "themen/small", object: @starttopic %>
<div class="container-fluid"> <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span6">

View File

@@ -4,7 +4,4 @@
<%= render partial: "themen/small", object: th %> <%= render partial: "themen/small", object: th %>
<% end %> <% end %>
</div> </div>

View File

@@ -1,9 +1,17 @@
<% if user_signed_in? %> <% if user_signed_in? %>
<li>Logged in as : <%= current_user.email %> <li class="dropdown">
<%= link_to('Logout', destroy_user_session_path, :method => :delete) %> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= ff_icon('icon-user')%><b class="caret"></b></a>
</li> <ul class="dropdown-menu">
<% else %> <li style="padding:5px">
<li> <%= image_tag current_user.fetprofile.picture.thumb.url,class: "pull-left" unless current_user.fetprofile.nil? %>
<%= link_to('Login', new_user_session_path) %> <%= current_user.email %> is logged in.
</li>
<% end %> </li>
<li><%= link_to('Logout', destroy_user_session_path, :method => :delete) %> </li>
</ul>
</li>
<% else %>
<li>
<%= link_to('Login', new_user_session_path) %>
</li>
<% end %>

View File

@@ -35,7 +35,9 @@
</ul> </ul>
</li> </li>
</ul> <%= render 'layouts/login' %>
</ul>
<!--<span class="pull-right"><%if I18n.locale == :en %> <!--<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%> <%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %> <% elsif I18n.locale == :de %>
@@ -44,6 +46,7 @@
</span>--> </span>-->
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,15 @@
<div class="contentbox" id="meeting_<%= meeting.id%>">
<b><%= link_to meeting.text, meeting %></b>
<%= link_to "Ankündigung", rubrik_neuigkeit_path(meeting.neuigkeit.rubrik, meeting.neuigkeit) unless meeting.neuigkeit.nil? %>
<%= link_to "ankündigen", announce_meeting_path(meeting), remote: true if meeting.neuigkeit.nil? %>
<%= link_to "edit", edit_meeting_path(meeting), remote: true %>
<%= link_to 'Delete', meeting, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, meeting %>
<%= render meeting.calentry unless meeting.calentry.nil? %>
<%= link_to "Agenda" , create_agenda_meeting_path(meeting), :remote=>true if meeting.agenda.nil? %>
<%= link_to "Protokoll" , create_protocol_meeting_path(meeting),:remote=>true if meeting.protocol.nil? %>
<%= render meeting.agenda unless meeting.agenda.nil? %>
<%= render meeting.protocol unless meeting.protocol.nil? %>
</div>

View File

@@ -0,0 +1,7 @@
<div id="meetings_for_<%= parent.class.to_s %>_<%= parent.id.to_s %>">
<% unless meeting_list.empty? %>
<% meeting_list.each do |m| %>
<%= render m %>
<% end%>
<% end%>
</div>

View File

@@ -0,0 +1,23 @@
<%= fa_icon("calendar 2x") %>
<p id="notice"><%= notice %></p>
<%= semantic_form_for @meeting, :remote=>true, :html=>{:class=>""} do |f| %>
<%= f.input :name %>
<%= f.input :meetingtyp %>
<%= f.semantic_fields_for :calentry, @meeting.calentry do |ff| %>
<%= ff.input :start, :as => :datetimepicker %>
<%= ff.input :ende, :as => :datetimepicker %>
<%= ff.input :typ %>
<% ff.input :object_id, :as=>:hidden %>
<% ff.input :object_type %>
<% end %>
<%= f.input :parent_id, :as=>:hidden %>
<%= f.input :parent_type, :as=>:hidden %>
<%= f.action :submit, :as => :input_ %>
<% end %>
<%= @meeting.calentry.to_yaml %>

View File

@@ -0,0 +1 @@
$("#<%= Meeting.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Meeting.new_divid_for(@parent)%>\"></div><%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");

View File

@@ -0,0 +1 @@
$("#meeting_<%= @meeting_id %>").remove();

View File

@@ -0,0 +1,5 @@
$("#<%= @meeting.divid %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@meeting)%>");

View File

@@ -0,0 +1 @@
$("#meetings_for_<%= @parent.class.to_s %>_<%= @parent.id.to_s %>").replaceWith("<%=escape_javascript( render :partial=>"meetings/meeting_list", object: @meetings, locals: {parent: @parent} ) %>");

View File

@@ -0,0 +1,3 @@
$("#<%= Meeting.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Meeting.new_divid_for(@parent) %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@meeting) %></div>");

View File

@@ -0,0 +1 @@
$("#meeting_<%= @meeting.id %>").replaceWith("<%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");

View File

@@ -0,0 +1 @@
$("#meeting_<%= @meeting.id %>").replaceWith("<%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");

View File

@@ -1,5 +1,19 @@
<div id="nlink_list_search"> <div id="nlink_list_search">
<ul class="unstyled"> <ul class="unstyled">
<%= render partial: "nlink_list_search", collection: nlink_list_search_whole %> <% unless @results.nil? %>
<ul class="unstyled linkbox-list">
<% @results.results.each do |res| %>
<% if can?(:show, res) %>
<li>
<%= link_to create_link_rubrik_neuigkeit_path(@neuigkeit.rubrik, @neuigkeit, :link_id=>res.id, :link_type=>res.class.to_s), remote: true, class: :linkbox do %>
<%= render :partial=>res.class.to_s.pluralize.downcase+"/nlink", :object=>res %>
<% end %>
</li>
<% end %>
<% end %>
</ul>
<% end %>
<% render partial: "nlink_list_search", collection: nlink_list_search_whole %>
</ul> </ul>
</div> </div>

View File

@@ -50,6 +50,9 @@ end
<%= render ce unless ce.nil? %> <%= render ce unless ce.nil? %>
<% end %> <% end %>
</div> </div>
<% unless @neuigkeit.meeting.nil? %>
<%= render @neuigkeit.meeting %>
<% end%>
<div id="calentry_new" ><%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %></div> <div id="calentry_new" ><%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %></div>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %> <%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
</div> </div>

View File

@@ -1,4 +1,6 @@
<%= content_for :header do %> <%= content_for :header do %>
<title>Fetsite - <%= @rubrik.name %></title> <title>Fetsite - <%= @rubrik.name %></title>
<% set_meta_tags :og => { <% set_meta_tags :og => {
:title => @rubrik.name.to_s, :title => @rubrik.name.to_s,
@@ -8,7 +10,9 @@
<%= display_meta_tags %> <%= display_meta_tags %>
<% end %> <% end %>
<%= render 'tabs' %> <%= render 'tabs' %>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<div class="container-fluid"> <div class="container-fluid">
@@ -52,7 +56,6 @@
</div> </div>
<br> <br>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,16 @@
<% if can?(:edit,@thema)|| ! @thema.documents.empty? %>
<b>Dokumente</b>
<%= link_to "Neues Dokument", new_document_path(:parent_id=>@thema.id, :parent_type=>"Thema"), :remote=>true %>
<div id="<%= Document.new_divid_for(@thema) %>"></div>
<% unless @documents.empty? %>
<% @documents.each do |d| %>
<%= render d %>
<% end%>
<% end%>
<% end%>

View File

@@ -8,8 +8,8 @@
<% if small.isdraft %> <% if small.isdraft %>
<div class="sticker sticker-yellow"><%= I18n.t("thema.isdraft") %> </div> <div class="sticker sticker-yellow"><%= I18n.t("thema.isdraft") %> </div>
<% end %> <% end %><div>
<%= raw(small.text) %> <%= raw(small.text) %></div>
<br/> <br/>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %> <%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
@@ -20,6 +20,37 @@
<%= raw(frage.text) %> <%= raw(frage.text) %>
</p> </p>
<% end %> <% end %>
<% if can?(:edit,small) || !small.meetings.empty? %>
<b>Treffen/Sitzungen</b>
<%= link_to "Neues Meeting", new_meeting_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<div id="<%= Meeting.new_divid_for(small) %>"></div>
<%= link_to "All", meetings_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true %>
<%= render :partial=>"meetings/meeting_list", object: small.meetings, locals: {parent: small} %>
<% end %>
<% if can?(:edit,small)|| ! small.documents.empty? %>
<b>Dokumente</b>
<%= link_to "Neues Dokument", new_document_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<div id="<%= Document.new_divid_for(small) %>"></div>
<% unless small.documents.empty? %>
<% small.documents.each do |d| %>
<%= render d %>
<% end%>
<% end%>
<% end%>
<% unless small.hideattachment %> <% unless small.hideattachment %>
<%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %> <%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %>
<% end %> <% end %>

View File

@@ -9,6 +9,9 @@
<li><%= link_to sanitize_thema_path(thema),:remote=>true do %> <%= ff_icon('icon-leaf') %> Sanitize <% end %> </li> <li><%= link_to sanitize_thema_path(thema),:remote=>true do %> <%= ff_icon('icon-leaf') %> Sanitize <% end %> </li>
<li><%= link_to fragen_thema_path(thema),:remote=>true do %> Fragen <% end %></li> <li><%= link_to fragen_thema_path(thema),:remote=>true do %> Fragen <% end %></li>
<li><%= link_to documents_thema_path(thema),:remote=>true do %> Fragen <% end %></li>
<li><%= link_to meetings_thema_path(thema),:remote=>true do %> Fragen <% end %></li>
<li><%= link_to attachments_thema_path(thema),:remote=>true do %> Attachments <% end %></li> <li><%= link_to attachments_thema_path(thema),:remote=>true do %> Attachments <% end %></li>
</ul> </ul>
</li> </li>

View File

@@ -0,0 +1 @@
$("#themaview").html("<%=escape_javascript( render :partial=>'themen/documents' )%>")

View File

@@ -1,5 +1,8 @@
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<h1><%= I18n.t('home.willkommen') %></h1></p> <h1><%= I18n.t('home.willkommen') %></h1>
<%= raw(@starttopic.text) %>
<div class="container-fluid"> <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span6">

View File

@@ -156,6 +156,8 @@ Fetsite::Application.routes.draw do
get :verwalten get :verwalten
get :sanitize get :sanitize
get :is_updated get :is_updated
get :documents
get :meetings
end end
resources :attachments resources :attachments
end end
@@ -163,6 +165,25 @@ Fetsite::Application.routes.draw do
resources :calendars resources :calendars
get 'verwalten/calendars', :controller=>:calendars, :action=>:verwalten, :as=>'calendars_verwalten' get 'verwalten/calendars', :controller=>:calendars, :action=>:verwalten, :as=>'calendars_verwalten'
resources :calentries resources :calentries
resources :documents do
member do
get :write
get :write_etherpad
get :read_from_etherpad
get :dump_to_etherpad
end
end
resources :meetings do
member do
get :announce
get :create_protocol
get :create_agenda
end
end
resources :meetingtyps
end end
end end
root :to => 'home#index' root :to => 'home#index'

View File

@@ -0,0 +1,15 @@
class CreateDocuments < ActiveRecord::Migration
def change
create_table :documents do |t|
t.integer :typ, :default=>0
t.string :name
t.text :text
t.string :etherpadkey, :default=>""
t.references :parent,:polymorphic=>{:default=>'Thema'}
t.timestamps
end
add_index :documents, :parent_id
add_index :documents, :parent_type
end
end

View File

@@ -0,0 +1,11 @@
class CreateMeetingtyps < ActiveRecord::Migration
def change
create_table :meetingtyps do |t|
t.string :name
t.text :desc
t.boolean :agendaintern, :default=>false
t.boolean :protocolintern, :default=>true
t.timestamps
end
end
end

View File

@@ -0,0 +1,15 @@
class CreateMeetings < ActiveRecord::Migration
def change
create_table :meetings do |t|
t.string :name
t.text :desc
t.boolean :intern, :default=>true
t.references :parent, :polymorphic=>{:default=>'Thema'}
t.references :meetingtyp
t.timestamps
end
add_index :meetings, :parent_id
add_index :meetings, :parent_type
add_index :meetings, :meetingtyp_id
end
end

View File

@@ -0,0 +1,6 @@
class AddNeuigkeitToMeeting < ActiveRecord::Migration
def change
add_column :meetings, :neuigkeit_id, :integer
add_column :meetingtyps, :rubrik_id, :integer
end
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe MeetingsController, :type => :controller do
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe MeetingtypsController, :type => :controller do
end

View File

@@ -0,0 +1,10 @@
FactoryGirl.define do
factory :document do
typ 1
name "MyString"
text "MyText"
etherpadkey "MyString"
parent ""
end
end

View File

@@ -0,0 +1,10 @@
FactoryGirl.define do
factory :meeting do
name "MyString"
desc "MyText"
parent nil
intern false
meetingtyp nil
end
end

View File

@@ -0,0 +1,9 @@
FactoryGirl.define do
factory :meetingtyp do
name "MyString"
desc "MyText"
agendaintern false
protocolintern false
end
end

View File

@@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the MeetingsHelper. For example:
#
# describe MeetingsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe MeetingsHelper, :type => :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the MeetingtypsHelper. For example:
#
# describe MeetingtypsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe MeetingtypsHelper, :type => :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Document, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Meeting, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Meetingtyp, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end