publish_my_data 1.3.7 → 1.3.8
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.
- data/app/assets/stylesheets/publish_my_data/core/5000-styling.scss +9 -3
- data/app/helpers/publish_my_data/application_helper.rb +12 -0
- data/app/models/publish_my_data/resource.rb +9 -1
- data/app/views/publish_my_data/resources/show.html.haml +1 -1
- data/lib/publish_my_data/version.rb +1 -1
- data/spec/dummy/log/test.log +17571 -0
- metadata +3 -3
@@ -97,11 +97,16 @@ code.scrolling{
|
|
97
97
|
font-size: 0.9em;
|
98
98
|
}
|
99
99
|
|
100
|
+
.pmd_uri_inline{
|
101
|
+
word-break: break-all;
|
102
|
+
}
|
103
|
+
|
100
104
|
.uri{
|
101
105
|
font-family: Monaco, Consolas, "Lucida Console", monospace;
|
102
106
|
word-break: break-all;
|
103
107
|
}
|
104
108
|
|
109
|
+
|
105
110
|
/* 5100 - DOCUMENTATION
|
106
111
|
========================================================================== */
|
107
112
|
|
@@ -111,7 +116,7 @@ code.scrolling{
|
|
111
116
|
list-style-type: none;
|
112
117
|
padding:0;
|
113
118
|
}
|
114
|
-
|
119
|
+
|
115
120
|
section {
|
116
121
|
padding: 0 0 $pmdconfig_space_vertical 0;
|
117
122
|
}
|
@@ -126,11 +131,12 @@ code.scrolling{
|
|
126
131
|
|
127
132
|
h2{
|
128
133
|
width:100%;
|
129
|
-
|
134
|
+
padding-bottom:12px;
|
135
|
+
border-bottom:2px solid #eee;
|
130
136
|
}
|
131
137
|
|
132
138
|
h4{
|
133
139
|
margin-top: 22px;
|
134
140
|
}
|
135
141
|
|
136
|
-
}
|
142
|
+
}
|
@@ -36,5 +36,17 @@ module PublishMyData
|
|
36
36
|
(resources.total_count > pagination_params.per_page)
|
37
37
|
end
|
38
38
|
|
39
|
+
def human_readable_name(resource)
|
40
|
+
name = resource.human_readable_name
|
41
|
+
if resource.human_readable_name_is_uri?
|
42
|
+
name = annotate_as_uri(name)
|
43
|
+
end
|
44
|
+
return name
|
45
|
+
end
|
46
|
+
|
47
|
+
def annotate_as_uri(s)
|
48
|
+
raw("<span class='pmd_inline_uri'>#{s}</span>")
|
49
|
+
end
|
50
|
+
|
39
51
|
end
|
40
52
|
end
|
@@ -40,8 +40,16 @@ module PublishMyData
|
|
40
40
|
Dataset.find(Dataset.uri_from_data_graph_uri(self.graph_uri)) rescue nil
|
41
41
|
end
|
42
42
|
|
43
|
+
def human_readable_label
|
44
|
+
label #TODO fall back to other name-like predicates
|
45
|
+
end
|
46
|
+
|
43
47
|
def human_readable_name
|
44
|
-
|
48
|
+
human_readable_label || uri.to_s
|
49
|
+
end
|
50
|
+
|
51
|
+
def human_readable_name_is_uri?
|
52
|
+
human_readable_label ? false : true;
|
45
53
|
end
|
46
54
|
|
47
55
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- # - break up list of properties by graph
|
3
3
|
- # - show inbound links
|
4
4
|
|
5
|
-
- title = resource
|
5
|
+
- title = human_readable_name(resource)
|
6
6
|
- rdf_type_label = PublishMyData::RdfType.find(resource.rdf_type.first.to_s).label rescue nil
|
7
7
|
|
8
8
|
- highlight_in_menu "catalogue"
|