cpack_repository/commit
Fix rebasing and cleanup tree
author | Jan Wielemaker |
---|---|
Thu Nov 18 18:55:08 2010 +0100 | |
committer | Jan Wielemaker |
Thu Nov 18 18:55:08 2010 +0100 | |
commit | a1da9a98cb8a5c1a507097c640324bf6a5703dd8 |
tree | 8cd2038b5946192ba3c216b44e3d8eafeaf89e2c |
parent | faa2c698c3bfc9bf983cccaeee8e498cf7390199 |
Diff style: patch stat
diff --git a/lib/cpack/repository.pl b/lib/cpack/repository.pl index 53643b4..b57433b 100644 --- a/lib/cpack/repository.pl +++ b/lib/cpack/repository.pl @@ -49,6 +49,7 @@ :- use_module(library(filesex)). :- use_module(library(http/http_wrapper)). :- use_module(library(http/http_host)). +:- use_module(library(http/http_path)). :- use_module(library(http/dcg_basics)). :- use_module(xref). @@ -305,8 +306,9 @@ rdf_load_git_stream(Graph, Format, In) :- % Create a persistent URI for Identifier of the given Type. cpack_uri(Type, Name, URI) :- - ( type_root(Type, Root) - -> true + ( type_root(Type, RootSpec) + -> http_absolute_location(RootSpec, Root0, []), + ensure_slash(Root0, Root) ; domain_error(uri_type, Type) ), http_current_request(Request), @@ -322,13 +324,18 @@ cpack_uri(Type, Name, URI) :- uri_components(Start, Data), atom_concat(Start, Name, URI). +ensure_slash(Root0, Root) :- + ( sub_atom(Root0, _, _, 0, /) + -> Root = Root0 + ; atom_concat(Root0, /, Root) + ). -type_root(package, '/packs/'). -type_root(pack, '/cpack/'). % Sync with api(cpack)! -type_root(file_ref, '/file_ref/'). -type_root(graph, '/graph/'). -type_root(prolog, '/prolog/'). -type_root(cliopatria, '/cliopatria/'). +type_root(package, root(packs)). +type_root(pack, root(cpack)). % Sync with api(cpack)! +type_root(file_ref, root(file_ref)). +type_root(graph, root(graph)). +type_root(prolog, root(prolog)). +type_root(cliopatria, root(cliopatria)). package_graph(Package, Graph) :- cpack_uri(package, Package, Graph). diff --git a/web/css/cpack.css b/web/css/cpack.css index 30f7096..0a9bd92 100644 --- a/web/css/cpack.css +++ b/web/css/cpack.css @@ -102,8 +102,7 @@ ul.dir } ul.file_hierarchy li.file -{ list-style-image: none; - list-style-type: none; +{ list-style-image: url('../icons/file.png'); } ul.files li diff --git a/web/icons/file.png b/web/icons/file.png new file mode 100644 index 0000000..decea6f Binary files /dev/null and b/web/icons/file.png differ