From d031e7b855c011ac0fcf341d8b4f226178b6eefe Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Thu, 22 Aug 2013 15:46:18 +0200 Subject: [PATCH 1/3] Mitarbeiter Menueintrag --- app/views/layouts/menu.html.erb | 1 + config/locales/de.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/menu.html.erb b/app/views/layouts/menu.html.erb index 738252e..c5c383b 100755 --- a/app/views/layouts/menu.html.erb +++ b/app/views/layouts/menu.html.erb @@ -13,6 +13,7 @@
  • <%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %>
  • <%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %>
  • +
  • <%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %>
  • <%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %>
  • <%= link_to "Kalender", calendars_path %>
  • diff --git a/config/locales/de.yml b/config/locales/de.yml index 8ebc3cf..350aba4 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -16,7 +16,7 @@ de: studien: "Studien" news: "Neuigkeiten" info: "Information" - + mitarbeiter: "Mitarbeiter" formtastic: titles: modul: From cfcf0be4d525fd36863af8dee302a9de9dd31638 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Thu, 22 Aug 2013 16:38:33 +0200 Subject: [PATCH 2/3] Fetprofiles verbesserung Calentry upcoming --- app/models/calentry.rb | 2 +- app/models/fetprofile.rb | 1 + app/views/fetprofiles/index.html.erb | 38 ++++++++++++----------- app/views/fetprofiles/show.html.erb | 2 +- app/views/home/setup_fetsite_dev.html.erb | 4 ++- app/views/layouts/menu.html.erb | 1 + config/locales/de.yml | 1 + 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/app/models/calentry.rb b/app/models/calentry.rb index d4c64bc..a69f5de 100644 --- a/app/models/calentry.rb +++ b/app/models/calentry.rb @@ -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 diff --git a/app/models/fetprofile.rb b/app/models/fetprofile.rb index ca5eb35..87a402d 100644 --- a/app/models/fetprofile.rb +++ b/app/models/fetprofile.rb @@ -6,4 +6,5 @@ class Fetprofile < ActiveRecord::Base def name [vorname, nachname, "(",short,")"].join(" ") end + scope :active, -> { where(:active=>:true).order(:vorname) } end diff --git a/app/views/fetprofiles/index.html.erb b/app/views/fetprofiles/index.html.erb index 8f27cff..b005167 100644 --- a/app/views/fetprofiles/index.html.erb +++ b/app/views/fetprofiles/index.html.erb @@ -1,23 +1,25 @@ +
    +
    +

    Listing fetprofiles

    +
    +
    -
      <% @fetprofiles.each do |fetprofile| %> -
    • - <%= %> - <%= fetprofile.vorname %> - <%= fetprofile.nachname %> - <%= fetprofile.short %> - <%= fetprofile.fetmailalias %> - <%= fetprofile.desc %> - - <%= fetprofile.active %> - <%= link_to 'Show', fetprofile %> - <%= link_to 'Edit', edit_fetprofile_path(fetprofile) %> - <%= link_to 'Destroy', fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %> -
    • +
      +
      + <%= image_tag fetprofile.picture.portrait.url %> +
      +
      + +

      <%= link_to fetprofile.name, fetprofile %>

      +

      <%= fetprofile.fetmailalias %>

      +

      <%= fetprofile.desc %>

      +

      <%= fetprofile.active %>

      +
      +
      <% end %> -
    - -
    - +
    +
    <%= link_to 'New Fetprofile', new_fetprofile_path %> +
    diff --git a/app/views/fetprofiles/show.html.erb b/app/views/fetprofiles/show.html.erb index 99e2912..b4e17fc 100644 --- a/app/views/fetprofiles/show.html.erb +++ b/app/views/fetprofiles/show.html.erb @@ -16,7 +16,7 @@

    <%= "Aktiv".html_safe if @fetprofile.active %>

    - +

    <%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %>

    diff --git a/app/views/home/setup_fetsite_dev.html.erb b/app/views/home/setup_fetsite_dev.html.erb index a4f6161..2d7dc0e 100644 --- a/app/views/home/setup_fetsite_dev.html.erb +++ b/app/views/home/setup_fetsite_dev.html.erb @@ -3,7 +3,8 @@

    Git installieren und Repository koperen

    Falls noch nicht installiert, GIT installieren
    sudo apt-get install git git-cola
    -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.
    git clone https://github.com//fetsite

    Ruby on Rails installieren

    Ruby 1.9 installieren wobei wichtig ist, dass die Version 1.9 ist @@ -12,6 +13,7 @@ Falls mehrere Ruby Versionen installiert ist mit
     sudo update-alternatives --config ruby
    überprüfen, dass Ruby 1.9 verwendet wird.
    sudo apt-get install rubygems1.9
    +Im angelegten Verzeichnis den bundle installer ausführen.
    sudo gem install bundler
    ImageMagick,sqlite3 installieren
    sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs
    diff --git a/app/views/layouts/menu.html.erb b/app/views/layouts/menu.html.erb index c5c383b..7b93ae5 100755 --- a/app/views/layouts/menu.html.erb +++ b/app/views/layouts/menu.html.erb @@ -14,6 +14,7 @@
  • <%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %>
  • <%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %>
  • <%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %>
  • +
  • <%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %>
  • <%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %>
  • <%= link_to "Kalender", calendars_path %>
  • diff --git a/config/locales/de.yml b/config/locales/de.yml index 350aba4..e73fab7 100755 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -17,6 +17,7 @@ de: news: "Neuigkeiten" info: "Information" mitarbeiter: "Mitarbeiter" + fotos: "Fotos" formtastic: titles: modul: From 9ec7bdd6cbb25418563b3c96f0fb0087f5d11c7c Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Thu, 22 Aug 2013 17:52:56 +0200 Subject: [PATCH 3/3] fotos - resized --- app/views/galleries/show.html.erb | 2 +- config/initializers/devise.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 7b9e440..521f458 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -32,7 +32,7 @@