-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add links to curation pages #1556
Conversation
Oops, still need to handle this bit of code: // this query opens a subpage for the Wikidata item, e.g. as cito subpage
var endpointUrl = 'https://query.wikidata.org/sparql';
var query = `
SELECT DISTINCT ?aspectsubpage
WHERE {
{ [] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 / wdt:P1433 wd:{{ q }} . BIND("venue-cito" AS ?aspectsubpage) }
UNION
{ [] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 wd:{{ q }} . BIND("work-cito" AS ?aspectsubpage) }
}
`;
settings = {
headers: { Accept: 'application/sparql-results+json' },
data: { query: query }
};
$.ajax( endpointUrl, settings ).then( function ( data ) {
data.results.bindings.forEach(function(entry) {
var props = entry.aspectsubpage.value.split("-");
var aspect = props[0];
var subpage = props[1];
$( '#aspect-chooser' ).append(
`<a role="button"
class="btn btn-outline-dark btn-sm"
href="{{ url_for('app.index') }}` + aspect + '/' + '{{ q }}' + '/' + subpage + '">' + subpage + '</a> ' );
});
} ); |
8654528
to
523f571
Compare
I am trying to understand what should be done with this PR. Should I review and merge it? And the work can continue from there? Currently there is no automatic testing. |
Actually I think it is fine now, can't quite recall why this wasn't marked as ready for review |
523f571
to
08d2f20
Compare
This also fixes #1708 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works fine.
Adding a pointer to which serves to keep an overview of things we worked on during the hackathon. |
2nd half of closing #1322
Close #1122
This PR adds a link to the curation page for all Q number pages.
This PR relies on #1552 as the curation aspect chooser is filtered based upon whether there is a useful curation page for that aspect. On this curation page, the aspect chooser is filtered of the aspects which don't have curation page templates:
I'm happy with this PR now, text below preserved for reference
This needs some iteration/discussion before it's ready, due to design choices etc.
The position was chosen as users are accustomed to finding edit controls in the top right of the page.
In terms of the text:
I have no comment on what the URL of the curation pages should be, I do prefer "curation" to "missing"
PR has been created