Permalink
Browse files

Views for invitations

  • Loading branch information...
1 parent 0f92c8e commit cfb89e41e9c3dedb5675e79d2c7675294973c431 @adiezbal adiezbal committed Jun 27, 2011
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,14 @@
+class InvitationsController < ApplicationController
+
+ def new
+
+ end
+
+ def create
+ puts "You have introduced the following e-mail addresses: "
+ puts params[:mails]
+ puts "And you have added the following message: "
+ puts params[:message]
+ redirect_to new_invitation_path
+ end
+end
@@ -0,0 +1,33 @@
+<% content_for :javascript do %>
+ $(function() {
+ $(".invitation_form").validate();
+ });
+<% end %>
+
+<br class="clearfloat" />
+<div class="space_center"></div>
+<div class="space_center"></div>
+
+<h2><%=t('invitation.other')%></h2>
+
+<%= form_tag invitations_path, :method=> :post, :class => "invitation_form" do %>
+
+ <div class="block">
+ <div class="form_row form_label ">
+ <%= label_tag t('invitation.e-mails')%>
+ </div>
+ <div class="form_row">
+ <%= text_field_tag 'mails', nil, :class => "email form_tag" %>
+ </div>
+ <div class="form_row form_label">
+ <%=t('invitation.text')%>
+ </div>
+ <div class="form_row">
+ <%= text_area_tag 'message', nil, :class => "form_tag", :maxlength => 500, :rows => 10 %>
+ </div>
+ </div>
+
+ <div class="form_row space_center">
+ <%= submit_tag t('action.send'), :class => "button" %>
+ </div>
+<%end%>
@@ -0,0 +1,16 @@
+<% toolbar %>
+
+<% content_for :sidebar do %>
+ <%= render :partial => "home/sidebar" %>
+<% end %>
+
+<% content_for :headers do %>
+ <%= javascript_include_tag 'jquery.validate' %>
+ <%= stylesheet_link_tag "jquery-ui", :media => "screen, projection" %>
+<% end %>
+
+<%= location(
+ link_to(image_tag("btn/btn_invitation.png", :class => "menu_icon")+t('invitation.other'), new_invitation_path)
+) %>
+
+<%= render :partial => 'new' %>
@@ -25,5 +25,9 @@
<%= render :partial => 'toolbar/home_menu_options_subjects' %>
<% end %>
+<%= menu_options[:invitations] || capture do %>
+ <%= render :partial =>'toolbar/invitations_menu'%>
+<% end %>
+
</ul>
@@ -0,0 +1,3 @@
+<li>
+ <%= link_to( image_tag("btn/btn_invitation.png", :class => "menu_icon")+t('invitation.other'), new_invitation_path) %>
+</li>
View
@@ -160,6 +160,11 @@ en:
home: "Home"
inbox:
one: "Inbox"
+ invitation:
+ e-mails: "E-mail address"
+ one: "Invitation"
+ other: "Invitations"
+ text: "Write your own message"
like:
n:
one: "1 fan"
View
@@ -51,6 +51,8 @@
resources :messages
resources :conversations
+
+ resources :invitations
resources :notifications do
collection do

0 comments on commit cfb89e4

Please sign in to comment.