diff --git a/app/controllers/light/users_controller.rb b/app/controllers/light/users_controller.rb index a53e4d2..2f98950 100644 --- a/app/controllers/light/users_controller.rb +++ b/app/controllers/light/users_controller.rb @@ -139,7 +139,10 @@ def thank_you private def users_params - params.require(:user).permit(:id, :email_id, :is_subscribed, :joined_on, :source, :username) + params.require(:user).permit( + :id, :email_id, :is_subscribed, :joined_on, :is_blocked, + :sidekiq_status, :source, :username + ) end def user_with_token @@ -154,7 +157,7 @@ def response_message(status) if dummy_token? "#{status.capitalize} successfully!!" elsif @user.nil? - "Hey, it seems request you are trying to access is invalid. If you have any " + + "Hey, it seems request you are trying to access is invalid. If you have any " + "concerns about our newsletter's subscription, kindly get in touch with " + "hr@joshsoftware.com" else diff --git a/app/views/light/users/edit.html.haml b/app/views/light/users/edit.html.haml index a5a2d86..e3b5d9f 100644 --- a/app/views/light/users/edit.html.haml +++ b/app/views/light/users/edit.html.haml @@ -4,12 +4,18 @@ %table %tr %td - = f.input :email_id, input_html:{class: 'span3'} - = f.input :username, input_html:{class: 'span3'} - = f.input :is_subscribed, :as => :select, input_html:{class: 'span3'} - = f.input :joined_on, input_html: { 'data-behaviour' => 'datepicker'}, input_html:{class: 'span3'} - = f.input :source, input_html:{class: 'span3'} - = f.button :submit, class: "btn btn-success controls" + = f.input :email_id, input_html: {class: 'span3'} + = f.input :username, input_html: {class: 'span3'} + = f.input :sent_on, input_html: {class: 'span3', readonly: true} + = f.input :source, input_html: {class: 'span3', readonly: true} + = f.input :joined_on, input_html: { 'data-behaviour': 'datepicker'}, input_html:{class: 'span3', readonly: true} + = f.input :subscribed_at, input_html: {class: 'span3', readonly: true} + = f.input :unsubscribed_at, input_html: {class: 'span3', readonly: true} + = f.input :opt_in_mail_sent_at, input_html: {class: 'span3', readonly: true} + = f.input :sidekiq_status, input_html:{class: 'span3'} + = f.input :is_blocked, as: :select, input_html: {class: 'span3'}, include_blank: false + = f.input :is_subscribed, as: :select, input_html: {class: 'span3'}, include_blank: false + = f.button :submit, class: 'btn btn-success controls' :javascript $('[data-behaviour~=datepicker]').datepicker({ diff --git a/app/views/light/users/index.html.haml b/app/views/light/users/index.html.haml index ce54cf5..5328086 100644 --- a/app/views/light/users/index.html.haml +++ b/app/views/light/users/index.html.haml @@ -51,9 +51,9 @@ %td.text-center= '{{email_id}}' %td.text-center= '{{username}}' %td.text-center - %a{ :href => "/newsletter/users/{{_id.$oid}}/edit", :class => 'btn btn-sm btn-success'} Edit + %a{ :href => "/newsletter/users/{{id}}/edit", :class => 'btn btn-sm btn-success'} Edit - %a{ :href => "/newsletter/users/{{_id.$oid}}", data:{ :confirm => 'Are you sure?', method: 'delete'}, :class => 'btn btn-sm btn-danger' } Delete + %a{ :href => "/newsletter/users/{{id}}", data:{ :confirm => 'Are you sure?', method: 'delete'}, :class => 'btn btn-sm btn-danger' } Delete .col-lg-12.padding_none.pull-right #user_pagination.col-lg-12