design und struktur (container - unnötige entfernt)

This commit is contained in:
Andreas Stephanides
2013-09-07 12:37:16 +02:00
parent 1c44ddc2ba
commit a60bdf5149
14 changed files with 137 additions and 202 deletions

View File

@@ -78,7 +78,7 @@ div.header {
.navbar .nav li { .navbar .nav li {
min-width:60%; min-width:100%;
} }
.navbar .nav .divider { .navbar .nav .divider {
border-style: solid; border-style: solid;

View File

@@ -2,12 +2,5 @@ class ConfigController < ApplicationController
def index def index
end end
def get_git_update
g = Git.open(".")
flash[:notice] ="Test"
flash[:notice] =g.remote("fetsite").fetch
redirect_to config_url
end end
end

View File

@@ -14,6 +14,7 @@ class Calendar < ActiveRecord::Base
attr_accessible :name, :public, :picture attr_accessible :name, :public, :picture
has_and_belongs_to_many :calentries has_and_belongs_to_many :calentries
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
belongs_to :rubrik
resourcify resourcify
scope :public, -> { where(:public => :true) } scope :public, -> { where(:public => :true) }
end end

View File

@@ -15,6 +15,7 @@ class Rubrik < ActiveRecord::Base
has_many :neuigkeiten, :class_name => "Neuigkeit" has_many :neuigkeiten, :class_name => "Neuigkeit"
has_many :calentries, :through => :neuigkeiten, :as=>:object has_many :calentries, :through => :neuigkeiten, :as=>:object
resourcify resourcify
has_one :calendar
def moderator def moderator
u=User.with_role(:newsmoderator).first u=User.with_role(:newsmoderator).first
if !u.nil? if !u.nil?

View File

@@ -1,36 +1,29 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<%= render 'fetprofiles/tabs' %> <%= render 'fetprofiles/tabs' %>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h1> <h1>
<%= I18n.t 'fetprofiles.all' if params[:filter] == "all" %> <%= I18n.t 'fetprofiles.all' if params[:filter] == "all" %>
<%= I18n.t 'fetprofiles.active' if params[:filter].nil? || params[:filter]== "active" <%= I18n.t 'fetprofiles.active' if params[:filter].nil? || params[:filter]== "active"
%> %>
</h1> </h1>
</div> <ul class="unstyled">
</div>
<% @fetprofiles.each do |fetprofile| %> <% @fetprofiles.each do |fetprofile| %>
<div class="row-fluid"> <li>
<%= link_to fetprofile do %> <%= link_to fetprofile do %>
<div class="span3"> <span class="pull-left">
<%= image_tag fetprofile.picture.portrait.url %> <%= image_tag fetprofile.picture.portrait.url %>
</div> </span>
<div class="span9"> <div class="">
<h2><%= fetprofile.name %></h2> <h2><%= fetprofile.name %></h2>
<p><%= fetprofile.fetmail %></p> <p><%= fetprofile.fetmail %></p>
<p><%= fetprofile.desc %></p> <p><%= fetprofile.desc %></p>
</div> <% end %>
</div> </div>
<% end %> <% end %>
</li>
<% end %>
</ul>
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<%= link_to 'New Fetprofile', new_fetprofile_path %> <%= link_to I18n.t('fetprofiles.new'), new_fetprofile_path %>
</div></div></div> </div></div></div>

View File

@@ -14,7 +14,7 @@
<%= @fetprofile.desc %> <%= @fetprofile.desc %>
</p> </p>
<p> <p>
<%= "<b>Aktiv</b>".html_safe if @fetprofile.active %> <%= "<b>"+I18n.t('fetprofiles.active')+"</b>".html_safe if @fetprofile.active %>
</p> </p>
<p><%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></p> <p><%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></p>
</div> </div>

View File

@@ -1,4 +1,4 @@
<h1>Listing galleries</h1> <h1><%= I18n.t('fotos.galleries')%></h1>
<%= %> <%= %>
<div class="container-fluid"> <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
@@ -23,4 +23,4 @@
</div </div
<br /> <br />
<%= link_to 'New Gallery', new_gallery_path %> <%= link_to I18n.t('fotos.new-gallery'), new_gallery_path %>

View File

@@ -1,12 +1,7 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<%= render 'fetprofiles/tabs' %> <%= render 'fetprofiles/tabs' %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
</div> <div class="container-fluid">
</div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span12">
<h1> <h1>
<%= @gremium.name %> <%= @gremium.name %>
</h1> </h1>
@@ -15,27 +10,22 @@
<%= @gremium.desc %> <%= @gremium.desc %>
</p> </p>
</div> </div>
</div>
<% @gremium.memberships.order(:typ).active.each_slice(4) do |r| %> <% @gremium.memberships.order(:typ).active.each_slice(4) do |r| %>
<div class="row-fluid"><% r.each do |m| %> <div class="row-fluid">
<% r.each do |m| %>
<%= link_to m.fetprofile do %> <%= link_to m.fetprofile do %>
<div class="span3" style="vertical-align:middle; text-align:center"> <div class="span3" style="vertical-align:middle; text-align:center">
<%= image_tag m.fetprofile.picture.portrait %> <%= image_tag m.fetprofile.picture.portrait %>
<p> <p>
<%= m.fetprofile.name %> <br><%= render(m) %> <%= m.fetprofile.name %> <br>
<%= render(m) %>
</p> </p>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
<%= link_to 'Edit', edit_gremium_path(@gremium) %> |
</div>
</div> </div>
<%= link_to I18n.t('common.edit'), edit_gremium_path(@gremium) %>
</div>

View File

@@ -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 %>

View File

@@ -1,25 +1,17 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<%= render 'rubriken/tabs' %> <%= render 'rubriken/tabs' %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
</div>
</div>
<div class="row-fluid">
<div class="span9">
<%= @neuigkeit.rubrik.name %>
</div>
<div class="span3">
<span>
<%= @neuigkeit.rubrik.name %>
</span>
<span class="pull-right">
<%= @neuigkeit.author.email.to_s unless @neuigkeit.try(:author).try(:email).to_s %> <%= @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? %> <%= "am " + I18n.l(@neuigkeit.try(:datum).try(:to_date)) unless @neuigkeit.try(:datum).try(:to_date).nil? %>
</div> </span>
</div>
<div class="row-fluid">
<div class="span12">
<div class="media"> <div class="media">
<div class="pull-left" href="#"> <div class="pull-left" href="#">
<p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.url %></p> <p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.url %>
</p>
</div> </div>
<div class="media-body"> <div class="media-body">
<h1><%= link_to @neuigkeit.title,rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit) %></h1> <h1><%= link_to @neuigkeit.title,rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit) %></h1>
@@ -27,6 +19,5 @@
<p></p> <p></p>
</div> </div>
</div> </div>
</div>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %> <%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>

View File

@@ -3,7 +3,6 @@
<ul class="unstyled" style="max-width:70em"> <ul class="unstyled" style="max-width:70em">
<% @neuigkeiten.each do |n| %> <% @neuigkeiten.each do |n| %>
<li><%= render n %> </li> <li><%= render n %> </li>
<% end %> <% end %>
</ul> </ul>

View File

@@ -1,37 +1,34 @@
<%= render 'tabs' %> <%= render 'tabs' %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<div class="row-fluid">
<span class="span12">
<h1><%= @rubrik.name %></h1> <h1><%= @rubrik.name %></h1>
<p> <p>
<%= @rubrik.desc %> <%= @rubrik.desc %>
</p> </p>
<b>Moderatoren:</b><i> <b>Moderatoren:</b>
<i>
<% @moderatoren.each do |m|%> <% @moderatoren.each do |m|%>
<%= m.email%>, <%= m.email%>,
<% end%></i> <% end%>
</span> </i>
</div>
<% @rubrik.neuigkeiten.each_slice(2) do |row| %>
<div class="row-fluid"> <% @rubrik.neuigkeiten.each_slice(1) do |row| %>
<ul class="unstyled" style="max-width:70em">
<% row.each do |neuigkeit| %> <% row.each do |neuigkeit| %>
<div class="span6 min-width:13em;"> <li>
<%= render neuigkeit %> <%= render neuigkeit %>
</li>
</div>
<% end %> <% end %>
</div> </ul>
<% end %> <% end %>
<div class="row-fluid">
<span class="span12">
<%= link_to 'Verwalten', verwalten_rubrik_path(@rubrik) %> | <%= link_to 'Verwalten', verwalten_rubrik_path(@rubrik) %> |
<%= link_to '<i class="icon-plus-sign"></i>'.html_safe+"Neuer Artikel", new_rubrik_neuigkeit_path(@rubrik) %> <%= link_to '<i class="icon-plus-sign"></i>'.html_safe+"Neuer Artikel", new_rubrik_neuigkeit_path(@rubrik) %>
</span></div>
<%= toolbar_html(@toolbar_elements)%> <%= toolbar_html(@toolbar_elements)%>

View File

@@ -7,7 +7,7 @@ de:
edit: "Bearbeiten" edit: "Bearbeiten"
actions: "Aktionen" actions: "Aktionen"
delete: "Löschen" delete: "Löschen"
verwalten: "Verwalten"
home: home:
mtitle: "Menu" mtitle: "Menu"
willkommen: "Willkommen bei der Fachschaft Elektrotechnik" willkommen: "Willkommen bei der Fachschaft Elektrotechnik"

View File

@@ -1,5 +1,4 @@
Fetsite::Application.routes.draw do Fetsite::Application.routes.draw do
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
resources :home, :only=>[:index] resources :home, :only=>[:index]
#get 'home',:controller=>home,:action=>:index,:as=>"home_index" #get 'home',:controller=>home,:action=>:index,:as=>"home_index"
@@ -7,10 +6,8 @@
resources :users, :only => [:index] resources :users, :only => [:index]
get 'users/:id/add_role/:role', :controller=>:users, :action=>:add_role, :as=>'user_add_role' 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 'users/:id/do_confirm', :controller=>:users, :action=>:do_confirm, :as=>'user_do_confirm'
get 'config',:controller=>:config,:action=>:index , :as => 'config' 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 devise_for :users