tabs fuer fetprofile

This commit is contained in:
Andreas Stephanides
2013-11-02 13:07:00 +01:00
parent f46bae52dc
commit 0eeafa6ef2
2 changed files with 12 additions and 14 deletions

View File

@@ -20,6 +20,8 @@ class FetprofilesController < ApplicationController
# GET /fetprofiles/1.json # GET /fetprofiles/1.json
def show def show
@fetprofile = Fetprofile.find(params[:id]) @fetprofile = Fetprofile.find(params[:id])
@gremientabs = Gremium.tabs
if params["verwalten"] if params["verwalten"]
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('fetprofile.newmembership'),:path => new_fetprofile_membership_path(@fetprofile) , :confirm=>"Sure?" } if can? :new, Membership @toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('fetprofile.newmembership'),:path => new_fetprofile_membership_path(@fetprofile) , :confirm=>"Sure?" } if can? :new, Membership
@toolbar_elements << {:hicon=>'icon-pencil', :text=> I18n.t('common.edit'),:path => edit_fetprofile_path(@fetprofile),:confirm=>"Sure?" } if can? :edit, @fetprofile @toolbar_elements << {:hicon=>'icon-pencil', :text=> I18n.t('common.edit'),:path => edit_fetprofile_path(@fetprofile),:confirm=>"Sure?" } if can? :edit, @fetprofile

View File

@@ -1,10 +1,11 @@
<%= render 'fetprofiles/tabs' %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<div class="container-fluid"> <div style="max-width:70em">
<div class="row-fluid"> <div class="media">
<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="media-body">
<h2><%= @fetprofile.name %></h2> <h2><%= @fetprofile.name %></h2>
<p> <p>
<%= @fetprofile.fetmailalias %> <%= @fetprofile.fetmailalias %>
@@ -12,14 +13,7 @@
<p> <p>
<%= @fetprofile.desc %> <%= @fetprofile.desc %>
</p> </p>
<p>
</p>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<ul> <ul>
<% @fetprofile.memberships.each do |m| %> <% @fetprofile.memberships.each do |m| %>
<li> <li>
@@ -29,6 +23,8 @@
</li> </li>
<% end %> <% end %>
</ul> </ul>
<%= render 'layouts/pretty_toolbar' %>
</div> </div>
</div></div> </div>
</div>
<%= render 'layouts/pretty_toolbar' %>