Merge branch 'master' of github.com:fetsite/fetsite

This commit is contained in:
Thomas Blazek
2013-08-22 19:23:17 +02:00
9 changed files with 32 additions and 24 deletions

View File

@@ -18,5 +18,5 @@ class Calentry < ActiveRecord::Base
def name def name
summary summary
end end
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) }
end end

View File

@@ -6,4 +6,5 @@ class Fetprofile < ActiveRecord::Base
def name def name
[vorname, nachname, "(",short,")"].join(" ") [vorname, nachname, "(",short,")"].join(" ")
end end
scope :active, -> { where(:active=>:true).order(:vorname) }
end end

View File

@@ -1,23 +1,25 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<h1>Listing fetprofiles</h1> <h1>Listing fetprofiles</h1>
</div>
</div>
<ul>
<% @fetprofiles.each do |fetprofile| %> <% @fetprofiles.each do |fetprofile| %>
<li> <div class="row-fluid">
<%= %> <div class="span3">
<td><%= fetprofile.vorname %></td> <%= image_tag fetprofile.picture.portrait.url %>
<td><%= fetprofile.nachname %></td> </div>
<td><%= fetprofile.short %></td> <div class="span9">
<td><%= fetprofile.fetmailalias %></td>
<td><%= fetprofile.desc %></td>
<td><%= fetprofile.active %></td> <h2><%= link_to fetprofile.name, fetprofile %></h2>
<td><%= link_to 'Show', fetprofile %></td> <p><%= fetprofile.fetmailalias %></p>
<td><%= link_to 'Edit', edit_fetprofile_path(fetprofile) %></td> <p><%= fetprofile.desc %></p>
<td><%= link_to 'Destroy', fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></td> <p><%= fetprofile.active %> </p>
</li> </div>
</div>
<% end %> <% end %>
</ul> <div class="row-fluid">
<div class="span12">
<br />
<%= link_to 'New Fetprofile', new_fetprofile_path %> <%= link_to 'New Fetprofile', new_fetprofile_path %>
</div></div></div>

View File

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

View File

@@ -33,7 +33,7 @@
<div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery"> <div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
<% @gallery.fotos.each do |f| %> <% @gallery.fotos.each do |f| %>
<a href="<%= f.datei.url%>" title="<%=f.title%>" data-gallery="gallery"> <a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
<%=image_tag(f.datei.big_thumb.url,{:class=>"img-polaroid"}) %></a> <%=image_tag(f.datei.big_thumb.url,{:class=>"img-polaroid"}) %></a>

View File

@@ -4,6 +4,7 @@
Falls noch nicht installiert, GIT installieren Falls noch nicht installiert, GIT installieren
<pre>sudo apt-get install git git-cola</pre> <pre>sudo apt-get install git git-cola</pre>
Repository auf Github forken und dann auf dem Rechner clonen. Repository auf Github forken und dann auf dem Rechner clonen.
Den folgenden Befehl im Verzeichnis in das gekont werden soll ausführen.
<pre>git clone https://github.com/<github username>/fetsite</pre> <pre>git clone https://github.com/<github username>/fetsite</pre>
<h2>Ruby on Rails installieren </h2> <h2>Ruby on Rails installieren </h2>
Ruby 1.9 installieren wobei wichtig ist, dass die Version 1.9 ist Ruby 1.9 installieren wobei wichtig ist, dass die Version 1.9 ist
@@ -12,6 +13,7 @@ Falls mehrere Ruby Versionen installiert ist mit
<pre> sudo update-alternatives --config ruby</pre> <pre> sudo update-alternatives --config ruby</pre>
überprüfen, dass Ruby 1.9 verwendet wird. überprüfen, dass Ruby 1.9 verwendet wird.
<pre>sudo apt-get install rubygems1.9</pre> <pre>sudo apt-get install rubygems1.9</pre>
Im angelegten Verzeichnis den bundle installer ausführen.
<pre>sudo gem install bundler</pre> <pre>sudo gem install bundler</pre>
ImageMagick,sqlite3 installieren ImageMagick,sqlite3 installieren
<pre>sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs</pre> <pre>sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs</pre>

View File

@@ -13,6 +13,8 @@
</li> </li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li> <li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li> <li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li> <li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
<li><%= link_to "Kalender", calendars_path %></li> <li><%= link_to "Kalender", calendars_path %></li>
<li class="divider"></li> <li class="divider"></li>

View File

@@ -7,7 +7,7 @@ Devise.setup do |config|
config.mailer_sender = "test@example.com" config.mailer_sender = "test@example.com"
# Configure the class responsible to send e-mails. # Configure the class responsible to send e-mails.
# config.mailer = "Devise::Mailer" config.mailer = "Devise::Mailer"
config.mailer.default_url_options = { :host => 'glonass.htu.tuwien.ac.at' } config.mailer.default_url_options = { :host => 'glonass.htu.tuwien.ac.at' }
config.mailer.delivery_method = :sendmail config.mailer.delivery_method = :sendmail
# config.mailer.smtp_settings = { # config.mailer.smtp_settings = {

View File

@@ -16,7 +16,8 @@ de:
studien: "Studien" studien: "Studien"
news: "Neuigkeiten" news: "Neuigkeiten"
info: "Information" info: "Information"
mitarbeiter: "Mitarbeiter"
fotos: "Fotos"
formtastic: formtastic:
titles: titles:
modul: modul: