File tree Expand file tree Collapse file tree 1 file changed +0
-32
lines changed
Expand file tree Collapse file tree 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change 2929 locals : { value : link_codes , content : content }
3030 %>
3131 <% end %>
32-
33- <% if user_signed_in? %>
34- < div class ="card-panel yellow lighten-5 black-text ">
35- Notice: The newest Notebook.ai release is adding the ability to create your own link
36- fields, which includes a rather large migration of all existing link fields into a new linking system.
37- Links that haven't been migrated yet can be seen below this message; links on the new system appear above.
38- < br /> < br />
39- Thank you for your patience during this large rewrite! This notice will automatically disappear after the
40- migration has completed for everyone.
41- < br /> < br />
42- — Andrew
43- </ div >
44- <% end %>
45-
46- <%# TODO: remove these after finishing link migration script %>
47- <% relations . each do |name , params | %>
48- <%
49- results = params [ :related_class ] . where ( "#{ params [ :through_relation ] . downcase } _id" : content . id )
50- . map { |content | content . send ( params [ :inverse_class ] . downcase ) }
51- . select { |content | content && content . readable_by? ( current_user || User . new ) }
52- %>
53- <% next unless results . any? %>
54-
55- < div class ="uppercase grey-text ">
56- <%= params [ :relation_text ] . to_s . titleize . downcase %> of
57- </ div >
58- <%=
59- link_codes = results . map { |page | "#{ page . page_type } -#{ page . id } " }
60- render partial : "content/display/attribute_value/link" ,
61- locals : { value : link_codes , content : content }
62- %>
63- <% end %>
6432 </ div >
6533</ div >
You can’t perform that action at this time.
0 commit comments