forked from bofh/fetsite
themengruppeprivate
This commit is contained in:
@@ -7,6 +7,8 @@ class GremienController < ApplicationController
|
||||
@gremien = Gremium.all
|
||||
@gremientabs=Gremium.tabs
|
||||
@toolbar_elements << {:text=>I18n.t('gremium.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium
|
||||
@toolbar_elements << {:text=>I18n.t('profile.new'),:path=>new_fetprofile_path() ,:icon=>:plus} if can? :new, Fetprofile
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @gremien }
|
||||
|
||||
@@ -52,6 +52,8 @@ class ThemengruppenController < ApplicationController
|
||||
end
|
||||
def verwalten_all
|
||||
@themengruppen =Themengruppe.order(:priority).reverse
|
||||
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('themengruppe.new'), :path=>new_themengruppe_path()}]
|
||||
|
||||
end
|
||||
def verwalten
|
||||
@themengruppe = Themengruppe.find(params[:themengruppe_id])
|
||||
|
||||
@@ -32,7 +32,7 @@ class Calentry < ActiveRecord::Base
|
||||
|
||||
resourcify
|
||||
def get_public
|
||||
self.public = (self.try(:object).nil?)? (self.calendar.try(:public)) : object.try(:public)
|
||||
self.public = (self.try(:object).nil?)? (self.calendar.try(:public?)) : object.try(:public?)
|
||||
true
|
||||
end
|
||||
def start_time
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
class Themengruppe < ActiveRecord::Base
|
||||
WORD_COUNT = 50
|
||||
attr_accessible :text, :title, :picture, :priority
|
||||
attr_accessible :text, :title, :picture, :priority, :public
|
||||
has_many :themen, class_name: 'Thema'
|
||||
has_many :fragen, through: :themen
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<h1>Listing gremien</h1>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<div class="container-fluid">
|
||||
<% @gremien.each do |gremium| %>
|
||||
<div class="row-fluid">
|
||||
@@ -38,7 +39,7 @@
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :priority %>
|
||||
<%= f.input :public %>
|
||||
<%= f.input :picture, :as => :file %>
|
||||
<%= f.input :text %>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div class="content-wrap content-column">
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
<p> <%= link_to "FAQS", faqs_themengruppen_path,class: :btn %></p>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
@@ -29,7 +30,7 @@
|
||||
-->
|
||||
</script>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<!--
|
||||
<%= link_to 'New Themengruppe', new_themengruppe_path %>
|
||||
-->
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<ul id="themengruppen" class="sort" >
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<li id="themengruppen_<%= themengruppe.id %>" class="sort" style="background:white;display:block;" ><%= themengruppe.title %>-<%= themengruppe.priority %></li>
|
||||
@@ -6,7 +8,6 @@
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
|
||||
$( document ).ready(function(){
|
||||
$("#themengruppen").sortable({
|
||||
cursor: 'crosshair',
|
||||
|
||||
5
db/migrate/20140526054302_add_public_to_themengruppe.rb
Normal file
5
db/migrate/20140526054302_add_public_to_themengruppe.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPublicToThemengruppe < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :themengruppen, :public, :boolean
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user