modifs diverses (voir todo)

This commit is contained in:
Nicolas Bally 2021-03-03 18:43:35 +01:00
parent 44912efc1e
commit fc405e6a84
4 changed files with 30 additions and 10 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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))