OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a139b5e
)
fix filter include
author
yasushiito
<yas@pen-chan.jp>
Sat, 8 Mar 2014 09:33:56 +0000
(18:33 +0900)
committer
yasushiito
<yas@pen-chan.jp>
Sat, 8 Mar 2014 09:33:56 +0000
(18:33 +0900)
app/assets/javascripts/manifest/work/models.js.coffee.erb
patch
|
blob
|
history
app/models/balloon.rb
patch
|
blob
|
history
app/models/speech.rb
patch
|
blob
|
history
app/views/balloons/_summary.html.erb
patch
|
blob
|
history
app/views/speeches/_summary.html.erb
patch
|
blob
|
history
app/views/top/index.html.erb
patch
|
blob
|
history
lib/manifest/list_group/list/base.rb
patch
|
blob
|
history
lib/manifest/list_group/list/filter.rb
patch
|
blob
|
history
lib/manifest/list_group/list/includes/auto.rb
patch
|
blob
|
history
lib/manifest/model/tree.rb
patch
|
blob
|
history
public/manifest.json
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/manifest/work/models.js.coffee.erb
b/app/assets/javascripts/manifest/work/models.js.coffee.erb
index
f61a285
..
670c916
100644
(file)
--- a/
app/assets/javascripts/manifest/work/models.js.coffee.erb
+++ b/
app/assets/javascripts/manifest/work/models.js.coffee.erb
@@
-692,15
+692,9
@@
},
\r
by_panel: {
\r
type: 'filter',
\r
},
\r
by_panel: {
\r
type: 'filter',
\r
- args: {
\r
- where_name: 'public_list_where',
\r
- },
\r
},
\r
by_author: {
\r
type: 'foreign_filter',
\r
},
\r
by_author: {
\r
type: 'foreign_filter',
\r
- args: {
\r
- tree_name: 'owner',
\r
- },
\r
},
\r
},
\r
},
\r
},
\r
},
\r
},
\r
diff --git
a/app/models/balloon.rb
b/app/models/balloon.rb
index
8f08c83
..
b6a4bbb
100644
(file)
--- a/
app/models/balloon.rb
+++ b/
app/models/balloon.rb
@@
-32,7
+32,7
@@
self.system_picture_id = 1
end
def symbol_option
end
def symbol_option
- self.
get_parent
.speech_balloon_template.symbol_option
+ self.
speech_balloon
.speech_balloon_template.symbol_option
end
def self.list_where
end
def self.list_where
diff --git
a/app/models/speech.rb
b/app/models/speech.rb
index
f42b2a7
..
fd0dd99
100644
(file)
--- a/
app/models/speech.rb
+++ b/
app/models/speech.rb
@@
-30,7
+30,7
@@
class Speech < Peta::Content
end
def symbol_option
end
def symbol_option
- self.
get_parent
.speech_balloon_template.symbol_option
+ self.
speech_balloon
.speech_balloon_template.symbol_option
end
def outer_style
end
def outer_style
diff --git
a/app/views/balloons/_summary.html.erb
b/app/views/balloons/_summary.html.erb
index
92be2ad
..
6655049
100644
(file)
--- a/
app/views/balloons/_summary.html.erb
+++ b/
app/views/balloons/_summary.html.erb
@@
-1,4
+1,4
@@
<div>
<div>
- <%= link_to panel_icon(:object => item, :size => 32), panel_path(item.
get_parent.get_
panel) %>
- <%= link_to h(truncate(item.
get_parent.get_panel.author.name, :length => 12)), author_path(item.get_parent.get_
panel.author) %>
+ <%= link_to panel_icon(:object => item, :size => 32), panel_path(item.
speech_balloon.
panel) %>
+ <%= link_to h(truncate(item.
speech_balloon.panel.author.name, :length => 12)), author_path(item.speech_balloon.
panel.author) %>
</div>
</div>
diff --git
a/app/views/speeches/_summary.html.erb
b/app/views/speeches/_summary.html.erb
index
92be2ad
..
6655049
100644
(file)
--- a/
app/views/speeches/_summary.html.erb
+++ b/
app/views/speeches/_summary.html.erb
@@
-1,4
+1,4
@@
<div>
<div>
- <%= link_to panel_icon(:object => item, :size => 32), panel_path(item.
get_parent.get_
panel) %>
- <%= link_to h(truncate(item.
get_parent.get_panel.author.name, :length => 12)), author_path(item.get_parent.get_
panel.author) %>
+ <%= link_to panel_icon(:object => item, :size => 32), panel_path(item.
speech_balloon.
panel) %>
+ <%= link_to h(truncate(item.
speech_balloon.panel.author.name, :length => 12)), author_path(item.speech_balloon.
panel.author) %>
</div>
</div>
diff --git
a/app/views/top/index.html.erb
b/app/views/top/index.html.erb
index
80de95a
..
365f350
100644
(file)
--- a/
app/views/top/index.html.erb
+++ b/
app/views/top/index.html.erb
@@
-50,6
+50,14
@@
<%= link_to t_m('SpeechBalloon'), main_app.speech_balloons_path %>
\r
</td>
\r
<td width="200px" align="center" valign="middle">
\r
<%= link_to t_m('SpeechBalloon'), main_app.speech_balloons_path %>
\r
</td>
\r
<td width="200px" align="center" valign="middle">
\r
+ <%= link_to t_m('Balloon'), main_app.balloons_path %>
\r
+ </td>
\r
+ <td width="200px" align="center" valign="middle">
\r
+ <%= link_to t_m('Speech'), main_app.speeches_path %>
\r
+ </td>
\r
+ </tr>
\r
+ <tr height="100px">
\r
+ <td width="200px" align="center" valign="middle">
\r
<%= link_to t_m('GroundPicture'), main_app.ground_pictures_path %>
\r
</td>
\r
<td width="200px" align="center" valign="middle">
\r
<%= link_to t_m('GroundPicture'), main_app.ground_pictures_path %>
\r
</td>
\r
<td width="200px" align="center" valign="middle">
\r
@@
-57,6
+65,8
@@
</td>
\r
<td width="200px" align="center" valign="middle">
\r
</td>
\r
</td>
\r
<td width="200px" align="center" valign="middle">
\r
</td>
\r
+ <td width="200px" align="center" valign="middle">
\r
+ </td>
\r
</tr>
\r
</table>
\r
<h2><%= t('top.human_resources') -%></h2>
\r
</tr>
\r
</table>
\r
<h2><%= t('top.human_resources') -%></h2>
\r
diff --git
a/lib/manifest/list_group/list/base.rb
b/lib/manifest/list_group/list/base.rb
index
9053bdf
..
9766ff6
100644
(file)
--- a/
lib/manifest/list_group/list/base.rb
+++ b/
lib/manifest/list_group/list/base.rb
@@
-29,6
+29,7
@@
module Manifest
@model_list_manifest = @model_manifest.lists[@list_name]
@list_manifest['where'] ||= {}
@list_manifest['includes'] ||= {}
@model_list_manifest = @model_manifest.lists[@list_name]
@list_manifest['where'] ||= {}
@list_manifest['includes'] ||= {}
+ @list_manifest['tree_name'] ||= @list_group.tree_name
end
def init
end
def init
diff --git
a/lib/manifest/list_group/list/filter.rb
b/lib/manifest/list_group/list/filter.rb
index
0239edb
..
3e31ab0
100644
(file)
--- a/
lib/manifest/list_group/list/filter.rb
+++ b/
lib/manifest/list_group/list/filter.rb
@@
-21,7
+21,8
@@
module Manifest
def include_hash
w = super
def include_hash
w = super
- w.merge({@filter_item_name => {} }) unless w[@filter_item_name]
+ w.merge!({@filter_item_name => {} }) unless w[@filter_item_name]
+ w
end
def items operators, options, offset, page_size
end
def items operators, options, offset, page_size
diff --git
a/lib/manifest/list_group/list/includes/auto.rb
b/lib/manifest/list_group/list/includes/auto.rb
index
ff5a03b
..
81fda7b
100644
(file)
--- a/
lib/manifest/list_group/list/includes/auto.rb
+++ b/
lib/manifest/list_group/list/includes/auto.rb
@@
-16,7
+16,7
@@
module Manifest
def includes
model_manifest = ::Manifest.manifest.models[self.item_name]
def includes
model_manifest = ::Manifest.manifest.models[self.item_name]
- tree_manifest = model_manifest.tree[
self
.tree_name]
+ tree_manifest = model_manifest.tree[
@list.list_group
.tree_name]
if tree_manifest
tree_manifest.include_hash
else
if tree_manifest
tree_manifest.include_hash
else
diff --git
a/lib/manifest/model/tree.rb
b/lib/manifest/model/tree.rb
index
27f41ee
..
5b17f70
100644
(file)
--- a/
lib/manifest/model/tree.rb
+++ b/
lib/manifest/model/tree.rb
@@
-23,14
+23,14
@@
module Manifest
end
def parent_tree_manifest
end
def parent_tree_manifest
- self.parent_model_manifest[@tree_name]
+ self.parent_model_manifest
.tree
[@tree_name]
end
def include_hash
if self.parent_tree_manifest
{@parent_model_name => self.parent_tree_manifest.include_hash}
else
end
def include_hash
if self.parent_tree_manifest
{@parent_model_name => self.parent_tree_manifest.include_hash}
else
- {}
+ {
@parent_model_name => {}
}
end
end
end
end
diff --git
a/public/manifest.json
b/public/manifest.json
index
742b311
..
8075e79
100644
(file)
--- a/
public/manifest.json
+++ b/
public/manifest.json
@@
-1545,16
+1545,16
@@
},
\r
"lists": {
\r
"public": {
\r
},
\r
"lists": {
\r
"public": {
\r
- "type": "public"
\r
+ "type": "public",
\r
+ "args": {
\r
+ "tree_name": "owner"
\r
+ }
\r
},
\r
"private": {
\r
"type": "private"
\r
},
\r
"by_panel": {
\r
},
\r
"private": {
\r
"type": "private"
\r
},
\r
"by_panel": {
\r
- "type": "filter",
\r
- "args": {
\r
- "where_name": "public_list_where"
\r
- }
\r
+ "type": "filter"
\r
},
\r
"by_author": {
\r
"type": "foreign_filter",
\r
},
\r
"by_author": {
\r
"type": "foreign_filter",
\r