forked from bofh/fetsite
design und struktur (container - unnötige entfernt)
This commit is contained in:
@@ -78,7 +78,7 @@ div.header {
|
||||
|
||||
|
||||
.navbar .nav li {
|
||||
min-width:60%;
|
||||
min-width:100%;
|
||||
}
|
||||
.navbar .nav .divider {
|
||||
border-style: solid;
|
||||
|
||||
@@ -2,12 +2,5 @@ class ConfigController < ApplicationController
|
||||
def index
|
||||
|
||||
end
|
||||
def get_git_update
|
||||
g = Git.open(".")
|
||||
|
||||
flash[:notice] ="Test"
|
||||
flash[:notice] =g.remote("fetsite").fetch
|
||||
redirect_to config_url
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,6 +14,7 @@ class Calendar < ActiveRecord::Base
|
||||
attr_accessible :name, :public, :picture
|
||||
has_and_belongs_to_many :calentries
|
||||
mount_uploader :picture, PictureUploader
|
||||
belongs_to :rubrik
|
||||
resourcify
|
||||
scope :public, -> { where(:public => :true) }
|
||||
end
|
||||
|
||||
@@ -15,12 +15,13 @@ class Rubrik < ActiveRecord::Base
|
||||
has_many :neuigkeiten, :class_name => "Neuigkeit"
|
||||
has_many :calentries, :through => :neuigkeiten, :as=>:object
|
||||
resourcify
|
||||
def moderator
|
||||
u=User.with_role(:newsmoderator).first
|
||||
if !u.nil?
|
||||
u.id
|
||||
end
|
||||
end
|
||||
has_one :calendar
|
||||
def moderator
|
||||
u=User.with_role(:newsmoderator).first
|
||||
if !u.nil?
|
||||
u.id
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -1,36 +1,29 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h1>
|
||||
<%= I18n.t 'fetprofiles.all' if params[:filter] == "all" %>
|
||||
<%= I18n.t 'fetprofiles.active' if params[:filter].nil? || params[:filter]== "active"
|
||||
%>
|
||||
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<% @fetprofiles.each do |fetprofile| %>
|
||||
<div class="row-fluid">
|
||||
<%= link_to fetprofile do %>
|
||||
<div class="span3">
|
||||
<%= image_tag fetprofile.picture.portrait.url %>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<h2><%= fetprofile.name %></h2>
|
||||
<p><%= fetprofile.fetmail %></p>
|
||||
<p><%= fetprofile.desc %></p>
|
||||
|
||||
</div> <% end %>
|
||||
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
<h1>
|
||||
<%= I18n.t 'fetprofiles.all' if params[:filter] == "all" %>
|
||||
<%= I18n.t 'fetprofiles.active' if params[:filter].nil? || params[:filter]== "active"
|
||||
%>
|
||||
</h1>
|
||||
<ul class="unstyled">
|
||||
<% @fetprofiles.each do |fetprofile| %>
|
||||
<li>
|
||||
<%= link_to fetprofile do %>
|
||||
<span class="pull-left">
|
||||
<%= image_tag fetprofile.picture.portrait.url %>
|
||||
</span>
|
||||
<div class="">
|
||||
|
||||
<h2><%= fetprofile.name %></h2>
|
||||
<p><%= fetprofile.fetmail %></p>
|
||||
<p><%= fetprofile.desc %></p>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= link_to 'New Fetprofile', new_fetprofile_path %>
|
||||
<div class="span12">
|
||||
<%= link_to I18n.t('fetprofiles.new'), new_fetprofile_path %>
|
||||
</div></div></div>
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<%= image_tag @fetprofile.picture.portrait.url %>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<h2><%= @fetprofile.name %></h2>
|
||||
<div class="span3">
|
||||
<%= image_tag @fetprofile.picture.portrait.url %>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<h2><%= @fetprofile.name %></h2>
|
||||
|
||||
<p>
|
||||
<%= @fetprofile.fetmailalias %>
|
||||
</p>
|
||||
<p>
|
||||
<%= @fetprofile.desc %>
|
||||
</p>
|
||||
<p>
|
||||
<%= "<b>Aktiv</b>".html_safe if @fetprofile.active %>
|
||||
</p>
|
||||
<p><%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= @fetprofile.fetmailalias %>
|
||||
</p>
|
||||
<p>
|
||||
<%= @fetprofile.desc %>
|
||||
</p>
|
||||
<p>
|
||||
<%= "<b>"+I18n.t('fetprofiles.active')+"</b>".html_safe if @fetprofile.active %>
|
||||
</p>
|
||||
<p><%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<ul>
|
||||
<div class="span12">
|
||||
<ul>
|
||||
<% @fetprofile.memberships.each do |m| %>
|
||||
<li>
|
||||
<%= render m %>
|
||||
<% link_to 'edit', edit_fetprofile_membership_path(@fetprofile,m) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= render m %>
|
||||
<% link_to 'edit', edit_fetprofile_membership_path(@fetprofile,m) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<%= link_to 'Neue Mitgliedschaft', new_fetprofile_membership_path(@fetprofile) %> |
|
||||
<%= link_to 'Neue Mitgliedschaft', new_fetprofile_membership_path(@fetprofile) %> |
|
||||
|
||||
<%= link_to 'Edit', edit_fetprofile_path(@fetprofile) %> |
|
||||
<%= link_to 'Back', fetprofiles_path %>
|
||||
</div>
|
||||
<%= link_to 'Edit', edit_fetprofile_path(@fetprofile) %> |
|
||||
<%= link_to 'Back', fetprofiles_path %>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1>Listing galleries</h1>
|
||||
<h1><%= I18n.t('fotos.galleries')%></h1>
|
||||
<%= %>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
@@ -23,4 +23,4 @@
|
||||
</div
|
||||
|
||||
<br />
|
||||
<%= link_to 'New Gallery', new_gallery_path %>
|
||||
<%= link_to I18n.t('fotos.new-gallery'), new_gallery_path %>
|
||||
|
||||
@@ -1,41 +1,31 @@
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'fetprofiles/tabs' %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h1>
|
||||
<%= @gremium.name %>
|
||||
</h1>
|
||||
<% Gremium::TYPEN[@gremium.typ.to_i].to_s %>
|
||||
<p>
|
||||
<%= @gremium.desc %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% @gremium.memberships.order(:typ).active.each_slice(4) do |r| %>
|
||||
<div class="row-fluid"><% r.each do |m| %>
|
||||
<%= link_to m.fetprofile do %>
|
||||
<div class="span3" style="vertical-align:middle; text-align:center">
|
||||
<%= image_tag m.fetprofile.picture.portrait %>
|
||||
<p>
|
||||
<%= m.fetprofile.name %> <br><%= render(m) %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_gremium_path(@gremium) %> |
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<h1>
|
||||
<%= @gremium.name %>
|
||||
</h1>
|
||||
<% Gremium::TYPEN[@gremium.typ.to_i].to_s %>
|
||||
<p>
|
||||
<%= @gremium.desc %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% @gremium.memberships.order(:typ).active.each_slice(4) do |r| %>
|
||||
<div class="row-fluid">
|
||||
<% r.each do |m| %>
|
||||
<%= link_to m.fetprofile do %>
|
||||
<div class="span3" style="vertical-align:middle; text-align:center">
|
||||
<%= image_tag m.fetprofile.picture.portrait %>
|
||||
<p>
|
||||
<%= m.fetprofile.name %> <br>
|
||||
<%= render(m) %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) %>
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<h1>Listing neuigkeiten</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Text</th>
|
||||
<th>Datum</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @neuigkeiten.each do |neuigkeit| %>
|
||||
<tr>
|
||||
<td><%= neuigkeit.title %></td>
|
||||
<td><%= neuigkeit.text %></td>
|
||||
<td><%= neuigkeit.datum %></td>
|
||||
<td><%= link_to 'Show', neuigkeit %></td>
|
||||
<td><%= link_to 'Edit', edit_neuigkeit_path(neuigkeit) %></td>
|
||||
<td><%= link_to 'Destroy', neuigkeit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Neuigkeit', new_neuigkeit_path %>
|
||||
@@ -1,32 +1,23 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'rubriken/tabs' %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<%= @neuigkeit.rubrik.name %>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<%= render 'rubriken/tabs' %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
||||
<%= "am " + I18n.l(@neuigkeit.try(:datum).try(:to_date)) unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||
</div>
|
||||
<span>
|
||||
<%= @neuigkeit.rubrik.name %>
|
||||
</span>
|
||||
<span class="pull-right">
|
||||
<%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %>
|
||||
<%= "am " + I18n.l(@neuigkeit.try(:datum).try(:to_date)) unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||
</span>
|
||||
<div class="media">
|
||||
<div class="pull-left" href="#">
|
||||
<p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.url %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="media">
|
||||
<div class="pull-left" href="#">
|
||||
<p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.url %></p>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h1><%= link_to @neuigkeit.title,rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit) %></h1>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h1><%= link_to @neuigkeit.title,rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit) %></h1>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
<h1><%= I18n.t("rubrik.title")%></h1>
|
||||
|
||||
<ul class="unstyled" style="max-width:70em">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
|
||||
<li><%= render n %> </li>
|
||||
<% end %>
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +1,34 @@
|
||||
<%= render 'tabs' %>
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="row-fluid">
|
||||
<span class="span12">
|
||||
<h1><%= @rubrik.name %></h1>
|
||||
|
||||
|
||||
<h1><%= @rubrik.name %></h1>
|
||||
<p>
|
||||
|
||||
<%= @rubrik.desc %>
|
||||
</p>
|
||||
<b>Moderatoren:</b><i>
|
||||
<% @moderatoren.each do |m|%>
|
||||
<%= m.email%>,
|
||||
<% end%></i>
|
||||
</span>
|
||||
</div>
|
||||
<b>Moderatoren:</b>
|
||||
<i>
|
||||
<% @moderatoren.each do |m|%>
|
||||
<%= m.email%>,
|
||||
<% end%>
|
||||
</i>
|
||||
|
||||
<% @rubrik.neuigkeiten.each_slice(2) do |row| %>
|
||||
<div class="row-fluid">
|
||||
<% row.each do |neuigkeit| %>
|
||||
<div class="span6 min-width:13em;">
|
||||
<%= render neuigkeit %>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% @rubrik.neuigkeiten.each_slice(1) do |row| %>
|
||||
<ul class="unstyled" style="max-width:70em">
|
||||
<% row.each do |neuigkeit| %>
|
||||
<li>
|
||||
<%= render neuigkeit %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="row-fluid">
|
||||
<span class="span12">
|
||||
<%= link_to 'Verwalten', verwalten_rubrik_path(@rubrik) %> |
|
||||
<%= link_to '<i class="icon-plus-sign"></i>'.html_safe+"Neuer Artikel", new_rubrik_neuigkeit_path(@rubrik) %>
|
||||
</span></div>
|
||||
|
||||
<%= link_to 'Verwalten', verwalten_rubrik_path(@rubrik) %> |
|
||||
<%= link_to '<i class="icon-plus-sign"></i>'.html_safe+"Neuer Artikel", new_rubrik_neuigkeit_path(@rubrik) %>
|
||||
|
||||
|
||||
<%= toolbar_html(@toolbar_elements)%>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ de:
|
||||
edit: "Bearbeiten"
|
||||
actions: "Aktionen"
|
||||
delete: "Löschen"
|
||||
|
||||
verwalten: "Verwalten"
|
||||
home:
|
||||
mtitle: "Menu"
|
||||
willkommen: "Willkommen bei der Fachschaft Elektrotechnik"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Fetsite::Application.routes.draw do
|
||||
|
||||
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
|
||||
resources :home, :only=>[:index]
|
||||
#get 'home',:controller=>home,:action=>:index,:as=>"home_index"
|
||||
@@ -7,11 +6,9 @@
|
||||
resources :users, :only => [:index]
|
||||
get 'users/:id/add_role/:role', :controller=>:users, :action=>:add_role, :as=>'user_add_role'
|
||||
get 'users/:id/do_confirm', :controller=>:users, :action=>:do_confirm, :as=>'user_do_confirm'
|
||||
|
||||
get 'config',:controller=>:config,:action=>:index , :as => 'config'
|
||||
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update, :as=>'config_getgitupdate'
|
||||
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
devise_for :users
|
||||
|
||||
|
||||
Reference in New Issue
Block a user