debug
This commit is contained in:
parent
76748394ac
commit
06a595570f
@ -2,7 +2,20 @@
|
|||||||
@import "fontawesome/font-awesome";
|
@import "fontawesome/font-awesome";
|
||||||
@import "./redactor";
|
@import "./redactor";
|
||||||
|
|
||||||
.download_content a{
|
.translucide{
|
||||||
|
max-width: 900px;
|
||||||
|
padding: 30px;
|
||||||
|
margin: 20px auto ;
|
||||||
|
background:rgba(255,255,255,.7);
|
||||||
|
border-radius :5px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||||
|
color:rgba(0,0,0,.5);
|
||||||
|
label{ color:rgba(0,0,0,.5); }
|
||||||
|
p:last-child{ margin-bottom:0px;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.download_link a{
|
||||||
|
|
||||||
display:block;
|
display:block;
|
||||||
padding:5px 10px;
|
padding:5px 10px;
|
||||||
|
@ -53,7 +53,7 @@ class Admin::StudentGroupsController < ApplicationController
|
|||||||
@student_group = StudentGroup.find(params[:id])
|
@student_group = StudentGroup.find(params[:id])
|
||||||
|
|
||||||
@student_group.destroy if @student_group != @current_student_group
|
@student_group.destroy if @student_group != @current_student_group
|
||||||
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -29,17 +29,26 @@ class Student::StudentUsersController < ApplicationController
|
|||||||
@user = StudentUser.new(params.require(:student_user).permit!)
|
@user = StudentUser.new(params.require(:student_user).permit!)
|
||||||
@user.lock = true
|
@user.lock = true
|
||||||
@user.locked_at = Time.now
|
@user.locked_at = Time.now
|
||||||
if @user.save
|
if params[:conditions]
|
||||||
|
if @user.save
|
||||||
|
|
||||||
@user.authenticate(params[:password])
|
@user.authenticate(params[:password])
|
||||||
session[:student_user_id] = @user.id
|
session[:student_user_id] = @user.id
|
||||||
redirect_to student_root_path, notice: "Vous êtes désormais inscrit."
|
|
||||||
|
StudentMails.new_account_admin(@user).deliver
|
||||||
|
|
||||||
|
redirect_to student_root_path, notice: "Vous êtes désormais inscrit. Vous pourrez vous connecter une fois votre compte vérifié."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
render :action => "new"
|
render :action => "new"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
@condition_error = true
|
||||||
|
render :action => "new"
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -8,6 +8,12 @@ class StudentMails < ActionMailer::Base
|
|||||||
@options = options
|
@options = options
|
||||||
mail(:to => student_user.email, :subject => "Réinitialisation de votre mot de passe.")
|
mail(:to => student_user.email, :subject => "Réinitialisation de votre mot de passe.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def new_account_admin(student_user)
|
||||||
|
mail(:to => "genevieve.gagos@technique-eft.com", :subject => "Nouvel étudiant inscrit.")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
class StudentGroup < ActiveRecord::Base
|
class StudentGroup < ActiveRecord::Base
|
||||||
|
|
||||||
has_many :student_user_groups
|
has_many :student_user_groups
|
||||||
has_many :student_user, :through => :student_user_groups
|
has_many :student_users, :through => :student_user_groups
|
||||||
|
|
||||||
has_many :topic_student_groups
|
has_many :topic_student_groups
|
||||||
has_many :topics, :through => :topic_student_groups
|
has_many :topics, :through => :topic_student_groups
|
||||||
|
@ -15,6 +15,6 @@
|
|||||||
%td{:style => "width:100px;"}
|
%td{:style => "width:100px;"}
|
||||||
=link_to i(:"download"), data_file.file.url
|
=link_to i(:"download"), data_file.file.url
|
||||||
|
|
||||||
= link_to i(:trash), admin_data_file_path(:id => data_file.id, :manager => params[:manager], :multiple => params[:multiple]), :data => {:confirm => 'Voulez-vous vraiment supprimer cette image ?'}, :method => :delete, :remote => true
|
= link_to i(:"trash-o"), admin_data_file_path(:id => data_file.id, :manager => params[:manager], :multiple => params[:multiple]), :data => {:confirm => 'Voulez-vous vraiment supprimer cette image ?'}, :method => :delete, :remote => true
|
||||||
= link_to i(:ok), "#",:onclick => "manager_send_data_file("+data_file.id.to_s+");return false;" if params[:manager] and !params[:multiple]
|
= link_to i(:"check"), "#",:onclick => "manager_send_data_file("+data_file.id.to_s+");return false;" if params[:manager] and !params[:multiple]
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
= link_to i(:pencil),edit_admin_file_folder_url(:id => params[:file_folder_id], :file_folder_id => params[:file_folder_id], :manager => params[:manager], :multiple => params[:multiple]), :remote => true, :id => "edit_current_file_folder", :style => "display:inline-block; margin-right:5px;"
|
= link_to i(:pencil),edit_admin_file_folder_url(:id => params[:file_folder_id], :file_folder_id => params[:file_folder_id], :manager => params[:manager], :multiple => params[:multiple]), :remote => true, :id => "edit_current_file_folder", :style => "display:inline-block; margin-right:5px;"
|
||||||
|
|
||||||
= link_to i(:trash), admin_file_folder_url(:id => params[:file_folder_id],:file_folder_id => params[:file_folder_id], :manager => params[:manager], :multiple => params[:multiple]), :remote => true, :id => "remove_current_file_folder", :method => :delete, :confirm => "Voulez-vous vraiment supprimer cet file_folder ? Attention, toutes les images de celui-ci seront définitivement supprimées.", :style => "display:inline-block;"
|
= link_to i(:"trash-o"), admin_file_folder_url(:id => params[:file_folder_id],:file_folder_id => params[:file_folder_id], :manager => params[:manager], :multiple => params[:multiple]), :remote => true, :id => "remove_current_file_folder", :method => :delete, :confirm => "Voulez-vous vraiment supprimer cet file_folder ? Attention, toutes les images de celui-ci seront définitivement supprimées.", :style => "display:inline-block;"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
45
app/views/admin/student_groups/_show.haml
Normal file
45
app/views/admin/student_groups/_show.haml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
.content
|
||||||
|
%h2
|
||||||
|
Liste des étudiants du groupe :
|
||||||
|
=@student_group.name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%table.table.table-hover
|
||||||
|
%thead#Admin_rows_header.rows_header
|
||||||
|
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
|
||||||
|
%td
|
||||||
|
Nom
|
||||||
|
%td
|
||||||
|
Adresse
|
||||||
|
%td
|
||||||
|
Email
|
||||||
|
%td
|
||||||
|
Téléphone
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%tbody#admin_rows.rows
|
||||||
|
|
||||||
|
=render @student_group.student_users
|
||||||
|
|
||||||
|
.actions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
|||||||
%tr.vertical_center.student_group#student_group{:id => student_group.id}
|
%tr.vertical_center.student_group#student_group_row{:id => student_group.id}
|
||||||
|
|
||||||
%td=student_group.name
|
%td=student_group.name
|
||||||
|
|
||||||
%td.actions
|
%td.actions
|
||||||
= link_to i(:"trash-o"), [:admin, student_group], :confirm => 'Voulez-vous vraiment supprimer cet utilisateur ?', :method => :delete, :remote => true
|
= link_to i(:"trash-o"), [:admin, student_group], :confirm => 'Voulez-vous vraiment supprimer cet utilisateur ?', :method => :delete, :remote => true
|
||||||
|
|
||||||
= link_to i(:pencil), edit_admin_student_group_path(student_group)
|
= link_to i(:pencil), edit_admin_student_group_path(student_group), :remote => true
|
||||||
|
|
||||||
|
= link_to i(:eye), [:admin, student_group], :remote => true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Nom
|
Nom
|
||||||
|
|
||||||
|
|
||||||
%td{:style => "width:100px"}
|
%td{:style => "width:120px"}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
app/views/admin/student_groups/show.js.erb
Normal file
1
app/views/admin/student_groups/show.js.erb
Normal file
@ -0,0 +1 @@
|
|||||||
|
show_pane_hover("<%= escape_javascript(render(:partial => "show"))%>",700,900);
|
@ -17,10 +17,12 @@
|
|||||||
=student_user.tel
|
=student_user.tel
|
||||||
%td
|
%td
|
||||||
="Verouillé" if student_user.lock
|
="Verouillé" if student_user.lock
|
||||||
%td.actions
|
|
||||||
= link_to i(:"trash-o"), [:admin, student_user], :confirm => 'Voulez-vous vraiment supprimer cet utilisateur ?', :method => :delete, :remote => true
|
|
||||||
|
|
||||||
= link_to i(:pencil), edit_admin_student_user_path(student_user)
|
-if !@student_group
|
||||||
|
%td.actions
|
||||||
|
= link_to i(:"trash-o"), [:admin, student_user], :confirm => 'Voulez-vous vraiment supprimer cet utilisateur ?', :method => :delete, :remote => true
|
||||||
|
|
||||||
|
= link_to i(:pencil), edit_admin_student_user_path(student_user)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
.portlet.download_content
|
.download_link
|
||||||
=link_to ic(:"cloud-download")+raw(" ")+input.title.to_s, input.data_file.file.url
|
=link_to ic(:"cloud-download")+raw(" ")+input.title.to_s, input.data_file.file.url
|
||||||
|
|
||||||
|
|
||||||
-else
|
-else
|
||||||
|
|
||||||
.portlet.download_content
|
.download_link
|
||||||
=link_to input.title.to_s, ""
|
=link_to input.title.to_s, ""
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.form-signin
|
.translucide
|
||||||
|
|
||||||
%h1 M'inscrire
|
%h1 M'inscrire
|
||||||
|
|
||||||
@ -6,8 +6,37 @@
|
|||||||
= semantic_form_for [:student, @user] do |f|
|
= semantic_form_for [:student, @user] do |f|
|
||||||
=render :partial => "form_min", :locals => {:f => f}
|
=render :partial => "form_min", :locals => {:f => f}
|
||||||
|
|
||||||
|
%h2 Conditions relatives à cet espace.
|
||||||
|
.pad{:style => "border:1px solid rgba(66,139,202,1);"}
|
||||||
|
%p Ce nouveau service est uniquement réservé à ceux de mes étudiants qui s’investissent dans leur supervision individuelle.
|
||||||
|
Il complète cette supervision mais ne la remplace pas. De ce fait l’étudiant qui cesserait l’envoi des cas serait immédiatement radié de cet espace.
|
||||||
|
|
||||||
|
%p Vous y trouverez différentes ressources que je mettrai à votre disposition au fil des semaines et mois à venir, afin de vous permettre d'affiner votre pratique personnelle de l'EFT par l'étude d'autres cas supervisés ou de retranscrits de séances dignes d’intérêts.
|
||||||
|
|
||||||
|
%p Ces documents doivent impérativement rester dans le cadre de la formation et sont donc soumis au secret professionnel propre à la formation.
|
||||||
|
Ils ne peuvent être ni partagés avec d'autres, ni servir pour votre communication, ni pour tout autre utilisation que le caractère consultatif pour lequel ils sont ici stockés.
|
||||||
|
|
||||||
|
%p Le seul fait de vous inscrire sur cet espace engage votre totale responsabilité dans le respect des conditions ci-dessus.
|
||||||
|
Tout contrevenant sera passible de poursuites. Je serai intransigeante !
|
||||||
|
%br
|
||||||
|
-if @condition_error
|
||||||
|
.alert.alert-danger
|
||||||
|
Vous devez accepter les conditions relatives à cet espace.
|
||||||
|
%p
|
||||||
|
=check_box_tag :conditions, true, params[:conditions]
|
||||||
|
=label_tag :conditions, "J'accepte les conditions relatives à cet espace."
|
||||||
%br
|
%br
|
||||||
=f.submit "Sauvegarder", :class => "btn btn-primary"
|
=f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
%p J'espère que cet espace vous rendra le service pour lequel il a été spécifiquement créé.
|
||||||
|
|
||||||
|
%p N'hésitez pas à me faire part de vos commentaires directement par messagerie.
|
||||||
|
|
||||||
|
%p J'en tiendrai compte selon leur pertinence et dans la mesure de mes %p possibilités.
|
||||||
|
|
||||||
|
%p À bientôt
|
||||||
|
|
||||||
|
%p Geneviève
|
||||||
|
|
||||||
|
|
6
app/views/student_mails/new_account_admin.haml
Normal file
6
app/views/student_mails/new_account_admin.haml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
%p
|
||||||
|
Un nouvel étudiant c'est inscrit :
|
||||||
|
%p{:style => "text-align:center;"}
|
||||||
|
-url = "http://ecole-eft-france.fr/admin"
|
||||||
|
=link_to url, url
|
Loading…
x
Reference in New Issue
Block a user