equal
deleted
inserted
replaced
94 # We get the recordType'labels with the DocumentType repository |
94 # We get the recordType'labels with the DocumentType repository |
95 if self.object.recordType: |
95 if self.object.recordType: |
96 uri_list = [self.object.recordType] |
96 uri_list = [self.object.recordType] |
97 uris_labels = get_labels_for_uris(uri_list, "http://www.iiep.unesco.org/plan4learning/scheme/DocumentType", lang, False) |
97 uris_labels = get_labels_for_uris(uri_list, "http://www.iiep.unesco.org/plan4learning/scheme/DocumentType", lang, False) |
98 context['recordType_label'] = uris_labels[self.object.recordType] |
98 context['recordType_label'] = uris_labels[self.object.recordType] |
|
99 # Here, in the future, there will be the request for audiences thesaurus |
|
100 context['audiences_labels'] = {} |
|
101 #uri_list = [s.uri for s in self.object.audiences.all()] |
|
102 #uris_labels = get_labels_for_uris(uri_list, "http://www.iiep.unesco.org/plan4learning/scheme/Audiences", lang, False) |
|
103 #context['audiences_labels'] = uris_labels |
99 |
104 |
100 return context |
105 return context |
101 |
106 |
102 class RecordEditView(DetailView): |
107 class RecordEditView(DetailView): |
103 http_method_names = ['get'] |
108 http_method_names = ['get'] |
174 'dataurl': settings.SPARQL_QUERY_ENDPOINT, |
179 'dataurl': settings.SPARQL_QUERY_ENDPOINT, |
175 'dataquery': settings.SPARQL_TYPE_QUERIES["filter"] % (lang, lang), |
180 'dataquery': settings.SPARQL_TYPE_QUERIES["filter"] % (lang, lang), |
176 'datarootquery': settings.SPARQL_TYPE_QUERIES["root"] % lang, |
181 'datarootquery': settings.SPARQL_TYPE_QUERIES["root"] % lang, |
177 'datachildsquery': "", |
182 'datachildsquery': "", |
178 'datachildcountquery': "" |
183 'datachildcountquery': "" |
|
184 }, |
|
185 'audiences': { |
|
186 'dataurl': settings.SPARQL_QUERY_ENDPOINT, |
|
187 'dataquery': settings.SPARQL_AUDIENCE_QUERIES["filter"], |
|
188 'datarootquery': settings.SPARQL_AUDIENCE_QUERIES["root"], |
|
189 'datachildsquery': settings.SPARQL_AUDIENCE_QUERIES["childs"], |
|
190 'datachildcountquery': settings.SPARQL_AUDIENCE_QUERIES["child-count"] |
179 } |
191 } |
180 } |
192 } |
181 context['query_dicts'] = json.dumps(query_dicts) |
193 context['query_dicts'] = json.dumps(query_dicts) |
182 |
194 |
183 # Languages list used in drop down list |
195 # Languages list used in drop down list |