.annonce_option_type#annonce_option_type{:id => annonce_option_type.id}
  %h4= annonce_option_type.name
  .price
    =annonce_option_type.cost
    =qit("credits","crédits")
  -if annonce_option_type.periode?
    =annonce_option_type.periode
    =annonce_option_type.periode_type == 1 ? qit("week","Semaine") : qit("month","Mois")

  -if annonce_option_type.cost <= current_annonce_account.solde_credits(Date.today) 
    =link_to qit("commander","commander"), buy_option_public_annonce_path(:id => @annonce.id, :annonce_option_type_id => annonce_option_type.id),:data => {:confirm => "Voulez-vous vraiment acheter cette option en utilisant #{annonce_option_type.cost} crédits ?"}, :class => "btn btn-primary"
  -else
    =link_to qit("acheter-des-credits","acheter des crédits"), public_credit_products_path