go_blog 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/blog/post.rb +6 -0
- data/app/views/blog/posts/_collection.html.erb +2 -4
- data/app/views/blog/posts/_collection_list.html.erb +1 -1
- data/app/views/blog/posts/index.html.erb +5 -3
- data/app/views/blog/posts/locales/model_locale.yml +18 -0
- data/app/views/blog/posts/locales/view_locale.yml +35 -0
- data/lib/go_blog/engine.rb +10 -1
- data/lib/go_blog/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 474e51e949bcf0873b4013ac6b8c84c6c261faf5
|
4
|
+
data.tar.gz: 0f5c9f29133524911ffcf2301fd7622bd27547df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7e907412e971e431235ae8e8dea0a1fb172e2bea5549c0358cf2217750dbc3e7d96f4633c9eb6affa035f694f0cc0dd4e25f3dd7016a7307d795e1a3f5eb73e
|
7
|
+
data.tar.gz: 40b0106b2b41206949480b5e191cfaa33b843c147ffc0aee7e09410a93d24ff14f8fa89ce6a0a0e05e0a80c7280ffe4f8ddb0da3e30c1572418df214b1ab8a89
|
data/app/models/blog/post.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
<% collection.each do |resource| %>
|
2
2
|
<tr id="<%= dom_id(resource) %>">
|
3
3
|
<td><%= resource.title %></td>
|
4
|
-
<td><%= truncate_with_hover(resource.teaser.html_safe,30)
|
5
|
-
<td><%= truncate_with_hover(resource.body.html_safe,30) %></td>
|
4
|
+
<td><%= truncate_with_hover(resource.teaser.html_safe, 30) %></td>
|
6
5
|
<td><%= resource.draft %></td>
|
7
|
-
<td><%= resource.published_at %></td>
|
6
|
+
<td><%= converte_date(resource.published_at) %></td>
|
8
7
|
<td><%= resource.user_id %></td>
|
9
|
-
<td><%= resource.custom_url %></td>
|
10
8
|
<td><%= resource.access_count %></td>
|
11
9
|
<td class="text-center">
|
12
10
|
<% if current_user and current_user.admin? %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</div>
|
15
15
|
<h4 class="text-uppercase push-10">
|
16
16
|
<%= resource.decorate.link_to_title %></h4>
|
17
|
-
<p class="push-20"><%= resource.teaser.html_safe %></p>
|
17
|
+
<p class="push-20"><%= truncate_with_hover(resource.teaser.html_safe,30) %></p>
|
18
18
|
<div class="btn-group btn-group-sm">
|
19
19
|
<!--<a class="btn btn-default" href="javascript:void(0)"><i class="fa fa-share-alt push-5-r"></i> Compartilhar</a>-->
|
20
20
|
<%= resource.decorate.link_to_read_more %>
|
@@ -27,9 +27,11 @@
|
|
27
27
|
<table class="table table-striped">
|
28
28
|
<thead>
|
29
29
|
<tr>
|
30
|
-
<th><%=t 'activerecord.attributes.blog_post.
|
31
|
-
<th><%=t 'activerecord.attributes.blog_post.
|
32
|
-
<th><%=t 'activerecord.attributes.blog_post.
|
30
|
+
<th><%=t 'activerecord.attributes.blog_post.title' %></th>
|
31
|
+
<th><%=t 'activerecord.attributes.blog_post.teaser' %></th>
|
32
|
+
<th><%=t 'activerecord.attributes.blog_post.draft' %></th>
|
33
|
+
<th><%=t 'activerecord.attributes.blog_post.published_at' %></th>
|
34
|
+
<th><%=t 'activerecord.attributes.blog_post.access_count' %></th>
|
33
35
|
<th class="text-center" style="width: 150px;"><%=t 'misc.actions' %></th>
|
34
36
|
</tr>
|
35
37
|
</thead>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
pt-BR:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
blog_post:
|
5
|
+
one: "teste"
|
6
|
+
other: "teste"
|
7
|
+
explain: "teste"
|
8
|
+
|
9
|
+
attributes:
|
10
|
+
blog_post:
|
11
|
+
title: "Titulo"
|
12
|
+
teaser: "name"
|
13
|
+
draft: "name"
|
14
|
+
published_at: "name"
|
15
|
+
access_count: "name"
|
16
|
+
id: ID
|
17
|
+
created_at: Criado em
|
18
|
+
updated_at: Atualizado em
|
@@ -0,0 +1,35 @@
|
|
1
|
+
pt-BR:
|
2
|
+
blog_post:
|
3
|
+
default: &default
|
4
|
+
h1: Link
|
5
|
+
header: "Lista de links"
|
6
|
+
block_header: links
|
7
|
+
index:
|
8
|
+
<<: *default
|
9
|
+
header: "Lista de links"
|
10
|
+
block_header: links
|
11
|
+
show:
|
12
|
+
<<: *default
|
13
|
+
header: "Detalhes: %{resource}"
|
14
|
+
edit:
|
15
|
+
<<: *default
|
16
|
+
header: "Editar: %{resource}"
|
17
|
+
new:
|
18
|
+
<<: *default
|
19
|
+
header: "Cadastrar Link"
|
20
|
+
title: "Cadastrar Link"
|
21
|
+
create:
|
22
|
+
alert: "Link não pode ser cadastrado."
|
23
|
+
notice: "Link cadastrado com sucesso."
|
24
|
+
update:
|
25
|
+
alert: "Link não pode ser atualizado."
|
26
|
+
notice: "Link atualizado com sucesso."
|
27
|
+
destroy:
|
28
|
+
alert: "Link não pode ser excluído."
|
29
|
+
notice: "Link excluído com sucesso."
|
30
|
+
|
31
|
+
helpers:
|
32
|
+
submit:
|
33
|
+
link:
|
34
|
+
create: "Cadastrar %{model}"
|
35
|
+
update: "Atualizar %{model}"
|
data/lib/go_blog/engine.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
|
2
1
|
require 'rails/all'
|
3
2
|
module GoBlog
|
4
3
|
class Engine < ::Rails::Engine
|
4
|
+
|
5
5
|
initializer :append_migrations do |app|
|
6
6
|
# This prevents migrations from being loaded twice from the inside of the
|
7
7
|
# gem itself (dummy test app)
|
@@ -11,5 +11,14 @@ module GoBlog
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
config.i18n.default_locale = :'pt-BR'
|
16
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
17
|
+
config.time_zone = 'Brasilia'
|
18
|
+
config.i18n.load_path += Dir[config.root.join('config', 'locales','**', '*.{rb,yml}').to_s]
|
19
|
+
config.encoding = "utf-8"
|
20
|
+
|
21
|
+
|
14
22
|
end
|
23
|
+
|
15
24
|
end
|
data/lib/go_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: go_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Carlos Ottobboni
|
@@ -93,6 +93,8 @@ files:
|
|
93
93
|
- app/views/blog/posts/edit.html.erb
|
94
94
|
- app/views/blog/posts/index.html.erb
|
95
95
|
- app/views/blog/posts/list.html.erb
|
96
|
+
- app/views/blog/posts/locales/model_locale.yml
|
97
|
+
- app/views/blog/posts/locales/view_locale.yml
|
96
98
|
- app/views/blog/posts/new.html.erb
|
97
99
|
- app/views/blog/posts/show.html.erb
|
98
100
|
- app/views/blog/posts/show_list.html.erb
|