=render :partial => "public/my_account/menu"
.center.padding
-if !current_annonce_account.enabled
.alert.alert-warning
%h1
=qit("account-index-h1", "Vous devez valider votre adresse mail.")
%p
=qit("account-index-p1", "Vous avez du recevoir un message pour valider votre adresse mail. Tant que vous n'aurez pas cliquer sur le lien présent sur ce mail votre compte ne sera pas activé.")
%p
=qit("account-index-p2", "Le mail a été envoyé à l'adresse :")
%strong= current_annonce_account.email
=link_to qit("account-index-link1, ""renvoyer le mail de confirmation"), public_reconfirm_email_path, :class => "btn btn-primary"
.padding
%h2{:style => "text-align:center;line-height:1.5em;"}
=link_to public_annonce_account_path(current_annonce_account) do
.binary_account{:class => ""}
=image_tag(current_annonce_account.avatar_url)
=# current_annonce_account.parent.pseudo
=qit("account-index-h21", "Bonjour")
-if current_annonce_account.firstname?
=current_annonce_account.firstname.to_s+","
-else
=current_annonce_account.organisation.to_s+","
%br
-if current_annonce_account.annonces.valid_to_show.count > 0
Vous avez
-if current_annonce_account.annonces.valid_to_show.count > 1
=current_annonce_account.annonces.valid_to_show.count
=qit("account-index-annonces-publie1", "annonces publiées,")
-else
=qit("account-index-annonces-publie2", "1 annonce publiée,")
%br
=qit("account-index-br1", "n'hésitez pas à en déposer d'autres,")
%br
=qit("account-index-br2", "c'est facile et gratuit !")
-else
=qit("account-index-else1", "Vous n'avez pas d'annonces publiées,")
%br
=qit("account-index-br3", "n'hésitez pas à en déposer une.")
%br
=qit("account-index-br4", "C'est facile et gratuit !")
%div
%br
%center
= link_to raw("")+ic(:"pencil-square-o")+raw(" ")+qit("create-ad")+raw(""), new_public_annonce_path, :class => "btn btn-primary"
%br
%br
-if !current_annonce_account.uid?
.facebook_connexion.blue_background{:style => "padding:2em 0;padding-top:3.5em;background:rgba(51,141,232,1);color:white;margin-bottom:1em;"}
%p{:style => "text-align:center;"}
=qit("account-index-p3", "Vous avez un compte facebook ? Liez votre compte Sideplace en deux clics ! Vous pourrez ensuite vous connecter directement par Facebook.")
%p{:style => "text-align:center;"}
=link_to i(:facebook) + raw(" Lier mon compte Facebook") , "/auth/facebook" , style: "background-color:#3b5998;color:white;", class: "btn btn-lg"
%p{:style => "text-align:center;font-size:0.9em;color:white;"}
=qit("account-index-p5", "Sideplace ne publiera rien sur votre compte Facebook.")
%br
=qit("account-index-br5", "Les autres utilisateurs Sideplace ne verront pas votre compte Facebook sans votre accord.")
-if params[:fb_alert]
.alert.alert-danger{:style => "margin:auto;max-width:800px;"}
=flash[:alert]
.annonce_account_dashboard
.row
.col-md-4
.panel.panel-default
.panel-heading
Crédits
.panel-body{:style => "text-align:center;"}
=render :partial => "public/my_account/solde_credits"
-if current_annonce_account.parent
.col-md-4
.panel.panel-default
.panel-heading
=qit("account-index-panel-heading2", "Votre recommandeur :")
.panel-body
=link_to public_annonce_account_path(current_annonce_account.parent) do
.binary_account{:class => ""}
=image_tag(current_annonce_account.parent.avatar_url)
= current_annonce_account.parent.pseudo
-if current_annonce_account.callif_now
.col-md-4
.panel.panel-default
.panel-heading
=qit("account-index-panel-heading2", "Mes commissions")
.panel-body
=qit("account-index-panel-body2", "Le solde de vos commissions :")
%table.table
-Devise.where(:orderable => true).all.each do |devise|
%tr
%td
=devise.name
%td
=number_to_currency current_annonce_account.solde_commissions(devise.id), :unit => devise.icon
.row
-if current_annonce_account.callif_now
.col-md-6
.panel.panel-default
.panel-heading
=qit("account-index-panel-heading3", "Programme d'affiliation")
.panel-body
%p
=qit("account-index-panel-body3", "Mon statut :")
%strong=current_annonce_account.callif_now[0]
%p
=qit("account-index-p10", "Avec le statut")
%strong=current_annonce_account.callif_now[0]
=qit("account-index-strong01", "voici les commissions que vous obtenez sur les achats de crédits effectués par vos affiliés directs et indirects :")
%table.table
-i = 0
-while i < current_annonce_account.callif_now[5]
-i += 1
%tr
%td
=qit("account-index-td01", "Génération")
=i
%td
=current_annonce_account.callif_now[4][i]
="%"
%p
-if current_annonce_account.binary_active_count >= 5
=qit("account-index-p11", "Comme vous avez déjà 5 affiliés ayant effectué des achats de crédits d'annonce, vous avez également accès à des commissions sur les générations suivantes :")
-else
=qit("account-index-else11", "Lorsque vous aurez au moins 5 affiliés ayant effectué des achats de crédits d'annonce vous aurez accès à des commissions sur les générations suivantes :")
%table.table
-while i < current_annonce_account.callif_now[6]
-i += 1
%tr
%td
=qit("account-index-generation", "Génération")
=i
%td
=current_annonce_account.callif_now[4][i]
="%"
=#current_annonce_account.mlm_nbr_niveaux
=#current_annonce_account.callif_now[2].to_s+"%"
=#de vos points binaires.
%p
=qit("account-index-participations", "Nombre de parts de participations :")
=current_annonce_account.callif_now[3]
.col-md-6
.panel.panel-default
.panel-heading
=qit("account-index-panel-heading-p12", "Recommander le site")
.panel-body
%p
=qit("account-index-p20", "Votre code de recommandation :")
%span{:style => "font-size:1.2em;"}
=current_annonce_account.mlm_token.upcase
%p
=qit("account-index-p21", "Votre lien de recommandation :")
=link_to mlm_token_url(current_annonce_account.mlm_token), mlm_token_url(current_annonce_account.mlm_token)
%p
=qit ("account-index-p22", "Lorsque que quelqu'un s'inscrit avec votre lien de recommandation nous lui offrons 10 crédits gratuits et nous vous en offrons 5, utilisables pour mettre en valeur vos annonces.")
-if current_annonce_account.callif_now
%p
=quit ("account-index-p23", "Votre site de présentation :")
=link_to "http://affiliation-sideplace.com/"+current_annonce_account.mlm_token, "http://affiliation-sideplace.com/"+current_annonce_account.mlm_token
-else
.alert.alert-info
=qit("account-index-p23", "Si vous avez déjà"
=link_to qit("account-index-credits02", "acheté des crédits",) public_credit_products_path
=qit("account-index-credits03", "vous toucherez également des commissions sur ses achats.")
.center
-if current_annonce_account.annonce_photos.refused.count > 0
.alert.alert-danger
%h3 Les photos suivantes ont été refusées
%p Merci de mettre à jour vos annonces en ajoutant des photos respectant les régles de publication
=render :collection => current_annonce_account.annonce_photos.refused, :partial => "public/annonce_photos/refused"
-if current_annonce_account.annonces.count > 0
%h3 Mes annonces :
-if current_annonce_account.annonces.moderated.refused.count > 0
.alert.alert-danger
-if current_annonce_account.annonces.moderated.refused.count > 1
%h4 Annonces refusées
-else
%h4 Annonce refusée
%p Merci de modifier votre annonce et contacter le support pour que nous l'examinions de nouveau
=render :collection => current_annonce_account.annonces.refused, :partial => "public/annonces/line_annonce"
-if current_annonce_account.annonces.not_published.count > 0
.alert.alert-warning
%h4 Annonces que vous n'avez pas encore publié
=render :collection => current_annonce_account.annonces.not_published, :partial => "public/annonces/line_annonce"
-if current_annonce_account.annonces.valid_to_show.count > 0
.alert.alert-success
%h4 Annonces publiées
=render :collection => current_annonce_account.annonces.valid_to_show, :partial => "public/annonces/line_annonce"
-if current_annonce_account.annonces.desactived.count > 0
%h4 Annonces que vous avez désactivé
=render :collection => current_annonce_account.annonces.desactived, :partial => "public/annonces/line_annonce"
-if current_annonce_account.annonces.where(:published => true).not_moderated.count > 0
%h4 Annonces en attente de modération (et potentiellement pas encore visibles) :
=render :collection => current_annonce_account.annonces.where(:published => true).not_moderated, :partial => "public/annonces/line_annonce"