diff --git a/app/controllers/admin/m_odr_reps_controller.rb b/app/controllers/admin/m_odr_reps_controller.rb index 338aed6..6fc6c6e 100644 --- a/app/controllers/admin/m_odr_reps_controller.rb +++ b/app/controllers/admin/m_odr_reps_controller.rb @@ -13,10 +13,17 @@ class Admin::MOdrRepsController < ApplicationController def purge_test @name = "Simion" - @m_odr_reps = @m_odr_reps.where("cc_particular_name LIKE ? or cc_particular_firstname LIKE ?","%#{@name}%", "%#{@name}%") + @m_odr_reps = MOdrRep.where("cc_particular_name LIKE ? or cc_particular_firstname LIKE ?","%#{@name}%", "%#{@name}%") @m_odr_reps.all.each do |mor| mor.destroy end + + @name = "Bally" + @m_odr_reps = MOdrRep.where("cc_particular_name LIKE ? or cc_particular_firstname LIKE ?","%#{@name}%", "%#{@name}%") + @m_odr_reps.all.each do |mor| + mor.destroy + end + end def index diff --git a/app/views/admin/mail_types/_form.html.haml b/app/views/admin/mail_types/_form.html.haml index 433d87e..ac12b96 100644 --- a/app/views/admin/mail_types/_form.html.haml +++ b/app/views/admin/mail_types/_form.html.haml @@ -20,7 +20,14 @@ = form.input :subject = form.input :message = form.hidden_field :lang_site_id - + + %p + -"numero_bon_achat,bon_achat,nom_odr,remise,civilite,nom,prenom".split(",").each do |t| + ="[#{t}]" + + -if current_admin.id == 1 + = form.input :tags + .actions=form.submit "sauvegarder", :class => "btn btn-primary" diff --git a/app/views/layouts/mail.html.haml b/app/views/layouts/mail.html.haml index faa67f5..c2062f3 100755 --- a/app/views/layouts/mail.html.haml +++ b/app/views/layouts/mail.html.haml @@ -11,13 +11,13 @@ -if @m_odr %br %br - - -if @m_odr.logo_image_file - =image_tag "https://"+HOSTNAME+@m_odr.logo_image_file.file.url, :class => "odr_logo", :style => (@m_odr.logo_image_file_width? ? "max-width:#{@m_odr.logo_image_file_width}px;margin:auto;": "") + -if false + -if @m_odr.logo_image_file + =image_tag "https://"+HOSTNAME+@m_odr.logo_image_file.file.url, :class => "odr_logo", :style => (@m_odr.logo_image_file_width? ? "max-width:#{@m_odr.logo_image_file_width}px;margin:auto;": "") - -if @m_odr.banner_image_file - =image_tag "https://"+HOSTNAME+@m_odr.banner_image_file.file.url, :class => "odr_banner", :style => (@m_odr.banner_image_file_width? ? "max-width:#{@m_odr.banner_image_file_width}px;margin:auto;margin-bottom:40px;": "") + -if @m_odr.banner_image_file + =image_tag "https://"+HOSTNAME+@m_odr.banner_image_file.file.url, :class => "odr_banner", :style => (@m_odr.banner_image_file_width? ? "max-width:#{@m_odr.banner_image_file_width}px;margin:auto;margin-bottom:40px;": "") -background = (@m_odr.background_image_file ? "https://"+HOSTNAME+@m_odr.background_image_file.file.url : "") :scss diff --git a/app/views/public/m_odrs/show.html.haml b/app/views/public/m_odrs/show.html.haml index e1d34b6..c1ffa03 100644 --- a/app/views/public/m_odrs/show.html.haml +++ b/app/views/public/m_odrs/show.html.haml @@ -1,7 +1,13 @@ - - --if @m_odr.start_at > Date.today and params[:force].to_s == "" +-if @m_odr.public_end and @m_odr.public_end < Date.today and params[:force].to_s == "" + %div{:style => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"} + %br + Cette opération est terminée + + %br + %br + %br +-elsif @m_odr.start_at > Date.today and params[:force].to_s == "" %div{:style => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"} -count = ((@m_odr.start_at) - (Date.today))