redde 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7db06e9218ae6343bcc14a2dd7f22680b620750
4
- data.tar.gz: eef951c975ae0d16d8e0d83fd08499b06ead764e
3
+ metadata.gz: c650f367f9c4c696a0f975c34f1a10287b6507e6
4
+ data.tar.gz: de8fbf3cc2b6690af278d375b674f1a85e4ffa3e
5
5
  SHA512:
6
- metadata.gz: 0cc6de724a9a269574ee2b76032544283f8ef49e159ddb82f71fc45d6cf0d497ef2d82d44d0f005f1a3f489926ee2f4f03397c4a4528ddc079e2f6fbc888b724
7
- data.tar.gz: cbb28953633ae2aae37658fa38c510dbd5ada7026819642e2ee5ef84be3b8259198d36ecda581ab7c2068442e5b41f027cbb6a4aac780626b0d26baca0f65892
6
+ metadata.gz: d2dfb6a0e1eef465be5552e17fea2e27471d1b5b2763b431f9f979132f8e9537c457437f725fc8d60fc27ec0e8f349132d4146987fb0d2a3e7018e3449fdaf69
7
+ data.tar.gz: a763c62d364283ddb495b72e348ff022379934d5e5eccf71fe15c948442057d5f360e946ab6e16dcb98efc4704493925bab3a37d99965d546d24312673401db0
@@ -27,4 +27,10 @@ class Admin::ManagersController < Admin::BaseController
27
27
  @manager.destroy if current_manager.id != @manager.id
28
28
  redirect_to [:admin, :managers], alert: 'Администратор удален'
29
29
  end
30
+
31
+ private
32
+
33
+ def manager_params
34
+ params[:manager].permit!
35
+ end
30
36
  end
@@ -0,0 +1,20 @@
1
+ - content_for :page_header do
2
+ %h1
3
+ - if @manager.new_record?
4
+ Добавить #{taccusative(:manager)}
5
+ - else
6
+ Редактировать #{taccusative(:manager)}
7
+ %p= link_to 'Назад', [:admin, :managers]
8
+
9
+ = form_for [:admin, @manager] do |f|
10
+ = render 'validate', { f: f }
11
+ %table
12
+ %tr
13
+ %th= f.label :email
14
+ %td= f.text_field :email
15
+ %tr
16
+ %th= f.label :password
17
+ %td= f.text_field :password
18
+ .actions
19
+ = f.submit 'Сохранить'
20
+ = f.submit 'Применить'
@@ -0,0 +1,17 @@
1
+ - content_for(:page_header) do
2
+ %h1= tplural Manager
3
+ %p= link_to "Добавить #{taccusative('manager')}", [:new, :admin, :manager]
4
+
5
+ - unless @managers.empty?
6
+ %table.list
7
+ %colgroup
8
+ %col
9
+ %col.w1
10
+ %thead
11
+ %tr
12
+ %th= Manager.human_attribute_name('email')
13
+ %th
14
+ - @managers.each do |manager|
15
+ %tr
16
+ %td= link_to manager.email, [:edit, :admin, manager]
17
+ %td= link_to 'Удалить', [:admin, manager], method: :delete, data: { confirm: 'Точно Удалить?' }, class: :del
data/lib/redde/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redde
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redde
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Bovykin
@@ -233,6 +233,8 @@ files:
233
233
  - lib/generators/redde/layout/templates/helpers/admin_helper.rb
234
234
  - lib/generators/redde/layout/templates/layouts/admin.html.haml
235
235
  - lib/generators/redde/layout/templates/layouts/login.html.haml
236
+ - lib/generators/redde/layout/templates/views/managers/edit.html.haml
237
+ - lib/generators/redde/layout/templates/views/managers/index.html.haml
236
238
  - lib/generators/redde/photo/photo_generator.rb
237
239
  - lib/generators/redde/photo/templates/controller.rb
238
240
  - lib/generators/redde/photo/templates/create_photos.rb