forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
# 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/
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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/
|
||||
@@ -1,3 +0,0 @@
|
||||
// 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/
|
||||
@@ -1,3 +0,0 @@
|
||||
// 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/
|
||||
@@ -126,6 +126,6 @@ $box-background: white;
|
||||
|
||||
@import 'extra';
|
||||
body {
|
||||
background: url('http://localhost:3000/stvn.jpg') fixed no-repeat;
|
||||
background: url('http://www.fet.at/stvn.jpg') fixed no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ class DocumentsController < ApplicationController
|
||||
|
||||
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
|
||||
|
||||
@@ -58,9 +57,9 @@ author = Document.ether.author("author_1")
|
||||
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.to_s, domain: %w(.fet.at), expires: 1.hour.from_now}
|
||||
#cookies[:sessionID] = {:value => sess.id}
|
||||
cookies[:sessionID1]=sess.id
|
||||
cookies[:sessionID]= {value: sess.id, expires: 1.hour.from_now}
|
||||
# cookies[:sdf]=sess.id
|
||||
# pad=ether.pad(@document.etherpadkey)
|
||||
# redirect_to "http://www.fet.at/etherpad/p/"+@document.ep_pad.id
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
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
|
||||
@@ -1,83 +0,0 @@
|
||||
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
|
||||
@@ -37,7 +37,7 @@ class HomeController < ApplicationController
|
||||
def search
|
||||
|
||||
unless params['query'].nil? || params['query'].empty?
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium do
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium, Document do
|
||||
fulltext params['query']
|
||||
end
|
||||
@neuigkeiten=[];
|
||||
|
||||
@@ -1,6 +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]
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
module FetmeetingsHelper
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
module FetmeetingtopsHelper
|
||||
end
|
||||
@@ -120,7 +120,7 @@ class Ability
|
||||
# Calendar
|
||||
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
can [:edit, :update,:new,:create], Document
|
||||
can [:show, :edit, :update,:new,:create,:write, :write_etherpad, :read_from_etherpad, :dump_to_etherpad], Document
|
||||
can :manage, Meeting
|
||||
can :manage, Meetingtyp
|
||||
end
|
||||
|
||||
@@ -9,6 +9,13 @@ class Document < ActiveRecord::Base
|
||||
validate :parent, :presence=>true
|
||||
has_paper_trail
|
||||
TYPS = { 1=>"fet_docs", 10=>"protocol", 11=> "agenda"}
|
||||
def long_name
|
||||
if self.parent.class=="Meeting"
|
||||
"<b>"+self.parent.text+ "</b>"+ self.name
|
||||
else
|
||||
"<b>" + self.parent.title + ":</b>"+ self.name
|
||||
end
|
||||
end
|
||||
def self.new_divid_for(parent)
|
||||
"document_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
|
||||
end
|
||||
@@ -41,7 +48,7 @@ class Document < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
def read_from_etherpad
|
||||
self.text=strip_control_chars(self.ep_pad.html)
|
||||
self.text=ApplicationController.helpers.strip_control_chars(self.ep_pad.html)
|
||||
|
||||
end
|
||||
def ep_pad
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
@@ -1,7 +0,0 @@
|
||||
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
|
||||
2
app/views/documents/_nlink.html.erb
Normal file
2
app/views/documents/_nlink.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<%= raw(nlink.long_name) %>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<%= 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 %>
|
||||
@@ -1,6 +0,0 @@
|
||||
<h1>Editing fetmeeting</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @fetmeeting %> |
|
||||
<%= link_to 'Back', fetmeetings_path %>
|
||||
@@ -1,25 +0,0 @@
|
||||
<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 %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h1>New fetmeeting</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', fetmeetings_path %>
|
||||
@@ -1,20 +0,0 @@
|
||||
<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 %>
|
||||
@@ -1 +0,0 @@
|
||||
<%= fetmeetingtop.title %> (<i><%= fetmeetingtop.ersteller %></i>)
|
||||
@@ -1,14 +0,0 @@
|
||||
<%= 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 %>
|
||||
@@ -1,6 +0,0 @@
|
||||
<h1>Editing fetmeetingtop</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @fetmeetingtop %> |
|
||||
<%= link_to 'Back', fetmeetingtops_path %>
|
||||
@@ -1,31 +0,0 @@
|
||||
<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 %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h1>New fetmeetingtop</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', fetmeetingtops_path %>
|
||||
@@ -1,30 +0,0 @@
|
||||
<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 %>
|
||||
Reference in New Issue
Block a user