web47core 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/app/helpers/core_helper.rb +1 -1
 - data/app/helpers/core_link_helper.rb +7 -33
 - data/config/locales/en.yml +1 -0
 - data/lib/web47core/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8d30e029bb9f3e3a7697c025b5c475a684756e834b2d6789e79aaf20a25f984e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ec1b0b8ae678de7053396618a607bb8b4057b534ec09e0844d10b6a59a57e36c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 250b8a3e1ed44c0c3229de3415efe6e103bcb698fc52c90f79c5b30c68e76cd439170c3fda155e86cc6f3b0b136a22fc47e582085a273a689e0f59d0399ed60a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ed89442fd4b8cb578dd3f664cca063d64e40f5ed9c69d7a000216d8c58a350d2f491a188104da9b61837b77f8f7a89828f4bbb014b448aa03dd830c3c1746948
         
     | 
    
        data/app/helpers/core_helper.rb
    CHANGED
    
    
| 
         @@ -99,9 +99,8 @@ module CoreLinkHelper 
     | 
|
| 
       99 
99 
     | 
    
         
             
                return unless can? :edit, obj
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
101 
     | 
    
         
             
                icon_name = options[:icon_name] || 'replay'
         
     | 
| 
       102 
     | 
    
         
            -
                data = {}
         
     | 
| 
       103 
     | 
    
         
            -
                data 
     | 
| 
       104 
     | 
    
         
            -
                content_tag(:a, href: path, data: data) do
         
     | 
| 
      
 102 
     | 
    
         
            +
                data = { confirm: options[:confirm] || t('links.replay_confirmation', name: obj.class.to_s.underscore.humanize) }
         
     | 
| 
      
 103 
     | 
    
         
            +
                content_tag(:a, href: path, data: data, class: options[:link_classes]) do
         
     | 
| 
       105 
104 
     | 
    
         
             
                  concat(content_tag(:i, class: 'material-icons') do
         
     | 
| 
       106 
105 
     | 
    
         
             
                    icon_name
         
     | 
| 
       107 
106 
     | 
    
         
             
                  end)
         
     | 
| 
         @@ -137,7 +136,7 @@ module CoreLinkHelper 
     | 
|
| 
       137 
136 
     | 
    
         
             
              def info_link_tag(obj, path, options = {})
         
     | 
| 
       138 
137 
     | 
    
         
             
                return unless can? :read, obj
         
     | 
| 
       139 
138 
     | 
    
         | 
| 
       140 
     | 
    
         
            -
                content_tag(:a, href: path) do
         
     | 
| 
      
 139 
     | 
    
         
            +
                content_tag(:a, href: path, class: options[:link_classes]) do
         
     | 
| 
       141 
140 
     | 
    
         
             
                  concat(content_tag(:i, class: 'material-icons') do
         
     | 
| 
       142 
141 
     | 
    
         
             
                    'info'
         
     | 
| 
       143 
142 
     | 
    
         
             
                  end)
         
     | 
| 
         @@ -163,7 +162,7 @@ module CoreLinkHelper 
     | 
|
| 
       163 
162 
     | 
    
         
             
              def action_link_tag(condition, path, options = {})
         
     | 
| 
       164 
163 
     | 
    
         
             
                return unless condition
         
     | 
| 
       165 
164 
     | 
    
         | 
| 
       166 
     | 
    
         
            -
                content_tag(:a, href: path) do
         
     | 
| 
      
 165 
     | 
    
         
            +
                content_tag(:a, href: path, class: options[:link_classes]) do
         
     | 
| 
       167 
166 
     | 
    
         
             
                  concat(content_tag(:i, class: 'material-icons') do
         
     | 
| 
       168 
167 
     | 
    
         
             
                    options[:icon_name] || 'info'
         
     | 
| 
       169 
168 
     | 
    
         
             
                  end)
         
     | 
| 
         @@ -189,8 +188,9 @@ module CoreLinkHelper 
     | 
|
| 
       189 
188 
     | 
    
         
             
              def delete_link_tag(obj, path, options = {})
         
     | 
| 
       190 
189 
     | 
    
         
             
                return unless can? :delete, obj
         
     | 
| 
       191 
190 
     | 
    
         | 
| 
       192 
     | 
    
         
            -
                 
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
      
 191 
     | 
    
         
            +
                data = { method: :delete,
         
     | 
| 
      
 192 
     | 
    
         
            +
                         confirm: options[:confirm] || t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize) }
         
     | 
| 
      
 193 
     | 
    
         
            +
                content_tag(:a, href: path, data: data) do
         
     | 
| 
       194 
194 
     | 
    
         
             
                  concat(content_tag(:i, class: 'material-icons') do
         
     | 
| 
       195 
195 
     | 
    
         
             
                    options[:icon_name] || 'delete'
         
     | 
| 
       196 
196 
     | 
    
         
             
                  end)
         
     | 
| 
         @@ -198,32 +198,6 @@ module CoreLinkHelper 
     | 
|
| 
       198 
198 
     | 
    
         
             
                end
         
     | 
| 
       199 
199 
     | 
    
         
             
              end
         
     | 
| 
       200 
200 
     | 
    
         | 
| 
       201 
     | 
    
         
            -
              #
         
     | 
| 
       202 
     | 
    
         
            -
              # Send notification in a pull down list
         
     | 
| 
       203 
     | 
    
         
            -
              #
         
     | 
| 
       204 
     | 
    
         
            -
              def notification_list_tag(obj, path, options = {})
         
     | 
| 
       205 
     | 
    
         
            -
                return unless can? :manage, obj
         
     | 
| 
       206 
     | 
    
         
            -
             
     | 
| 
       207 
     | 
    
         
            -
                options[:label] ||= I18n.t('customer_account_users.index.reset_password')
         
     | 
| 
       208 
     | 
    
         
            -
                content_tag(:li) do
         
     | 
| 
       209 
     | 
    
         
            -
                  notification_link_tag(obj, path, options)
         
     | 
| 
       210 
     | 
    
         
            -
                end
         
     | 
| 
       211 
     | 
    
         
            -
              end
         
     | 
| 
       212 
     | 
    
         
            -
             
     | 
| 
       213 
     | 
    
         
            -
              #
         
     | 
| 
       214 
     | 
    
         
            -
              # Send notification
         
     | 
| 
       215 
     | 
    
         
            -
              #
         
     | 
| 
       216 
     | 
    
         
            -
              def notification_link_tag(obj, path, options = {})
         
     | 
| 
       217 
     | 
    
         
            -
                return unless can? :manage, obj
         
     | 
| 
       218 
     | 
    
         
            -
             
     | 
| 
       219 
     | 
    
         
            -
                content_tag(:a, href: path) do
         
     | 
| 
       220 
     | 
    
         
            -
                  concat(content_tag(:i, class: 'material-icons') do
         
     | 
| 
       221 
     | 
    
         
            -
                    options[:icon_name] || 'email'
         
     | 
| 
       222 
     | 
    
         
            -
                  end)
         
     | 
| 
       223 
     | 
    
         
            -
                  concat(options[:label]) if options[:label].present?
         
     | 
| 
       224 
     | 
    
         
            -
                end
         
     | 
| 
       225 
     | 
    
         
            -
              end
         
     | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
       227 
201 
     | 
    
         
             
              #
         
     | 
| 
       228 
202 
     | 
    
         
             
              # Edit a page
         
     | 
| 
       229 
203 
     | 
    
         
             
              #
         
     | 
    
        data/config/locales/en.yml
    CHANGED
    
    
    
        data/lib/web47core/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: web47core
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Schroeder
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-04-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     |