Fetprofiles verbesserung Calentry upcoming

This commit is contained in:
Andreas Stephanides
2013-08-22 16:38:33 +02:00
parent d031e7b855
commit cfcf0be4d5
7 changed files with 28 additions and 21 deletions

View File

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

View File

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

View File

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

View File

@@ -16,7 +16,7 @@
<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>

View File

@@ -4,6 +4,7 @@
Falls noch nicht installiert, GIT installieren
<pre>sudo apt-get install git git-cola</pre>
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>
<h2>Ruby on Rails installieren </h2>
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>
überprüfen, dass Ruby 1.9 verwendet wird.
<pre>sudo apt-get install rubygems1.9</pre>
Im angelegten Verzeichnis den bundle installer ausführen.
<pre>sudo gem install bundler</pre>
ImageMagick,sqlite3 installieren
<pre>sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs</pre>

View File

@@ -14,6 +14,7 @@
<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('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 "Kalender", calendars_path %></li>
<li class="divider"></li>

View File

@@ -17,6 +17,7 @@ de:
news: "Neuigkeiten"
info: "Information"
mitarbeiter: "Mitarbeiter"
fotos: "Fotos"
formtastic:
titles:
modul: