|
14 | 14 | %> |
15 | 15 |
|
16 | 16 | <div class="row"> |
17 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
18 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :universe, content_list: current_user.universes } %> |
19 | | - </div> |
20 | | - |
21 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
22 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :character, content_list: current_user.characters } %> |
23 | | - </div> |
24 | | - |
25 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
26 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :location, content_list: current_user.locations } %> |
27 | | - </div> |
28 | | - |
29 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
30 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :item, content_list: current_user.items } %> |
31 | | - </div> |
32 | | - |
33 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
34 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :creature, content_list: current_user.creatures } %> |
35 | | - </div> |
36 | | - |
37 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
38 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :race, content_list: current_user.races } %> |
39 | | - </div> |
40 | | - |
41 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
42 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :religion, content_list: current_user.religions } %> |
43 | | - </div> |
44 | | - |
45 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
46 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :group, content_list: current_user.groups } %> |
47 | | - </div> |
48 | | - |
49 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
50 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :magic, content_list: current_user.magics } %> |
51 | | - </div> |
52 | | - |
53 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
54 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :language, content_list: current_user.languages } %> |
55 | | - </div> |
56 | | - |
57 | | - <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
58 | | - <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: :scene, content_list: current_user.scenes } %> |
59 | | - </div> |
| 17 | + <% [:universe, :character, :location, :item, :creature, :race, :religion, :group, :magic, :language, :scene].each do |type| %> |
| 18 | + <div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>"> |
| 19 | + <%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: type, content_list: current_user.send(type.to_s.pluralize) } %> |
| 20 | + </div> |
| 21 | + <% end %> |
60 | 22 | </div> |
0 commit comments