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.
@@ -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
- border-bottom:2px solid black;
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
- label || uri.to_s
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.human_readable_name
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"
@@ -1,3 +1,3 @@
1
1
  module PublishMyData
2
- VERSION = "1.3.7"
2
+ VERSION = "1.3.8"
3
3
  end