Merge pull request #587 from atmire/mirage2-contribution
[DS-2052] @mire Mirage 2 Contribution
BIN
dspace-xmlui-mirage2/documentation/sysvars1.png
Executable file
After Width: | Height: | Size: 36 KiB |
BIN
dspace-xmlui-mirage2/documentation/sysvars2.png
Executable file
After Width: | Height: | Size: 91 KiB |
88
dspace-xmlui-mirage2/pom.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-xmlui-mirage2</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>DSpace Mirage2 - src</name>
|
||||
<description>
|
||||
This project generates an overlay war for inclusion in XMLUI using the overlay mechanism.
|
||||
</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.dspace</groupId>
|
||||
<artifactId>dspace-parent</artifactId>
|
||||
<version>5.0-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<!-- This is the path to the root [dspace-src] directory. -->
|
||||
<root.basedir>${basedir}/..</root.basedir>
|
||||
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<filters>
|
||||
<!-- Filter using the properties file defined by dspace-parent POM -->
|
||||
<filter>${filters.file}</filter>
|
||||
</filters>
|
||||
<plugins>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<warSourceExcludes>themes/**</warSourceExcludes>
|
||||
<webResources>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
|
||||
</resource>
|
||||
|
||||
</webResources>
|
||||
<overlays>
|
||||
<!--
|
||||
the priority of overlays is determined here
|
||||
1.) default: anything in the current project has highest
|
||||
2.) anything defined here has precedence in the order defined
|
||||
3.) any war found transitively in the dependencies will be applied
|
||||
next. the order is unpredictable.
|
||||
-->
|
||||
|
||||
</overlays>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.mycila</groupId>
|
||||
<artifactId>license-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- Exclude license check for essential config files, these files cannot have a license comment or Mirage 2 will not compile -->
|
||||
<excludes>
|
||||
<exclude>**/*.json</exclude>
|
||||
<exclude>**/*.LICENSE</exclude>
|
||||
<exclude>**/readme.txt</exclude>
|
||||
<exclude>**/.bowerrc</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
273
dspace-xmlui-mirage2/readme.md
Normal file
@@ -0,0 +1,273 @@
|
||||
# Introduction #
|
||||
|
||||
Mirage 2 is a responsive XMLUI theme for DSpace 4. It is based on the responsive theme for the [Open Knowledge Repository](https://openknowledge.worldbank.org/) by The World Bank.
|
||||
|
||||
Like the original Mirage theme, we started from [HTML5 boilerplate](http://h5bp.com) for the basic structure of each page and best practices with regards to cross browser compatibility, accessibility and performance.
|
||||
|
||||
We used [Bootstrap 3](http://getbootstrap.com/) to have a sturdy responsive grid to base everything on. We chose the SASS version because that allows us to use it in conjunction with the [Compass](http://compass-style.org/) framework, which provides a great library of SASS classes and mixins. Compass also comes with a custom version of the SASS preprocessor we can use to concatenate and minify all stylesheets. We also included the [Handlebars](http://handlebarsjs.com/) templating framework to create more robust Javascript views.
|
||||
|
||||
All these extra dependencies made us reconsider the way front-end dependencies were managed in Mirage 2. A common problem with themes based on the first Mirage was that its dependencies (jQuery, Modernizr, …) were outdated. The versions that came with the theme kept on being used because no-one remembered to update them when creating a new Mirage based theme. So we decided to no longer include 3d party dependencies with the theme and instead go for a combination of [Bower](http://bower.io/) and [Grunt](http://gruntjs.com/) to fetch and combine dependencies at build time.
|
||||
|
||||
These new technologies are put in place to make it easier for the theme developer to produce great themes, but they come with a few new dependencies: node js and ruby. In order to make it easier to get started customizing Mirage2 we added a way to install them automatically durng a maven build.
|
||||
|
||||
# Installation #
|
||||
|
||||
Mirage 2 has been integrated into the standard maven build as an optional feature. It has to be explicitly enabled by setting the `mirage2.on` to `true`.
|
||||
|
||||
```bash
|
||||
mvn package -Dmirage2.on=true
|
||||
```
|
||||
|
||||
All extra tools in the Mirage 2 build process run on either Node js or Ruby, so you'll need both to be able to build the theme. By default, the maven build will assume you don't have either installed and install them in a temporary sandbox every time you build the project. That's convenient, but also quite a bit slower than installing them natively. So we recommend you only use that feature to try out the theme. Afterwards, install the prerequisites and build DSpace with the `mirage2.deps.included` property set to `false`:
|
||||
|
||||
```bash
|
||||
mvn package -Dmirage2.on=true -Dmirage2.deps.included=false
|
||||
```
|
||||
|
||||
## Prerequisites for OSX / Linux ##
|
||||
|
||||
### Node ###
|
||||
|
||||
We recommend using [nvm](https://github.com/creationix/nvm) (Node Version Manager), because it makes it easy to install, use and upgrade node without super user rights.
|
||||
|
||||
First download and install nvm:
|
||||
|
||||
```bash
|
||||
curl https://raw.githubusercontent.com/creationix/nvm/v0.5.1/install.sh | sh
|
||||
```
|
||||
|
||||
Then, close and reopen your terminal, and install a node version. We’ve been using 0.10.17 during the development of the theme, but it may very well work on other versions
|
||||
|
||||
```bash
|
||||
nvm install 0.10.17
|
||||
```
|
||||
|
||||
Set the node version you installed as the default version.
|
||||
|
||||
```bash
|
||||
nvm alias default 0.10.17
|
||||
```
|
||||
|
||||
|
||||
### Bower ###
|
||||
|
||||
You can install bower using the node package manager. The `-g` means install it globally, not as part of a specific project.
|
||||
|
||||
```bash
|
||||
npm install -g bower
|
||||
```
|
||||
Afterwards the command `bower` should show a help message.
|
||||
|
||||
### Grunt ###
|
||||
|
||||
Grunt should also be installed globally using the node package manager:
|
||||
|
||||
```bash
|
||||
npm install -g grunt && npm install -g grunt-cli
|
||||
```
|
||||
|
||||
Afterwards the command `grunt --version` should show the grunt-cli version number
|
||||
|
||||
### Ruby ###
|
||||
|
||||
For the same reasons as with Node, we’d advise using ruby via [RVM](http://rvm.io/) (Ruby Version Manager). Even on OS X, which comes with a version of ruby preinstalled, you can save yourself a lot of hassle by using RVM instead. (In most cases there is no need to uninstall the system ruby first). Note that `you need sudo rights to perform the RVM installation`. You won't need sudo again to use RVM, ruby or gem later on
|
||||
|
||||
|
||||
### Note: ###
|
||||
On OS X you need to have the XCode command line tools installed. To test if they're installed try to type `make` in your terminal, if it says “command not found” follow [these instructions](http://www.computersnyou.com/2025/2013/06/install-command-line-tools-in-osx-10-9-mavericks-how-to/) to install them
|
||||
(If this should fail, then you can find and download the Xcode command line tools directly from [Apple Developer site](https://developer.apple.com/downloads/index.action) - You will need an Apple id for this)
|
||||
|
||||
Install RVM and ruby:
|
||||
|
||||
```bash
|
||||
curl -sSL https://get.rvm.io | bash -s stable --ruby
|
||||
```
|
||||
|
||||
### Compass ###
|
||||
|
||||
Compass is built on the SASS CSS preprocessor, and at the time of writing there is an issue with the latest version of SASS (v3.3), so first you'll have to install the last known stable version using ruby's package manager:
|
||||
|
||||
```bash
|
||||
gem install sass -v 3.2.10
|
||||
```
|
||||
|
||||
Then you can install compass:
|
||||
|
||||
```bash
|
||||
gem install compass
|
||||
```
|
||||
|
||||
Afterwards the command `compass` should show a help message.
|
||||
|
||||
### Prerequisites for Windows ###
|
||||
|
||||
### Node ###
|
||||
|
||||
Download and install NodeJs: [NodeJS](http://nodejs.org/)
|
||||
|
||||
### Bower ###
|
||||
|
||||
You can install bower using the node package manager. The `-g` means install it globally, not as part of a specific project.
|
||||
|
||||
Execute following command in Windows command prompt:
|
||||
(Open a Windows command prompt by pressing cmd-R, then type 'cmd' and enter.)
|
||||
|
||||
```bash
|
||||
npm install -g bower
|
||||
```
|
||||
Afterwards the command `bower` should show a help message.
|
||||
|
||||
### Grunt ###
|
||||
|
||||
Grunt should also be installed globally using the node package manager:
|
||||
|
||||
Perform the following in a Windows command prompt:
|
||||
|
||||
```bash
|
||||
npm install -g grunt && npm install -g grunt-cli
|
||||
```
|
||||
|
||||
Afterwards the command `grunt --version` should show the grunt-cli version number
|
||||
|
||||
### Ruby ###
|
||||
Download and install: [Ruby Installer](http://rubyinstaller.org/)
|
||||
|
||||
Make sure its environment variables are set in system variables
|
||||
|
||||
Open computer properties:
|
||||
|
||||

|
||||
|
||||
|
||||
Open "advanced sytem settings". Open "Advanced" tab, and click "environment variables":
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
Add new variables `GEM_HOME` and `GEM_PATH` pointing to your Ruby gems directory.
|
||||
|
||||
### Compass ###
|
||||
|
||||
Compass is built on the SASS CSS preprocessor, and at the time of writing there is an issue with the latest version of SASS (v3.3), so first you'll have to install the last known stable version using ruby's package manager:
|
||||
|
||||
Perform the following in a Windows command prompt:
|
||||
|
||||
```bash
|
||||
gem install sass -v 3.2.10
|
||||
```
|
||||
|
||||
Then you can install compass:
|
||||
|
||||
```bash
|
||||
gem install compass
|
||||
```
|
||||
|
||||
Afterwards the command `compass` should show a help message.
|
||||
|
||||
# Enabling the theme #
|
||||
|
||||
Add the following to the `<themes>` section of `src/dspace/config/xmlui.xconf`, replacing the currently active theme.
|
||||
|
||||
```xml
|
||||
<theme name="Mirage 2" regex=".*" path="Mirage2/" />
|
||||
```
|
||||
|
||||
|
||||
|
||||
Now, if you run `mvn package -Dmirage2.on=true` in the dspace project root, bower will download all Mirage 2 dependencies, and grunt will trigger a number of plugins to preprocess, concatenate and minify all the theme's resources.
|
||||
|
||||
|
||||
# Customizing the theme #
|
||||
|
||||
To create your own, customized version of Mirage 2, you can't do so in `src/dspace/modules/xmlui/src/main/webapp/themes`. Because of its build process, Mirage 2 works a little different. There is a separate module called `xmlui-mirage2` in `src/dspace/modules/`. Any theme you put in that module will be considered a Mirage 2 based theme, and its theme folder only needs to contain the files that differ from the vanilla Mirage 2.
|
||||
|
||||
To get you started the module already contains a Mirage 2 folder containing nothing but the `_styles.scss` file. You can copy other files you want to modify to that folder as you go.
|
||||
|
||||
# Production and development builds #
|
||||
|
||||
You can use maven profiles to have grunt build the theme in production or development mode.
|
||||
|
||||
In production mode, grunt will concatenate and minify all javascript files referenced in the `Mirage2/scripts.xml` file (for more details see the javascript section of this document) in to a single `theme.js` file, to improve the performance of the theme. In development mode all javascript files will be separate and untouched, to make debugging easier.
|
||||
|
||||
Similarly for CSS, compass will compile the CSS either using `Mirage2/config-dev.rb` or `Mirage2/config-prod.rb`. Both will yield a single css file: `main.css`, but the dev version won't be minified and will contain the scss file name and line number as a comment above each CSS rule.
|
||||
|
||||
By default grunt will build the javascript and CSS in production mode. Use the `mirage2_dev` maven profile, or run grunt with the `dev` task to build the theme in development mode.
|
||||
|
||||
### Note: ###
|
||||
The dspace.cfg property `xmlui.minifiedjs` used in the alpha version of the theme to switch between development and production modes has been deprecated. Because we've moved the javascript declarations to a separate file: `scripts.xml` we no longer need to know which mode you're using in the theme XSLs at runtime but instead can let grunt handle it at build time.
|
||||
|
||||
# DRI Pre-Processing #
|
||||
|
||||
One of the goals for this theme was that changes outside the theme’s directory should be kept to an absolute minimum, so other themes won’t be affected by changes made for Mirage 2. But to make a responsive theme we needed to do some major restructuring of DSpace’s UI elements. The traditional way of doing so in XMLUI is adding slightly tweaked copies of default templates to the theme XSL.
|
||||
|
||||
For example, if you want to add an extra class to div, you’d copy the default div template, change the copy's matcher to match the div you want to target, and then add your class to that template. That adds about 10 lines of XSL, only to add a simple CSS class. It makes the theme XSL files much harder to read and to modify; because if you wanted to change the default div template afterwards, you'd also have to change every template that overrides it.
|
||||
|
||||
So we added an additional XSL transformation step in the theme’s sitemap: preprocess.xsl. This transformation is added right after the DRI generator, and it transforms DRI to DRI. By default it will simply copy the input to the output, and if you want to do something that is perfectly possible in DRI, like adding an extra CSS class to a div, you can now add your exception to the preprocess XSL, and simply let the default div template of the theme XSL render it afterwards.
|
||||
|
||||
### Tip: ###
|
||||
When working with a DRI that has been changed by the preprocess XSLs, it is often useful to see the differences between the original DRI and the version after preprocessing. To see the original DRI you can add `DRI/` after the contextpath in a page’s URL, to see the preprocessed DRI add `?XML` after the page’s URL
|
||||
|
||||
# Style #
|
||||
|
||||
Mirage 2 contains two color schemes to choose from. The classic Mirage color scheme or the standard Bootstrap color scheme. By default grunt will build CSS to get the classic Mirage color scheme. However, by activating the `mirage2_bootstrap_color_scheme` maven profile, this can be changed to get the standard Bootstrap color scheme.
|
||||
|
||||
The stylesheets are written in [SASS](http://sass-lang.com/). You can find them in the folder `Mirage2/styles`. Each color scheme has its own subfolder, and a `_main.scss` file that imports all others. These files will import the Compass library first. Next, all Bootstrap scss files and finally the DSpace specific files. Both color schemes also import the file `_style.scss`. It contains some example SCSS by default, and is meant to add your own style. Note that CSS is also valid SCSS, so if you don't want to learn SASS, just add plain old CSS to that file and it will work just fine.
|
||||
|
||||
The goal of the standard Bootstrap color scheme was to add as little extra style on top of Bootstrap as possible and instead force ourselves to solve most issues in XSL; by creating the right HTML structure and adding the right bootstrap CSS classes. But try as we might, a few additional style rules were still needed. Those can be found in `shared/_dspace-bootstrap-tweaks.scss`, most of it is limited to styles to improve the sidebar behavior on mobile devices.
|
||||
|
||||
The classic Mirage color scheme contains more modifications and also overwrites a few bootstrap variables, in the file `classic_mirage_color_scheme/_bootstrap_variables.scss`. Variables are important because they allow you to change the look of the theme dramatically, simply by changing a few color codes or the font-family. Try to change the value of `$brand-primary` to see what we mean.
|
||||
|
||||
Take a look at [bootstrap's own variables file](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss) to see which others you can overwrite.
|
||||
|
||||
If you want to base your theme on an existing Bootstrap theme (like the ones at [bootswatch.com](http://bootswatch.com)) you can do so by using the standard Bootstrap color scheme and replacing the import of Bootstrap in `bootstrap_color_scheme/_main.scss`:
|
||||
|
||||
```less
|
||||
@import "../vendor/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap";
|
||||
```
|
||||
|
||||
with an import of just its `_variables.sccs` file (those variables need to be defined, because they are used in `_dspace-bootstrap-tweaks.scss`):
|
||||
|
||||
```less
|
||||
@import "../vendor/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_variables";
|
||||
```
|
||||
|
||||
Then import the the css file(s) of your Bootstrap theme of choice below it. Depending on the theme you may also need to update the `twbs-font-path` function right above that import statement.
|
||||
|
||||
### Tip: ###
|
||||
During development it is a hassle to always have to run `mvn package` to re-compile the style and see the result of a CSS change. Luckily compass comes with a “watch” feature that automatically recompiles when the scss files change. If your editor can update the running webapp when you save an scss file, and you run `compass watch` in that webapp's `xmlui/themes/Mirage2` folder, changes to the style will show up nearly instantaneous.
|
||||
|
||||
|
||||
# Scripts #
|
||||
|
||||
Any javascript file that you reference in the file `Mirage2/scripts.xml` will be included in the production `theme.js` file and will be loaded separately and unmodified in development mode.
|
||||
|
||||
The advantage of having all the site’s javascript in a minified single file is that users will only have to make a single request to get all the scripts, so subsequent pages on your repository will load faster. The tradeoff is that all scripts are loaded on every page. That means you’ll have to be extra careful that any script you write only targets the DOM elements you intend to target, and nothing else (meaning, target DOM elements using their IDs and/or very specific class names).
|
||||
|
||||
To keep global javascript variables to a minimum, we’ve created a namespace object called `DSpace` to contain all other global variables. For example `DSpace.context_path` and `DSpace.theme_path` contain the context and theme paths, `DSpace.templates` contains compiled handlebars templates, and `DSpace.i18n` contains i18n strings used by those templates (take a look at the object in your browser’s dev-tools on a discovery page to see that in action). We advise you to put your own global javascript objects in the `DSpace` namespace as well.
|
||||
|
||||
If you create your own handlebars templates, put them in `Mirage2/templates`. They will be precompiled and added to `theme.js` by grunt. To access a template in your javascript code, use the function `DSpace.getTemplate(file-name)` (where `file-name` is the name of your handlebars file, without the extension). That function will return a precompiled version of the template if it exists, and download and compile it if it doesn't. That ensures your templates work both when you’re in development mode or using the production `theme.js` file.
|
||||
|
||||
The theme also comes with built in support for [CoffeeScript](http://coffeescript.org/). If you put `.coffee` files in the `Mirage2/scripts` folder, they will be converted to javascript. Make sure to add the correct reference to `Mirage2/scripts.xml` i.e. with an `.js` extension instead of `.coffee`.
|
||||
|
||||
# Managing dependencies #
|
||||
|
||||
Mirage 2’s dependencies are specified in the file `Mirage2/bower.json`. Dependencies in this file should be specified according to the rules in the [Bower documentation](http://bower.io/|). Note that Bower only downloads the dependencies, nothing more. So if you add other dependencies, you'll still have to reference them. That means if it’s a CSS file, import it in `Mirage2/styles/_style.scss`, if it's a javascript file, add it to `Mirage2/scripts.xml`.
|
||||
|
||||
We've used the the `latest` keyword to specify dependency versions in `bower.json` wherever possible because that ensures you're starting with up to date versions when creating a new theme. However once your theme is going in to production, we strongly recommend replacing `latest` with the actual version numbers being used at that moment. That way your production build won't break when a version of a dependency is released that isn't backwards compatible.
|
||||
|
||||
# Multiple themes #
|
||||
|
||||
Any folder you create in `src/dspace/modules/xmlui-mirage2/src/main/webapp/themes` will be interpreted as a Mirage2 based theme. This means that if I create two folders called 'Red' and 'Green' in that directory, and create the file `styles/_style.scss` in both folders with the contents
|
||||
```css
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
```
|
||||
and
|
||||
```css
|
||||
body {
|
||||
background-color: green;
|
||||
}
|
||||
```
|
||||
respectively and run `mvn package -Dmirage2.on=true`, two themes will be created called 'Red' and 'Green', with the only difference being the background color of `<body>`
|
3
dspace-xmlui-mirage2/src/main/webapp/.bowerrc
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"directory": "vendor"
|
||||
}
|
4
dspace-xmlui-mirage2/src/main/webapp/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*.css
|
||||
#*.js
|
||||
.sass-cache/
|
||||
/vendor
|
119
dspace-xmlui-mirage2/src/main/webapp/Gruntfile.js
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
// Generated on 2013-11-09 using generator-webapp 0.4.3
|
||||
'use strict';
|
||||
|
||||
module.exports = function (grunt) {
|
||||
// show elapsed time at the end
|
||||
require('time-grunt')(grunt);
|
||||
// load all grunt tasks
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
copy: {
|
||||
classic_mirage_color_scheme: {
|
||||
files: [
|
||||
{
|
||||
src: ['styles/classic_mirage_color_scheme/_main.scss'],
|
||||
dest: 'styles/main.scss'
|
||||
}
|
||||
]
|
||||
},
|
||||
bootstrap_color_scheme: {
|
||||
files: [
|
||||
{
|
||||
src: ['styles/bootstrap_color_scheme/_main.scss'],
|
||||
dest: 'styles/main.scss'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
compass: {
|
||||
prod: {
|
||||
options: {
|
||||
config: 'config-prod.rb'
|
||||
}
|
||||
|
||||
},
|
||||
dev: {
|
||||
options: {
|
||||
config: 'config-dev.rb'
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
coffee: {
|
||||
glob_to_multiple: {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: 'scripts',
|
||||
src: ['*.coffee'],
|
||||
dest: 'scripts',
|
||||
ext: '.js'
|
||||
}
|
||||
},
|
||||
handlebars: {
|
||||
compile: {
|
||||
options: {
|
||||
namespace: "DSpace.templates",
|
||||
processName: function(filePath) {
|
||||
return filePath.replace(/^templates\//, '').replace(/\.handlebars$/, '').replace(/\.hbs$/, '');
|
||||
}
|
||||
},
|
||||
files: {
|
||||
"scripts/templates.js": ["templates/*.handlebars", "templates/*.hbs"]
|
||||
}
|
||||
}
|
||||
},
|
||||
useminPrepare:{
|
||||
prod: {
|
||||
src: ['scripts.xml'],
|
||||
options: {
|
||||
// fool usemin in to putting theme.js straight into the scripts
|
||||
// folder, and not in a separate dist folder. And no, you can't
|
||||
// just use an empty string, I tried ;)
|
||||
dest: 'dist/../'
|
||||
}
|
||||
},
|
||||
dev: {
|
||||
src: ['scripts.xml'],
|
||||
options: {
|
||||
// same deal
|
||||
dest: 'dist/../'
|
||||
}
|
||||
}
|
||||
} ,
|
||||
usemin: {
|
||||
html:'scripts.xml'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
grunt.registerTask('classic_mirage_color_scheme', [
|
||||
'copy:classic_mirage_color_scheme'
|
||||
]);
|
||||
grunt.registerTask('bootstrap_color_scheme', [
|
||||
'copy:bootstrap_color_scheme'
|
||||
]);
|
||||
grunt.registerTask('no-compass-prod', [
|
||||
'coffee', 'handlebars', 'useminPrepare:prod','concat','uglify','usemin'
|
||||
]);
|
||||
grunt.registerTask('no-compass-dev', [
|
||||
'coffee', 'handlebars', 'useminPrepare:dev','concat','uglify:generated'
|
||||
]);
|
||||
grunt.registerTask('prod', [
|
||||
'compass:prod', 'no-compass-prod'
|
||||
]);
|
||||
grunt.registerTask('dev', [
|
||||
'compass:dev', 'no-compass-dev'
|
||||
]);
|
||||
grunt.registerTask('default', [
|
||||
'classic_mirage_color_scheme',
|
||||
'prod'
|
||||
]);
|
||||
};
|
16
dspace-xmlui-mirage2/src/main/webapp/bower.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "Mirage2",
|
||||
"version": "0.1.1",
|
||||
"dependencies": {
|
||||
"bootstrap-sass-official": "latest",
|
||||
"modernizr": "latest",
|
||||
"jquery": "~1.10.2",
|
||||
"jquery-ui": "1.10.3",
|
||||
"jqueryuibootstrap": "4f3772cd37b898f456c0126c4b44178ce8d4aad7",
|
||||
"handlebars": "latest",
|
||||
"respond": "latest",
|
||||
"html5shiv": "latest",
|
||||
"holderjs": "latest"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
24
dspace-xmlui-mirage2/src/main/webapp/config-dev.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# The contents of this file are subject to the license and copyright
|
||||
# detailed in the LICENSE and NOTICE files at the root of the source
|
||||
# tree and available online at
|
||||
#
|
||||
# http://www.dspace.org/license/
|
||||
#
|
||||
|
||||
encoding = "UTF-8"
|
||||
http_path = "/themes/bootstrap/"
|
||||
css_path = "styles"
|
||||
sass_path = "styles"
|
||||
images_dir = "images"
|
||||
generated_images_dir = "dist/images/generated"
|
||||
javascripts_dir = "scripts"
|
||||
fonts_dir = "styles/fonts"
|
||||
http_images_path = "/images"
|
||||
http_generated_images_path = "/images/generated"
|
||||
http_fonts_path = "/styles/fonts"
|
||||
relative_assets = false
|
||||
asset_cache_buster = :none
|
||||
output_style = :expanded
|
||||
line_comments = true
|
||||
Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
|
24
dspace-xmlui-mirage2/src/main/webapp/config-prod.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# The contents of this file are subject to the license and copyright
|
||||
# detailed in the LICENSE and NOTICE files at the root of the source
|
||||
# tree and available online at
|
||||
#
|
||||
# http://www.dspace.org/license/
|
||||
#
|
||||
|
||||
encoding = "UTF-8"
|
||||
http_path = "/themes/bootstrap/"
|
||||
css_path = "styles"
|
||||
sass_path = "styles"
|
||||
images_dir = "images"
|
||||
generated_images_dir = "dist/images/generated"
|
||||
javascripts_dir = "scripts"
|
||||
fonts_dir = "styles/fonts"
|
||||
http_images_path = "/images"
|
||||
http_generated_images_path = "/images/generated"
|
||||
http_fonts_path = "/styles/fonts"
|
||||
relative_assets = false
|
||||
asset_cache_buster = :none
|
||||
output_style = :compressed
|
||||
line_comments = false
|
||||
Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
|
36
dspace-xmlui-mirage2/src/main/webapp/config.rb
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# The contents of this file are subject to the license and copyright
|
||||
# detailed in the LICENSE and NOTICE files at the root of the source
|
||||
# tree and available online at
|
||||
#
|
||||
# http://www.dspace.org/license/
|
||||
#
|
||||
|
||||
# Require any additional compass plugins here.
|
||||
|
||||
encoding = "UTF-8"
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/themes/bootstrap/"
|
||||
css_dir = "styles"
|
||||
sass_dir = "styles"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "scripts"
|
||||
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
output_style = :expanded
|
||||
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
line_comments = true
|
||||
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
||||
|
||||
Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
|
BIN
dspace-xmlui-mirage2/src/main/webapp/images/@mirelogo-small.png
Executable file
After Width: | Height: | Size: 5.1 KiB |
168
dspace-xmlui-mirage2/src/main/webapp/images/DSpace-logo-line.svg
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="241.7"
|
||||
height="52.400002"
|
||||
id="svg3053"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.2 r9819"
|
||||
sodipodi:docname="DSpace-logo-line.svg">
|
||||
<metadata
|
||||
id="metadata3081">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3079" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2348"
|
||||
inkscape:window-height="1049"
|
||||
id="namedview3077"
|
||||
showgrid="false"
|
||||
inkscape:zoom="6.2769679"
|
||||
inkscape:cx="101.91044"
|
||||
inkscape:cy="31.629348"
|
||||
inkscape:window-x="2128"
|
||||
inkscape:window-y="295"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg3053" />
|
||||
<style
|
||||
type="text/css"
|
||||
id="style3055">
|
||||
.st0{fill:#FFFFFF;stroke:#808285;stroke-width:1.0563;}
|
||||
.st1{fill:#808285;}
|
||||
.st2{fill:#C0D028;}
|
||||
.st3{fill:#FFFFFF;stroke:#808285;stroke-width:0.4225;}
|
||||
.st4{fill:#FFFFFF;stroke:#808285;stroke-width:0.6338;}
|
||||
.st5{fill:#FFFFFF;stroke:#808285;stroke-width:0.6761;}
|
||||
.st6{fill:#FFFFFF;stroke:#808285;stroke-width:0.8451;}
|
||||
</style>
|
||||
<g
|
||||
id="g3057">
|
||||
<title
|
||||
id="title3059">Layer 1</title>
|
||||
<g
|
||||
id="svg_1">
|
||||
<rect
|
||||
x="19.1"
|
||||
y="17.700001"
|
||||
class="st2"
|
||||
width="14.8"
|
||||
height="14.8"
|
||||
id="svg_2"
|
||||
style="fill:#c0d028" />
|
||||
<g
|
||||
id="svg_3">
|
||||
<rect
|
||||
x="40.599998"
|
||||
y="21.200001"
|
||||
class="st3"
|
||||
width="8.3000002"
|
||||
height="8.3000002"
|
||||
id="svg_4"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:0.42250001" />
|
||||
<rect
|
||||
x="21.200001"
|
||||
y="0.5"
|
||||
class="st5"
|
||||
width="10.7"
|
||||
height="10.7"
|
||||
id="svg_5"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:0.67610002" />
|
||||
<rect
|
||||
x="0.60000002"
|
||||
y="18.5"
|
||||
class="st0"
|
||||
width="13.2"
|
||||
height="13.2"
|
||||
id="svg_6"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:1.05630004" />
|
||||
<rect
|
||||
x="3.0999999"
|
||||
y="37.200001"
|
||||
class="st3"
|
||||
width="8.1999998"
|
||||
height="8.1999998"
|
||||
id="svg_7"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:0.42250001" />
|
||||
<rect
|
||||
x="19.799999"
|
||||
y="38.5"
|
||||
class="st6"
|
||||
width="13.4"
|
||||
height="13.4"
|
||||
id="svg_8"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:0.84509999" />
|
||||
<rect
|
||||
x="39.099998"
|
||||
y="36.5"
|
||||
class="st4"
|
||||
width="11.3"
|
||||
height="11.3"
|
||||
id="svg_9"
|
||||
style="fill:#ffffff;stroke:#808285;stroke-width:0.63380003" />
|
||||
</g>
|
||||
<g
|
||||
id="svg_10">
|
||||
<path
|
||||
class="st1"
|
||||
d="m 74.056438,10.372928 7.33561,0 c 7.71174,0 13.91856,6.959379 13.91856,15.611616 0,8.652239 -6.20682,15.611649 -13.91856,15.611649 -0.7524,0 -7.33561,0 -7.33561,0 l 0,-31.223259 0,-6e-6 z m 5.07848,25.956683 2.06903,0 c 4.51418,0 8.27603,-4.702285 8.27603,-10.345067 0,-5.642718 -3.76185,-10.345065 -8.27603,-10.345065 -0.7524,0 -2.06903,0 -2.06903,0 l 0,20.690132 z"
|
||||
id="svg_11"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#808285" />
|
||||
<path
|
||||
class="st2"
|
||||
d="m 112.23911,41.972381 c -3.38566,0 -5.83086,-1.128548 -8.84033,-3.385653 l 0.56428,-4.7023 c 3.19757,1.692831 5.64276,2.821382 8.27605,2.821382 2.2571,0 5.26657,-1.316644 5.26657,-3.761842 0,-5.830848 -14.67117,-3.573748 -14.67117,-14.106898 0,-5.454667 4.70231,-9.2165067 10.34506,-9.2165067 3.57374,0 5.83085,1.1285527 9.0284,3.7618397 l -1.69283,4.138024 c -2.25709,-1.504738 -4.89038,-2.633286 -7.33557,-2.633286 -3.19757,0 -5.07849,1.692828 -5.07849,3.573747 0,5.642758 14.67118,4.13802 14.67118,13.730712 0.37618,6.583218 -4.89038,9.780781 -10.53315,9.780781 z"
|
||||
id="svg_12"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#c0d028" />
|
||||
<path
|
||||
class="st2"
|
||||
d="m 152.86689,20.906061 c 0,5.642781 -4.70248,10.345067 -10.34483,10.345067 -0.37657,0 -6.20688,0 -6.20688,0 l 0,10.345066 -5.26702,0 0,-31.223259 11.4739,0 c 5.64235,0 10.34483,4.70231 10.34483,10.533126 l 0,0 z m -5.2664,0 c 0,-2.821357 -2.25693,-5.266582 -5.26639,-5.266582 -0.56455,0 -6.20752,0 -6.20752,0 l 0,10.345066 6.20752,0 c 3.00946,0 5.26639,-2.257062 5.26639,-5.078484 z"
|
||||
id="svg_13"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#c0d028" />
|
||||
<path
|
||||
class="st2"
|
||||
d="m 167.35006,41.596206 -5.26657,0 0,-19.749664 c 0,-7.711772 4.70229,-11.849793 10.34504,-11.849793 5.83086,0 10.34507,4.326115 10.34507,11.849793 l 0,19.749664 -5.26657,0 0,-10.345066 -10.34509,0 0,10.345066 0.18812,0 z m 10.34506,-19.749664 c 0,-4.514206 -2.2571,-6.771311 -5.26659,-6.771311 -2.82137,0 -5.26659,2.257105 -5.26659,6.771311 l 0,4.138026 10.34509,0 0,-4.138026 0.18809,0 z"
|
||||
id="svg_14"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#c0d028" />
|
||||
<path
|
||||
class="st2"
|
||||
d="m 205.90865,9.996749 c 3.76197,0 7.89991,2.445192 9.96888,6.018928 l -3.19743,2.821422 c -2.06898,-2.633323 -4.13792,-3.761854 -6.58284,-3.761854 -4.13857,0 -7.71193,4.137989 -7.71193,10.9093 0,6.771311 3.57336,10.909362 7.71193,10.909362 2.25694,0 4.51386,-1.12853 6.58284,-3.761852 l 3.19743,2.821357 c -2.25695,3.573755 -6.20691,6.018978 -9.96888,6.018978 -7.89929,0 -13.1663,-7.147511 -13.1663,-15.987846 0,-8.840275 5.2664,-15.987795 13.1663,-15.987795 l 0,0 z"
|
||||
id="svg_15"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#c0d028" />
|
||||
<path
|
||||
class="st2"
|
||||
d="m 224.34197,10.372928 15.61185,0 0,5.266551 -10.34546,0 0,6.207076 10.34546,0 0,5.266585 -10.34546,0 0,9.404567 10.34546,0 0,5.266583 -15.61185,0 0,-31.411356 0,-6e-6 z"
|
||||
id="svg_16"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#c0d028" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.8 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="50px"
|
||||
height="49.8px" viewBox="0 0 50 49.8" style="enable-background:new 0 0 50 49.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.st0{fill:#FFFFFF;stroke:#808285;stroke-width:1.0563;}
|
||||
.st1{fill:#C0D028;}
|
||||
.st2{fill:url(#SVGID_1_);}
|
||||
.st3{fill:#FFFFFF;stroke:#808285;stroke-width:0.4225;}
|
||||
.st4{fill:#FFFFFF;stroke:#808285;stroke-width:0.6338;}
|
||||
.st5{fill:#FFFFFF;stroke:#808285;stroke-width:0.6761;}
|
||||
.st6{fill:#FFFFFF;stroke:#808285;stroke-width:0.8451;}
|
||||
.st7{display:none;}
|
||||
]]>
|
||||
</style>
|
||||
<g id="Layer_2">
|
||||
<g id="NPfmWn.tif" class="st7">
|
||||
|
||||
<image style="display:inline;overflow:visible;" width="1030" height="1021" id="Layer_0_1_" xlink:href="BD73B7B71A09C4DB.png" transform="matrix(9.420461e-02 0 0 9.420461e-02 -23.5151 -23.4106)">
|
||||
</image>
|
||||
</g>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="24.8892" x2="49.9995" y2="24.8892">
|
||||
<stop offset="0" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="1" style="stop-color:#FFFFFF"/>
|
||||
</linearGradient>
|
||||
<path class="st2" d="M50,37.9c0,6.5-5.3,11.9-11.9,11.9H11.9C5.3,49.8,0,44.5,0,37.9V11.9C0,5.3,5.3,0,11.9,0h26.3
|
||||
C44.7,0,50,5.3,50,11.9V37.9z"/>
|
||||
</g>
|
||||
<g id="Layer_1">
|
||||
<g>
|
||||
<rect x="21.2" y="20.5" class="st1" width="7.6" height="7.6"/>
|
||||
<g>
|
||||
<rect x="32.3" y="22.3" class="st3" width="4.3" height="4.3"/>
|
||||
<rect x="22.2" y="11.7" class="st5" width="5.5" height="5.5"/>
|
||||
<rect x="11.6" y="20.9" class="st0" width="6.8" height="6.8"/>
|
||||
<rect x="12.9" y="30.5" class="st3" width="4.2" height="4.2"/>
|
||||
<rect x="21.6" y="31.2" class="st6" width="6.9" height="6.9"/>
|
||||
<rect x="31.5" y="30.2" class="st4" width="5.8" height="5.8"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
43
dspace-xmlui-mirage2/src/main/webapp/images/DSpace-logo.svg
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="158.7px" height="52.4px" viewBox="0 0 158.7 52.4" style="enable-background:new 0 0 158.7 52.4;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.st0{fill:#FFFFFF;stroke:#808285;stroke-width:1.0563;}
|
||||
.st1{fill:#808285;}
|
||||
.st2{fill:#C0D028;}
|
||||
.st3{fill:#FFFFFF;stroke:#808285;stroke-width:0.4225;}
|
||||
.st4{fill:#FFFFFF;stroke:#808285;stroke-width:0.6338;}
|
||||
.st5{fill:#FFFFFF;stroke:#808285;stroke-width:0.6761;}
|
||||
.st6{fill:#FFFFFF;stroke:#808285;stroke-width:0.8451;}
|
||||
]]>
|
||||
</style>
|
||||
<g>
|
||||
<rect x="19.1" y="17.7" class="st2" width="14.8" height="14.8"/>
|
||||
<g>
|
||||
<rect x="40.6" y="21.2" class="st3" width="8.3" height="8.3"/>
|
||||
<rect x="21.2" y="0.5" class="st5" width="10.7" height="10.7"/>
|
||||
<rect x="0.6" y="18.5" class="st0" width="13.2" height="13.2"/>
|
||||
<rect x="3.1" y="37.2" class="st3" width="8.2" height="8.2"/>
|
||||
<rect x="19.8" y="38.5" class="st6" width="13.4" height="13.4"/>
|
||||
<rect x="39.1" y="36.5" class="st4" width="11.3" height="11.3"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st1" d="M70.5,16.8h3.9c4.1,0,7.4,3.7,7.4,8.3c0,4.6-3.3,8.3-7.4,8.3c-0.4,0-3.9,0-3.9,0V16.8z M73.2,30.6h1.1
|
||||
c2.4,0,4.4-2.5,4.4-5.5c0-3-2-5.5-4.4-5.5c-0.4,0-1.1,0-1.1,0V30.6z"/>
|
||||
<path class="st2" d="M90.8,33.6c-1.8,0-3.1-0.6-4.7-1.8l0.3-2.5c1.7,0.9,3,1.5,4.4,1.5c1.2,0,2.8-0.7,2.8-2c0-3.1-7.8-1.9-7.8-7.5
|
||||
c0-2.9,2.5-4.9,5.5-4.9c1.9,0,3.1,0.6,4.8,2l-0.9,2.2c-1.2-0.8-2.6-1.4-3.9-1.4c-1.7,0-2.7,0.9-2.7,1.9c0,3,7.8,2.2,7.8,7.3
|
||||
C96.6,31.9,93.8,33.6,90.8,33.6z"/>
|
||||
<path class="st2" d="M112.4,22.4c0,3-2.5,5.5-5.5,5.5c-0.2,0-3.3,0-3.3,0v5.5h-2.8V16.8h6.1C109.9,16.8,112.4,19.3,112.4,22.4z
|
||||
M109.6,22.4c0-1.5-1.2-2.8-2.8-2.8c-0.3,0-3.3,0-3.3,0v5.5h3.3C108.4,25.1,109.6,23.9,109.6,22.4z"/>
|
||||
<path class="st2" d="M120.1,33.4h-2.8V22.9c0-4.1,2.5-6.3,5.5-6.3c3.1,0,5.5,2.3,5.5,6.3v10.5h-2.8v-5.5h-5.5V33.4z M125.6,22.9
|
||||
c0-2.4-1.2-3.6-2.8-3.6c-1.5,0-2.8,1.2-2.8,3.6v2.2h5.5V22.9z"/>
|
||||
<path class="st2" d="M140.6,16.6c2,0,4.2,1.3,5.3,3.2l-1.7,1.5c-1.1-1.4-2.2-2-3.5-2c-2.2,0-4.1,2.2-4.1,5.8
|
||||
c0,3.6,1.9,5.8,4.1,5.8c1.2,0,2.4-0.6,3.5-2l1.7,1.5c-1.2,1.9-3.3,3.2-5.3,3.2c-4.2,0-7-3.8-7-8.5
|
||||
C133.6,20.4,136.4,16.6,140.6,16.6z"/>
|
||||
<path class="st2" d="M150.4,16.8h8.3v2.8h-5.5v3.3h5.5v2.8h-5.5v5h5.5v2.8h-8.3V16.8z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 595 B |
After Width: | Height: | Size: 626 B |
After Width: | Height: | Size: 546 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 537 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 558 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 588 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 599 B |
BIN
dspace-xmlui-mirage2/src/main/webapp/images/authority_control/confidence/bug.png
Executable file
After Width: | Height: | Size: 774 B |
@@ -0,0 +1,53 @@
|
||||
====
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
====
|
||||
16x16 Free Application Icons
|
||||
|
||||
This icon set is free for use in personal and commercial projects.
|
||||
|
||||
License Agreement
|
||||
|
||||
By purchasing icons from Aha-Soft, You (the purchaser)
|
||||
agree to the terms of this agreement, as detailed below.
|
||||
|
||||
You may use the icons from Aha-Soft in commercial and
|
||||
personal design projects, software or Internet products.
|
||||
Icons can be displayed in documentation, help files, and
|
||||
advertising materials. You are free to sell and distribute
|
||||
products and projects using purchased icons without further
|
||||
royalty fees.
|
||||
|
||||
All icon files are provided 'as is'. Aha-Soft cannot be
|
||||
held liable for any negative issues that may occur as a
|
||||
result of using the icons.
|
||||
|
||||
You agree that all ownership and copyright of the icons
|
||||
remains the property of Aha-Soft. You may not resell,
|
||||
distribute, lease, license or sub-license the icons or
|
||||
modified icons (or a subset of the icons), to any third
|
||||
party unless they are incorporated into your software or
|
||||
design products.
|
||||
|
||||
If you have any questions regarding copyright or licensing,
|
||||
including whether another license is required for icon use
|
||||
within products, please contact us here: www.aha-soft.com/support.htm
|
||||
|
||||
Product page: http://www.small-icons.com/stock-icons/16x16-free-application-icons.htm
|
||||
|
||||
Icon Design Service
|
||||
|
||||
We can design custom icons for you. Please find the basic information
|
||||
about ordering icons, pricing and the portfolio here:
|
||||
www.aha-soft.com/customdev/design.htm
|
||||
|
||||
|
||||
Notice
|
||||
Web-site small-icons.com belongs to Aha-Soft.
|
||||
|
||||
Support page: http://www.aha-soft.com/support.htm
|
||||
|
||||
Copyright <20> 2009 Aha-Soft. All rights reserved.
|
BIN
dspace-xmlui-mirage2/src/main/webapp/images/authority_control/invisible.gif
Executable file
After Width: | Height: | Size: 43 B |
BIN
dspace-xmlui-mirage2/src/main/webapp/images/authority_control/lock24.png
Executable file
After Width: | Height: | Size: 904 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 673 B |
BIN
dspace-xmlui-mirage2/src/main/webapp/images/authority_control/unlock24.png
Executable file
After Width: | Height: | Size: 905 B |
BIN
dspace-xmlui-mirage2/src/main/webapp/images/cc-ship.gif
Executable file
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 87 B |
After Width: | Height: | Size: 115 B |
After Width: | Height: | Size: 98 B |
After Width: | Height: | Size: 111 B |
After Width: | Height: | Size: 110 B |
After Width: | Height: | Size: 99 B |
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 120 B |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.3 KiB |
25
dspace-xmlui-mirage2/src/main/webapp/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Mirage2",
|
||||
"version": "0.1.1",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"bower": "latest",
|
||||
"grunt": "~0.4.4",
|
||||
"grunt-cli": "latest",
|
||||
"grunt-contrib-compass": "~0.6.0",
|
||||
"load-grunt-tasks": "~0.1.0",
|
||||
"time-grunt": "~0.1.1",
|
||||
"grunt-contrib-coffee": "~0.7.0",
|
||||
"grunt-contrib-handlebars": "~0.5.12",
|
||||
"grunt-usemin": "~2.1.0",
|
||||
"grunt-contrib-uglify": "~0.4.0",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-copy": "~0.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "bower install"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.17 <0.11"
|
||||
}
|
||||
}
|
44
dspace-xmlui-mirage2/src/main/webapp/scripts.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
<scripts>
|
||||
<!-- build:js scripts/theme.js-->
|
||||
<script src="vendor/jquery/jquery.min.js"> </script>
|
||||
<script src="vendor/jquery-ui/ui/jquery.ui.core.js"></script>
|
||||
<script src="vendor/jquery-ui/ui/jquery.ui.datepicker.js"></script>
|
||||
<script src="vendor/handlebars/handlebars.js"> </script>
|
||||
<script src="vendor/holderjs/holder.js"> </script>
|
||||
<!--<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/affix.js"> </script>-->
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/alert.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/button.js"> </script>
|
||||
<!--<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/carousel.js"> </script>-->
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/collapse.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/dropdown.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/modal.js"> </script>
|
||||
<!--<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/scrollspy.js"> </script>-->
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/tab.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/tooltip.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/popover.js"> </script>
|
||||
<script src="vendor/bootstrap-sass-official/assets/javascripts/bootstrap/transition.js"> </script>
|
||||
<script src="scripts/utils.js"> </script>
|
||||
<script src="scripts/search-controls.js"> </script>
|
||||
<script src="scripts/sidebar.js"> </script>
|
||||
<script src="scripts/community-list.js"> </script>
|
||||
<script src="scripts/browse.js"> </script>
|
||||
<script src="scripts/choice-support.js"> </script>
|
||||
<script src="scripts/vocabulary-support.js"> </script>
|
||||
<script src="scripts/access-form-util.js"> </script>
|
||||
<script src="scripts/forms.js"> </script>
|
||||
<script src="scripts/vendor-extensions.js"> </script>
|
||||
<script src="scripts/templates.js"> </script>
|
||||
<!-- endbuild -->
|
||||
<!-- build:remove -->
|
||||
<script src="scripts/set-devmode.js"> </script>
|
||||
<!-- endbuild -->
|
||||
</scripts>
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
$(function() {
|
||||
|
||||
$(function() {
|
||||
initAccessSubmissionForm();
|
||||
});
|
||||
|
||||
function initAccessSubmissionForm() {
|
||||
if ($('input[name|="open_access_radios"]').length >0){
|
||||
|
||||
$('input[name|="open_access_radios"]').change(function(){
|
||||
// Visible
|
||||
if ($('input[name|="open_access_radios"]:checked').val() == '0'){
|
||||
disableFields();
|
||||
}
|
||||
// Embargoed
|
||||
else if ($('input[name|="open_access_radios"]:checked').val() == '1'){
|
||||
enableFields()
|
||||
}
|
||||
});
|
||||
|
||||
if ($('input[name|="open_access_radios"]:checked').val() == '0'){
|
||||
disableFields();
|
||||
}
|
||||
// Embargoed
|
||||
else if ($('input[name|="open_access_radios"]:checked').val() == '1'){
|
||||
enableFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function enableFields() {
|
||||
$("#aspect_submission_StepTransformer_field_reason").removeAttr("disabled");
|
||||
$("#aspect_submission_StepTransformer_field_embargo_until_date").removeAttr("disabled");
|
||||
|
||||
}
|
||||
|
||||
function disableFields() {
|
||||
$("#aspect_submission_StepTransformer_field_reason").attr("disabled", "disabled");
|
||||
$("#aspect_submission_StepTransformer_field_embargo_until_date").attr("disabled", "disabled");
|
||||
}
|
||||
});
|
52
dspace-xmlui-mirage2/src/main/webapp/scripts/browse.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function($) {
|
||||
$(function() {
|
||||
init_browse_navigation();
|
||||
init_sort_options_menu();
|
||||
});
|
||||
|
||||
function init_sort_options_menu() {
|
||||
$('.sort-options-menu a').click(function() {
|
||||
var $this, browse_controls;
|
||||
$this = $(this);
|
||||
browse_controls = $('#aspect_artifactbrowser_ConfigurableBrowse_div_browse-controls, ' +
|
||||
'#aspect_administrative_WithdrawnItems_div_browse-controls, ' +
|
||||
'#aspect_administrative_PrivateItems_div_browse-controls');
|
||||
$('*[name="' +$this.data('name') + '"]', browse_controls).val($this.data('returnvalue'));
|
||||
$('.btn', browse_controls).click();
|
||||
$this.closest('.open').removeClass('open');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function init_browse_navigation() {
|
||||
$('.alphabet-select').change(function() {
|
||||
var $this = $(this);
|
||||
$this.mouseout();
|
||||
window.location = $this.val();
|
||||
return false
|
||||
});
|
||||
|
||||
$('#aspect_artifactbrowser_ConfigurableBrowse_field_year').change(function() {
|
||||
$('#aspect_artifactbrowser_ConfigurableBrowse_field_starts_with').val('');
|
||||
$('#aspect_artifactbrowser_ConfigurableBrowse_field_submit').click();
|
||||
});
|
||||
|
||||
$('#aspect_administrative_WithdrawnItems_field_year').change(function() {
|
||||
$('#aspect_administrative_WithdrawnItems_field_starts_with').val('');
|
||||
$('#aspect_administrative_WithdrawnItems_field_submit').click();
|
||||
});
|
||||
|
||||
$('#aspect_administrative_PrivateItems_field_year').change(function() {
|
||||
$('#aspect_administrative_PrivateItems_field_starts_with').val('');
|
||||
$('#aspect_administrative_PrivateItems_field_submit').click();
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
557
dspace-xmlui-mirage2/src/main/webapp/scripts/choice-support.js
Normal file
@@ -0,0 +1,557 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
// Client-side scripting to support DSpace Choice Control
|
||||
|
||||
// IMPORTANT NOTE:
|
||||
// This version of choice-support.js has been rewritten to use jQuery
|
||||
// instead of prototype & scriptaculous. The goal was not to change the
|
||||
// way it works in any way, just to get the prototype dependency out.
|
||||
// @Author Art Lowel (art.lowel at atmire.com)
|
||||
|
||||
// Entry points:
|
||||
// 1. DSpaceAutocomplete -- add autocomplete (suggest) to an input field
|
||||
//
|
||||
// 2. DSpaceChoiceLookup -- create popup window with authority choices
|
||||
//
|
||||
// @Author: Larry Stone <lcs@hulmail.harvard.edu>
|
||||
// $Revision $
|
||||
|
||||
// -------------------- support for Autocomplete (Suggest)
|
||||
|
||||
// Autocomplete utility:
|
||||
// Arguments:
|
||||
// formID -- ID attribute of form tag
|
||||
// args properties:
|
||||
// metadataField -- metadata field e.g. dc_contributor_author
|
||||
// inputName -- input field name for text input, or base of "Name" pair
|
||||
// authorityName -- input field name in which to set authority
|
||||
// containerID -- ID attribute of DIV to hold the menu objects
|
||||
// indicatorID -- ID attribute of element to use as a "loading" indicator
|
||||
// confidenceIndicatorID -- ID of element on which to set confidence
|
||||
// confidenceName - NAME of confidence input (not ID)
|
||||
// contextPath -- URL path prefix (i.e. webapp contextPath) for DSpace.
|
||||
// collection -- db ID of dspace collection to serve as context
|
||||
// isClosed -- true if authority value is required, false = non-auth allowed
|
||||
// XXX Can't really enforce "isClosed=true" with autocomplete, user can type anything
|
||||
//
|
||||
// NOTE: Successful autocomplete always sets confidence to 'accepted' since
|
||||
// authority value (if any) *was* chosen interactively by a human.
|
||||
function DSpaceSetupAutocomplete(formID, args) {
|
||||
|
||||
$(function() {
|
||||
if (args.authorityName == null)
|
||||
args.authorityName = dspace_makeFieldInput(args.inputName, '_authority');
|
||||
var form = $('#' + formID)[0];
|
||||
var inputID = form.elements[args.inputName].id;
|
||||
|
||||
var authorityID = null;
|
||||
if (form.elements[args.authorityName] != null)
|
||||
authorityID = form.elements[args.authorityName].id;
|
||||
|
||||
// AJAX menu source, can add &query=TEXT
|
||||
var choiceURL = args.contextPath + "/choices/" + args.metadataField;
|
||||
var collID = args.collection == null ? -1 : args.collection;
|
||||
choiceURL += '?collection=' + collID;
|
||||
|
||||
var ac = $('#' + inputID);
|
||||
ac.autocomplete({
|
||||
source: function(request, response) {
|
||||
var reqUrl = choiceURL;
|
||||
if(request && request.term) {
|
||||
reqUrl += "&query=" + request.term;
|
||||
}
|
||||
$.get(reqUrl, function(xmldata) {
|
||||
var options = [];
|
||||
var authorities = [];
|
||||
$(xmldata).find('Choice').each(function() {
|
||||
// get value
|
||||
var value = $(this).attr('value') ? $(this).attr('value') : null;
|
||||
// get label, if empty set it to value
|
||||
var label = $(this).text() ? $(this).text() : value;
|
||||
// if value was empty but label was provided, set value to label
|
||||
if(!value) {
|
||||
value = label;
|
||||
}
|
||||
// if at this point either value or label == null, this means none of both were set and we shouldn't add it to the list of options
|
||||
if (label != null) {
|
||||
options.push({
|
||||
label: label,
|
||||
value: value
|
||||
});
|
||||
authorities['label: ' + label + ', value: ' + value] = $(this).attr('authority') ? $(this).attr('authority') : value;
|
||||
}
|
||||
});
|
||||
ac.data('authorities',authorities);
|
||||
response(options);
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
// NOTE: lookup element late because it might not be in DOM
|
||||
// at the time we evaluate the function..
|
||||
// var authInput = document.getElementById(authorityID);
|
||||
// var authValue = li == null ? "" : li.getAttribute("authority");
|
||||
var authInput = $('#' + authorityID);
|
||||
if(authInput.length > 0) {
|
||||
authInput = authInput[0];
|
||||
}
|
||||
else {
|
||||
authInput = null;
|
||||
}
|
||||
var authorities = ac.data('authorities');
|
||||
var authValue = authorities['label: ' + ui.item.label + ', value: ' + ui.item.value];
|
||||
if (authInput != null) {
|
||||
authInput.value = authValue;
|
||||
// update confidence input's value too if available.
|
||||
if (args.confidenceName != null) {
|
||||
var confInput = authInput.form.elements[args.confidenceName];
|
||||
if (confInput != null)
|
||||
confInput.value = 'accepted';
|
||||
}
|
||||
}
|
||||
// make indicator blank if no authority value
|
||||
DSpaceUpdateConfidence(document, args.confidenceIndicatorID,
|
||||
authValue == null || authValue == '' ? 'blank' : 'accepted');
|
||||
}
|
||||
}).autocomplete( "widget").addClass( 'dropdown-menu' );
|
||||
$(".ui-helper-hidden-accessible").hide();
|
||||
});
|
||||
}
|
||||
|
||||
// -------------------- support for Lookup Popup
|
||||
|
||||
// Create popup window with authority choices for value of an input field.
|
||||
// This is intended to be called by onClick of a "Lookup" or "Add" button.
|
||||
function DSpaceChoiceLookup(url, field, formID, valueInput, authInput,
|
||||
confIndicatorID, collectionID, isName, isRepeating) {
|
||||
|
||||
|
||||
|
||||
// fill in parameters for URL of popup window
|
||||
url += '?field=' + field + '&formID=' + formID + '&valueInput=' + valueInput +
|
||||
'&authorityInput=' + authInput + '&collection=' + collectionID +
|
||||
'&isName=' + isName + '&isRepeating=' + isRepeating + '&confIndicatorID=' + confIndicatorID +
|
||||
'&limit=50'; //limit to 50 results at once (make configurable?)
|
||||
|
||||
$.ajax({
|
||||
dataType: "html",
|
||||
url: url,
|
||||
success: function(data){
|
||||
var modal = $('<div class="modal fade">' + data + '</div>');
|
||||
$( "body" ).append(modal);
|
||||
modal.modal();
|
||||
var form = document.getElementById('aspect_general_ChoiceLookupTransformer_div_lookup');
|
||||
DSpaceChoicesSetup(form);
|
||||
//In case of lookups for different fields, we get duplications of ids. So we just remove the modal.
|
||||
modal.on('hidden.bs.modal', function () {
|
||||
$(this).remove();
|
||||
})
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// Run this as the Lookup page is loaded to initialize DOM objects, load choices
|
||||
function DSpaceChoicesSetup(form) {
|
||||
// find the "LEGEND" in fieldset, which acts as page title,
|
||||
var legend = $('#aspect_general_ChoiceLookupTransformer_div_lookup :header:not(.page-header)');
|
||||
//save the template as a jQuery data field
|
||||
if (!legend.data('template')) {
|
||||
legend.data('template', legend.html());
|
||||
}
|
||||
legend.html("Loading...");
|
||||
DSpaceChoicesLoad(form);
|
||||
}
|
||||
|
||||
|
||||
// Populate the "select" (in popup window) with options from ajax request
|
||||
// stash some parameters as properties of the "select" so we can add to
|
||||
// the last start index to query for next set of results.
|
||||
function DSpaceChoicesLoad(form) {
|
||||
var field = $('*[name = paramField]').val();
|
||||
var value = $('*[name = paramValue]').val();
|
||||
if (!value)
|
||||
value = '';
|
||||
var start = $('*[name = paramStart]').val();
|
||||
var limit = $('*[name = paramLimit]').val();
|
||||
var formID = $('*[name = paramFormID]').val();
|
||||
var collID = $('*[name = paramCollection]').val();
|
||||
var isName = $('*[name = paramIsName]').val() == 'true';
|
||||
var isRepeating = $('*[name = paramIsRepeating]').val() == 'true';
|
||||
var isClosed = $('*[name = paramIsClosed]').val() == 'true';
|
||||
var contextPath = $('*[name = contextPath]').val();
|
||||
var fail = $('*[name = paramFail]').val();
|
||||
var valueInput = $('*[name = paramValueInput]').val();
|
||||
var nonAuthority = "";
|
||||
var pNAInput = $('*[name = paramNonAuthority]');
|
||||
if (pNAInput.length > 0)
|
||||
nonAuthority = pNAInput.val();
|
||||
|
||||
// get value from form inputs in opener if not explicitly supplied
|
||||
if (value.length == 0) {
|
||||
// This bit of javascript is accessing the form that opened the popup window,
|
||||
// so that we can grab the value the user entered before pressing the "Lookup & Add" button
|
||||
var of = $(window.document).find('#' + formID);
|
||||
if (isName)
|
||||
value = makePersonName(of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_last') + ']').val(),
|
||||
of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_first') + ']').val());
|
||||
else
|
||||
value = of.find('*[name = ' + valueInput + ']').val();
|
||||
|
||||
// if this is a repeating input, clear the source value so that e.g.
|
||||
// clicking "Next" on a submit-describe page will not *add* the proposed
|
||||
// lookup text as a metadata value:
|
||||
if (isRepeating) {
|
||||
if (isName) {
|
||||
of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_last') + ']').val('');
|
||||
of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_first') + ']').val('');
|
||||
}
|
||||
else
|
||||
of.find('*[name = ' + valueInput + ']').val(null);
|
||||
}
|
||||
|
||||
// Save passed-in value to hidden 'paramValue' field in the popup window
|
||||
// (This will allow the user to get "more results" for the same query,
|
||||
// if results are on more than one page.)
|
||||
$('*[name = paramValue]').val(value);
|
||||
}
|
||||
|
||||
var select = $('select[name = chooser]:first');
|
||||
select.addClass('loading');
|
||||
|
||||
$(window).ajaxError(function(e, xhr, settings, exception) {
|
||||
window.alert(fail + " Exception=" + e);
|
||||
if (select!= null) select.removeClass('loading');
|
||||
});
|
||||
|
||||
// AJAX to send off the query to the "/choices" URL, and
|
||||
// then parse the response based on whether it was successful or error occurred
|
||||
// NOTE: you can send this same query manually to see result sample.
|
||||
// Just enter the URL & pass all data values on query string.
|
||||
$.ajax({
|
||||
url: contextPath + "/choices/" + field,
|
||||
type: "GET",
|
||||
data: {query: value, collection: collID,
|
||||
start: start, limit: limit},
|
||||
error: function() {
|
||||
window.alert(fail + " HTTP error resonse");
|
||||
if (select!= null) select.removeClass('loading');
|
||||
},
|
||||
success: function(data) {
|
||||
var Choices = $(data).find('Choices');
|
||||
var err = Choices.attr('error');
|
||||
if (err != null && err == 'true')
|
||||
window.alert(fail + " Server indicates error in response.");
|
||||
var opts = Choices.find('Choice');
|
||||
|
||||
// update range message and update 'more' button
|
||||
var oldStart = 1 * Choices.attr('start');
|
||||
var nextStart = oldStart + opts.length;
|
||||
var lastTotal = Choices.attr('total');
|
||||
var resultMore = Choices.attr('more');
|
||||
//if no more results to display, then disable the "more" button
|
||||
if(resultMore==null || resultMore == 'false')
|
||||
$('*[name = more]').attr('disabled', 'true');
|
||||
else //otherwise, enable the "more" button
|
||||
$('*[name = more]').removeAttr('disabled');
|
||||
// save next starting index to hidden field
|
||||
$('*[name = paramStart]').val(nextStart);
|
||||
|
||||
if (select!= null) select.removeClass('loading');
|
||||
|
||||
select.find('option').remove();
|
||||
var lastOption = select.find('option:last');
|
||||
|
||||
var selectedByValue = -1; // select by value match
|
||||
var selectedByChoices = -1; // Choice says its selected
|
||||
$.each(opts, function(index) {
|
||||
var current = $(this);
|
||||
if (current.attr('value') == value)
|
||||
selectedByValue = index;
|
||||
if(current.attr('selected') != undefined)
|
||||
selectedByChoices = index;
|
||||
|
||||
var newOption = $('<option value="' + current.attr('value') + '">' + current.text() + '</option>');
|
||||
newOption.data('authority', current.attr('authority'));
|
||||
|
||||
if (lastOption.length > 0)
|
||||
lastOption.before(newOption);
|
||||
else
|
||||
select.append(newOption);
|
||||
});
|
||||
|
||||
|
||||
// add non-authority option if needed.
|
||||
if (!isClosed) {
|
||||
select.append(new Option(dspace_formatMessage(nonAuthority, value), value), null);
|
||||
}
|
||||
var defaultSelected = -1;
|
||||
if (selectedByChoices >= 0)
|
||||
defaultSelected = selectedByChoices;
|
||||
else if (selectedByValue >= 0)
|
||||
defaultSelected = selectedByValue;
|
||||
else if (select[0].options.length == 1)
|
||||
defaultSelected = 0;
|
||||
|
||||
// load default-selected value
|
||||
if (defaultSelected >= 0) {
|
||||
select[0].options[defaultSelected].defaultSelected = true;
|
||||
var so = select[0].options[defaultSelected];
|
||||
if (isName) {
|
||||
$('*[name = text1]').val(lastNameOf(so.value));
|
||||
$('*[name = text2]').val(firstNameOf(so.value));
|
||||
}
|
||||
else
|
||||
$('*[name = text1]').val(so.value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//If no results, make sure to display "0 to 0 of 0"
|
||||
var startNum = (nextStart==0 ? 0 : oldStart+1);
|
||||
//Fill out the counter values in the "Results x to y of z" line
|
||||
var legend = $('#aspect_general_ChoiceLookupTransformer_div_lookup :header:not(.page-header)');
|
||||
legend.html(dspace_formatMessage(legend.data('template'),
|
||||
startNum, nextStart, lastTotal, value));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// handler for change event on choice selector - load new values
|
||||
function DSpaceChoicesSelectOnChange() {
|
||||
// "this" is the window,
|
||||
|
||||
var form = $('#aspect_general_ChoiceLookupTransformer_div_lookup');
|
||||
var select = form.find('*[name = chooser]');
|
||||
|
||||
var isName = form.find('*[name = paramIsName]').val() == 'true';
|
||||
|
||||
var selectedValue = select.val();
|
||||
|
||||
if (isName) {
|
||||
form.find('*[name = text1]').val(lastNameOf(selectedValue));
|
||||
form.find('*[name = text2]').val(firstNameOf(selectedValue));
|
||||
}
|
||||
else
|
||||
form.find('*[name = text1]').val(selectedValue);
|
||||
}
|
||||
|
||||
// handler for lookup popup's accept (or add) button
|
||||
// stuff values back to calling page, force an add if necessary, and close.
|
||||
function DSpaceChoicesAcceptOnClick() {
|
||||
var select = $('*[name = chooser]');
|
||||
var isName = $('*[name = paramIsName]').val() == 'true';
|
||||
var isRepeating = $('*[name = paramIsRepeating]').val() == 'true';
|
||||
var valueInput = $('*[name = paramValueInput]').val();
|
||||
var authorityInput = $('*[name = paramAuthorityInput]').val();
|
||||
var formID = $('*[name = paramFormID]').val();
|
||||
var confIndicatorID = $('*[name = paramConfIndicatorID]').length = 0 ? null : $('*[name = paramConfIndicatorID]').val();
|
||||
|
||||
// default the authority input if not supplied.
|
||||
if (authorityInput.length == 0)
|
||||
authorityInput = dspace_makeFieldInput(valueInput, '_authority');
|
||||
|
||||
// always stuff text fields back into caller's value input(s)
|
||||
if (valueInput.length > 0) {
|
||||
var of = $(window.document).find('#' + formID);
|
||||
if (isName) {
|
||||
of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_last') + ']').val($('*[name = text1]').val());
|
||||
of.find('*[name = ' + dspace_makeFieldInput(valueInput, '_first') + ']').val($('*[name = text2]').val());
|
||||
}
|
||||
else
|
||||
of.find('*[name = ' + valueInput + ']').val($('*[name = text1]').val());
|
||||
|
||||
if (authorityInput.length > 0 && of.find('*[name = ' + authorityInput + ']').length > 0) {
|
||||
// conf input is auth input, substitute '_confidence' for '_authority'
|
||||
// if conf fieldname is FIELD_confidence_NUMBER, then '_authority_' => '_confidence_'
|
||||
var confInput = "";
|
||||
|
||||
var ci = authorityInput.lastIndexOf("_authority_");
|
||||
if (ci < 0)
|
||||
confInput = authorityInput.substring(0, authorityInput.length - 10) + '_confidence';
|
||||
else
|
||||
confInput = authorityInput.substring(0, ci) + "_confidence_" + authorityInput.substring(ci + 11);
|
||||
// DEBUG:
|
||||
// window.alert('Setting fields auth="'+authorityInput+'", conf="'+confInput+'"');
|
||||
|
||||
var authValue = null;
|
||||
var selectedOption = select.find(':selected');
|
||||
if (selectedOption.length >= 0 && selectedOption.data('authority') != null) {
|
||||
of.find('*[name = ' + authorityInput + ']').val(selectedOption.data('authority'));
|
||||
}
|
||||
of.find('*[name = ' + confInput + ']').val('accepted');
|
||||
// make indicator blank if no authority value
|
||||
DSpaceUpdateConfidence(window.document, confIndicatorID,
|
||||
authValue == null || authValue == '' ? 'blank' : 'accepted');
|
||||
}
|
||||
|
||||
// force the submit button -- if there is an "add"
|
||||
if (isRepeating) {
|
||||
var add = of.find('*[name = submit_' + valueInput + '_add]');
|
||||
if (add.length > 0)
|
||||
add.click();
|
||||
else
|
||||
alert('Sanity check: Cannot find button named "submit_' + valueInput + '_add"');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// handler for lookup popup's more button
|
||||
function DSpaceChoicesMoreOnClick() {
|
||||
//reload the window -- this should return the next results set
|
||||
// location.reload();
|
||||
var form = document.getElementById('aspect_general_ChoiceLookupTransformer_div_lookup');
|
||||
DSpaceChoicesSetup(form);
|
||||
}
|
||||
|
||||
//// handler for lookup popup's cancel button
|
||||
//function DSpaceChoicesCancelOnClick() {
|
||||
// window.close();
|
||||
// return false;
|
||||
//}
|
||||
|
||||
// -------------------- Utilities
|
||||
|
||||
// DSpace person-name conventions, see DCPersonName
|
||||
function makePersonName(lastName, firstName) {
|
||||
return (firstName == null || firstName.length == 0) ? lastName :
|
||||
lastName + ", " + firstName;
|
||||
}
|
||||
|
||||
// DSpace person-name conventions, see DCPersonName
|
||||
function firstNameOf(personName) {
|
||||
var comma = personName.indexOf(",");
|
||||
return (comma < 0) ? "" : stringTrim(personName.substring(comma + 1));
|
||||
}
|
||||
|
||||
// DSpace person-name conventions, see DCPersonName
|
||||
function lastNameOf(personName) {
|
||||
var comma = personName.indexOf(",");
|
||||
return stringTrim((comma < 0) ? personName : personName.substring(0, comma));
|
||||
}
|
||||
|
||||
// replicate java String.trim()
|
||||
function stringTrim(str) {
|
||||
var start = 0;
|
||||
var end = str.length;
|
||||
for (; str.charAt(start) == ' ' && start < end; ++start) ;
|
||||
for (; end > start && str.charAt(end - 1) == ' '; --end) ;
|
||||
return str.slice(start, end);
|
||||
}
|
||||
|
||||
// format utility - replace @1@, @2@ etc with args 1, 2, 3..
|
||||
// NOTE params MUST be monotonically increasing
|
||||
// NOTE we can't use "{1}" like the i18n catalog because it elides them!!
|
||||
// ...UNLESS maybe it were to be fixed not to when no params...
|
||||
function dspace_formatMessage() {
|
||||
var template = dspace_formatMessage.arguments[0];
|
||||
var i;
|
||||
for (i = 1; i < arguments.length; ++i) {
|
||||
var pattern = '@' + i + '@';
|
||||
if (template.search(pattern) >= 0)
|
||||
{
|
||||
var value = dspace_formatMessage.arguments[i];
|
||||
if (value == undefined)
|
||||
value = '';
|
||||
template = template.replace(pattern, value);
|
||||
}
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
// utility to make sub-field name of input field, e.g. _last, _first, _auth..
|
||||
// if name ends with _1, _2 etc, put sub-name BEFORE the number
|
||||
function dspace_makeFieldInput(name, sub) {
|
||||
var i = name.search("_[0-9]+$");
|
||||
if (i < 0)
|
||||
return name + sub;
|
||||
else
|
||||
return name.substr(0, i) + sub + name.substr(i);
|
||||
}
|
||||
|
||||
// update the class value of confidence-indicating element
|
||||
function DSpaceUpdateConfidence(doc, confIndicatorID, newValue) {
|
||||
// sanity checks - need valid ID and a real DOM object
|
||||
if (confIndicatorID == null || confIndicatorID == "")
|
||||
return;
|
||||
var confElt = doc.getElementById(confIndicatorID);
|
||||
if (confElt == null)
|
||||
return;
|
||||
|
||||
// add or update CSS class with new confidence value, e.g. "cf-accepted".
|
||||
if (confElt.className == null)
|
||||
confElt.className = "cf-" + newValue;
|
||||
else {
|
||||
var classes = confElt.className.split(" ");
|
||||
var newClasses = "";
|
||||
var found = false;
|
||||
for (var i = 0; i < classes.length; ++i) {
|
||||
if (classes[i].match('^cf-[a-zA-Z0-9]+$')) {
|
||||
newClasses += "cf-" + newValue + " ";
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
newClasses += classes[i] + " ";
|
||||
}
|
||||
if (!found)
|
||||
newClasses += "cf-" + newValue + " ";
|
||||
confElt.className = newClasses;
|
||||
}
|
||||
}
|
||||
|
||||
// respond to "onchanged" event on authority input field
|
||||
// set confidence to 'accepted' if authority was changed by user.
|
||||
function DSpaceAuthorityOnChange(self, confValueID, confIndicatorID) {
|
||||
var confidence = 'accepted';
|
||||
if (confValueID != null && confValueID != '') {
|
||||
var confValueField = document.getElementById(confValueID);
|
||||
if (confValueField != null)
|
||||
confValueField.value = confidence;
|
||||
}
|
||||
DSpaceUpdateConfidence(document, confIndicatorID, confidence);
|
||||
return false;
|
||||
}
|
||||
|
||||
// respond to click on the authority-value lock button in Edit Item Metadata:
|
||||
// "button" is bound to the image input for the lock button, "this"
|
||||
function DSpaceToggleAuthorityLock(button, authInputID) {
|
||||
// sanity checks - need valid ID and a real DOM object
|
||||
if (authInputID == null || authInputID == '')
|
||||
return false;
|
||||
var authInput = document.getElementById(authInputID);
|
||||
if (authInput == null)
|
||||
return false;
|
||||
|
||||
// look for is-locked or is-unlocked in class list:
|
||||
var classes = button.className.split(' ');
|
||||
var newClass = '';
|
||||
var newLocked = false;
|
||||
var found = false;
|
||||
for (var i = 0; i < classes.length; ++i) {
|
||||
if (classes[i] == 'is-locked') {
|
||||
newLocked = false;
|
||||
found = true;
|
||||
}
|
||||
else if (classes[i] == 'is-unlocked') {
|
||||
newLocked = true;
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
newClass += classes[i] + ' ';
|
||||
}
|
||||
if (!found)
|
||||
return false;
|
||||
// toggle the image, and set readability
|
||||
button.className = newClass + (newLocked ? 'is-locked' : 'is-unlocked') + ' ';
|
||||
authInput.readOnly = newLocked;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (window.runAfterJSImports != undefined){
|
||||
runAfterJSImports.execute();
|
||||
}
|
107
dspace-xmlui-mirage2/src/main/webapp/scripts/community-list.js
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function($) {
|
||||
$(init_community_list);
|
||||
|
||||
function init_community_list() {
|
||||
$('.community-browser-row .toggler').click(function() {
|
||||
var parent_row, parent_toggler, parent_wrappers, other_wrappers, other_toggler_rows, all_rows, target, $this, target_id, open_icon, closed_icon;
|
||||
$this = $(this);
|
||||
|
||||
$('.current-community-browser-row').removeClass('current-community-browser-row')
|
||||
.find('a strong').contents().unwrap();
|
||||
|
||||
target_id = $this.data('target');
|
||||
|
||||
parent_wrappers = $this.parents('.sub-tree-wrapper');
|
||||
other_wrappers = $('.sub-tree-wrapper:not(' + target_id + ')').not(parent_wrappers);
|
||||
other_wrappers.addClass('hidden');
|
||||
|
||||
other_toggler_rows = $([]);
|
||||
other_wrappers.each(function() {
|
||||
other_toggler_rows = other_toggler_rows.add(get_toggler_from_wrapper($(this)).closest('.community-browser-row'));
|
||||
});
|
||||
other_toggler_rows.removeClass('open-community-browser-row').addClass('closed-community-browser-row');
|
||||
|
||||
parent_row = $this.closest('.community-browser-row');
|
||||
|
||||
open_icon = $this.find('.open-icon');
|
||||
closed_icon = $this.find('.closed-icon');
|
||||
|
||||
all_rows = $('.community-browser-row');
|
||||
clear_relation_classes(all_rows);
|
||||
target = $(target_id);
|
||||
if (target.is(':visible')) {
|
||||
target.addClass('hidden');
|
||||
open_icon.addClass('hidden');
|
||||
closed_icon.removeClass('hidden');
|
||||
parent_row.removeClass('open-community-browser-row').addClass('closed-community-browser-row');
|
||||
target.find('.open-icon').addClass('hidden');
|
||||
target.find('.closed-icon').removeClass('hidden');
|
||||
parent_toggler = get_toggler_from_wrapper($this.closest('.sub-tree-wrapper'));
|
||||
if (parent_toggler.length > 0) {
|
||||
parent_toggler.closest('.community-browser-row').addClass('current-community-browser-row').find('a').wrapInner( "<strong></strong>");
|
||||
set_relation_classes(all_rows, parent_toggler, $(parent_toggler.data('target')), parent_toggler.parents('.sub-tree-wrapper'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
target.removeClass('hidden');
|
||||
open_icon.removeClass('hidden');
|
||||
closed_icon.addClass('hidden');
|
||||
parent_row.removeClass('closed-community-browser-row')
|
||||
.addClass('open-community-browser-row')
|
||||
.addClass('current-community-browser-row')
|
||||
.find('a').wrapInner( "<strong></strong>");
|
||||
set_relation_classes(all_rows, $this, target, parent_wrappers);
|
||||
}
|
||||
set_odd_even_rows();
|
||||
}).bind('touchend', function () {
|
||||
$(this).mouseout();
|
||||
});
|
||||
set_odd_even_rows();
|
||||
}
|
||||
|
||||
function set_relation_classes(all_rows, $this, target, parent_wrappers) {
|
||||
var related_rows, unrelated_rows, parent_rows;
|
||||
unrelated_rows = all_rows.not($this.parents('.community-browser-row')).not(target.find('.community-browser-row'));
|
||||
related_rows = parent_wrappers.find('.community-browser-row');
|
||||
parent_rows = $([]);
|
||||
parent_wrappers.each(function () {
|
||||
var toggler;
|
||||
toggler = get_toggler_from_wrapper($(this));
|
||||
parent_rows = parent_rows.add(toggler.parents('.community-browser-row'));
|
||||
});
|
||||
related_rows = unrelated_rows.filter(related_rows).not(parent_rows);
|
||||
unrelated_rows = unrelated_rows.not(related_rows).not(parent_rows);
|
||||
if (related_rows.length === 0 && unrelated_rows.length > 0) {
|
||||
related_rows = unrelated_rows;
|
||||
unrelated_rows = $([]);
|
||||
}
|
||||
related_rows.addClass('related-community-browser-row hidden-xs');
|
||||
related_rows.find('.open-icon').addClass('hidden');
|
||||
related_rows.find('.closed-icon').removeClass('hidden');
|
||||
unrelated_rows.addClass('unrelated-community-browser-row hidden-xs');
|
||||
}
|
||||
|
||||
function clear_relation_classes(all_rows) {
|
||||
all_rows.removeClass('related-community-browser-row hidden-xs').removeClass('unrelated-community-browser-row hidden-xs');
|
||||
}
|
||||
|
||||
function get_toggler_from_wrapper(wrapper) {
|
||||
return $('a[data-target="#' + wrapper.attr('id') + '"]');
|
||||
}
|
||||
|
||||
function set_odd_even_rows() {
|
||||
var visible_rows = $('.community-browser-row:visible');
|
||||
visible_rows.removeClass('odd-community-browser-row');
|
||||
visible_rows = visible_rows.not('.open-community-browser-row');
|
||||
visible_rows.filter(':odd').addClass('odd-community-browser-row');
|
||||
}
|
||||
|
||||
|
||||
})(jQuery);
|
20
dspace-xmlui-mirage2/src/main/webapp/scripts/forms.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
$(function() {
|
||||
|
||||
// HTML5 input date polyfill
|
||||
if(!Modernizr.inputtypes.date){
|
||||
$('input[type="date"]').each(function(){
|
||||
$(this).datepicker({dateFormat: 'yy-mm-dd'});
|
||||
});
|
||||
}
|
||||
|
||||
$('a.information').tooltip();
|
||||
|
||||
|
||||
});
|
279
dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js
Normal file
@@ -0,0 +1,279 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function($){
|
||||
var advanced_filters_template, simple_filters_template;
|
||||
|
||||
Handlebars.registerHelper('set_selected', function(value, options) {
|
||||
var $el = $('<select />').html( options.fn(this) );
|
||||
$el.find('[value=' + value + ']').attr({'selected':'selected'});
|
||||
return $el.html();
|
||||
});
|
||||
|
||||
if (typeof window.DSpace.discovery !== 'undefined') {
|
||||
DSpace.discovery.start_index = 1;
|
||||
|
||||
$(function () {
|
||||
calculateFilterIndices();
|
||||
backupOriginalFilters();
|
||||
assignGlobalEventHandlers();
|
||||
renderSimpleFilterSection();
|
||||
renderAdvancedFilterSection();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function getAdvancedFiltersTemplate() {
|
||||
if (!advanced_filters_template) {
|
||||
advanced_filters_template = DSpace.getTemplate('discovery_advanced_filters');
|
||||
}
|
||||
|
||||
return advanced_filters_template;
|
||||
}
|
||||
|
||||
function getSimpleFiltersTemplate() {
|
||||
if (!simple_filters_template) {
|
||||
simple_filters_template = DSpace.getTemplate('discovery_simple_filters');
|
||||
}
|
||||
|
||||
return simple_filters_template;
|
||||
}
|
||||
|
||||
function getNextFilterIndex() {
|
||||
return DSpace.discovery.start_index + DSpace.discovery.filters.length;
|
||||
}
|
||||
|
||||
function addNewFilter(index, type, relational_operator, query) {
|
||||
if (typeof index === 'number') {
|
||||
DSpace.discovery.filters.splice(index - DSpace.discovery.start_index, 0, {
|
||||
index: index,
|
||||
type: type,
|
||||
relational_operator: relational_operator,
|
||||
query: query
|
||||
});
|
||||
calculateFilterIndices();
|
||||
}
|
||||
else {
|
||||
DSpace.discovery.filters.push({
|
||||
index: getNextFilterIndex(),
|
||||
type: type,
|
||||
relational_operator: relational_operator,
|
||||
query: query
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getIndexFromFilterRow(filterRow) {
|
||||
return /filter-new-(\d+)/.exec(filterRow.attr('id'))[1] * 1;
|
||||
}
|
||||
|
||||
function updateFilterValues(filterRow) {
|
||||
var index, type, relational_operator, query, filter;
|
||||
index = getIndexFromFilterRow(filterRow);
|
||||
type = filterRow.find('select[name^="filtertype_"]').val();
|
||||
relational_operator = filterRow.find('select[name^="filter_relational_operator_"]').val();
|
||||
query = filterRow.find('input[name^="filter_"]').val();
|
||||
filter = {
|
||||
index: index,
|
||||
type: type,
|
||||
relational_operator: relational_operator,
|
||||
query: query
|
||||
};
|
||||
replaceFilter(filter);
|
||||
}
|
||||
|
||||
function replaceFilter(filter) {
|
||||
for (var i = 0; i < DSpace.discovery.filters.length; i++) {
|
||||
if (DSpace.discovery.filters[i].index === filter.index) {
|
||||
DSpace.discovery.filters[i] = filter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
calculateFilterIndices();
|
||||
}
|
||||
|
||||
function calculateFilterIndices() {
|
||||
for (var i = 0; i < DSpace.discovery.filters.length; i++) {
|
||||
DSpace.discovery.filters[i].index = i + DSpace.discovery.start_index;
|
||||
}
|
||||
}
|
||||
|
||||
function removeFilterAtIndex(index) {
|
||||
for (var i = 0; i < DSpace.discovery.filters.length; i++) {
|
||||
var filter = DSpace.discovery.filters[i];
|
||||
if (filter.index === index) {
|
||||
DSpace.discovery.filters.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
calculateFilterIndices();
|
||||
}
|
||||
|
||||
function renderAdvancedFilterSection() {
|
||||
var template, html, wrapper;
|
||||
|
||||
if (DSpace.discovery.filters.length === 0) {
|
||||
addNewFilter(null, null, null, '');
|
||||
}
|
||||
|
||||
template = getAdvancedFiltersTemplate();
|
||||
html = template({
|
||||
filters: DSpace.discovery.filters,
|
||||
i18n: DSpace.i18n.discovery
|
||||
});
|
||||
|
||||
unAssignAdvancedFilterEventHandlers(); //prevents memory leaks
|
||||
$('#new-filters-wrapper').remove();
|
||||
wrapper = $('<div id="new-filters-wrapper"/>').html(html);
|
||||
$('#aspect_discovery_SimpleSearch_row_filter-controls').before(wrapper);
|
||||
assignAdvancedFilterEventHandlers();
|
||||
}
|
||||
|
||||
function renderSimpleFilterSection() {
|
||||
var template, html, wrapper;
|
||||
|
||||
if (DSpace.discovery.filters.length > 0) {
|
||||
$('.active-filters-label').removeClass('hidden');
|
||||
}
|
||||
|
||||
template = getSimpleFiltersTemplate();
|
||||
html = template(DSpace.discovery);
|
||||
|
||||
unAssignSimpleFilterEventHandlers();
|
||||
$('#filters-overview-wrapper').remove();
|
||||
wrapper = $('<div id="filters-overview-wrapper"/>').html(html);
|
||||
$('#filters-overview-wrapper-squared').html('').append(wrapper);
|
||||
assignSimpleFilterEventHandlers();
|
||||
}
|
||||
|
||||
function assignSimpleFilterEventHandlers() {
|
||||
$('#filters-overview-wrapper .label').click(function (e) {
|
||||
var index = $(this).data('index');
|
||||
removeFilterAtIndex(index);
|
||||
renderAdvancedFilterSection();
|
||||
$('#aspect_discovery_SimpleSearch_div_search-filters').submit();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function unAssignSimpleFilterEventHandlers() {
|
||||
$('#filters-overview-wrapper .label').off();
|
||||
}
|
||||
|
||||
function assignAdvancedFilterEventHandlers() {
|
||||
var $filters = $('.search-filter');
|
||||
$filters.find('select, input').change(function() {
|
||||
updateFilterValues($(this).closest('.search-filter'));
|
||||
renderAdvancedFilterSection();
|
||||
});
|
||||
$filters.find('.filter-control.filter-add').click(function (e) {
|
||||
var index = getIndexFromFilterRow($(this).closest('.search-filter'));
|
||||
addNewFilter(index + 1, null, null, '');
|
||||
renderAdvancedFilterSection();
|
||||
return false;
|
||||
});
|
||||
var $removeButtons = $filters.find('.filter-control.filter-remove');
|
||||
$removeButtons.click(function (e) {
|
||||
var index = getIndexFromFilterRow($(this).closest('.search-filter'));
|
||||
removeFilterAtIndex(index);
|
||||
renderAdvancedFilterSection();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function unAssignAdvancedFilterEventHandlers() {
|
||||
var $filters = $('.search-filter');
|
||||
$filters.find('select, input').off();
|
||||
$filters.find('.filter-control.filter-add').off();
|
||||
$filters.find('.filter-control.filter-remove').off();
|
||||
}
|
||||
|
||||
function assignGlobalEventHandlers() {
|
||||
$('.show-advanced-filters').click(function () {
|
||||
var wrapper = $('#aspect_discovery_SimpleSearch_div_discovery-filters-wrapper');
|
||||
wrapper.parent().find('.discovery-filters-wrapper-head').hide().removeClass('hidden').fadeIn(200);
|
||||
wrapper.hide().removeClass('hidden').slideDown(200);
|
||||
$(this).addClass('hidden');
|
||||
$('.hide-advanced-filters').removeClass('hidden');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.hide-advanced-filters').click(function () {
|
||||
var wrapper = $('#aspect_discovery_SimpleSearch_div_discovery-filters-wrapper');
|
||||
wrapper.parent().find('.discovery-filters-wrapper-head').fadeOut(200, function() {
|
||||
$(this).addClass('hidden').removeAttr('style');
|
||||
});
|
||||
wrapper.slideUp(200, function() {
|
||||
$(this).addClass('hidden').removeAttr('style');
|
||||
});
|
||||
$(this).addClass('hidden');
|
||||
$('.show-advanced-filters').removeClass('hidden');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#aspect_discovery_SimpleSearch_field_submit_reset_filter').click(function() {
|
||||
restoreOriginalFilters();
|
||||
calculateFilterIndices();
|
||||
renderAdvancedFilterSection();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.discovery-add-filter-button').click(function() {
|
||||
addNewFilter(null, null, null, '');
|
||||
renderAdvancedFilterSection();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.controls-gear-wrapper').find('li.gear-option,li.gear-option a').click(function(event){
|
||||
var value, param, mainForm, params, listItem, $this;
|
||||
event.stopPropagation();
|
||||
$this = $(this);
|
||||
if($this.is('li')){
|
||||
listItem = $this;
|
||||
}else{
|
||||
listItem = $this.parents('li:first');
|
||||
}
|
||||
|
||||
//Check if this option is currently selected, if so skip the next stuff
|
||||
if(listItem.hasClass('gear-option-selected')){
|
||||
return false;
|
||||
}
|
||||
if(!$this.attr('href')){
|
||||
$this = $this.find('a');
|
||||
}
|
||||
//Retrieve the params we are to fill in in our main form
|
||||
params = $this.attr('href').split('&');
|
||||
|
||||
mainForm = $('#aspect_discovery_SimpleSearch_div_main-form');
|
||||
//Split them & fill in in the main form, when done submit the main form !
|
||||
for(var i = 0; i < params.length; i++){
|
||||
param = params[i].split('=')[0];
|
||||
value = params[i].split('=')[1];
|
||||
|
||||
mainForm.find('input[name="' + param + '"]').val(value);
|
||||
}
|
||||
//Clear the page param
|
||||
mainForm.find('input[name="page"]').val('1');
|
||||
|
||||
mainForm.submit();
|
||||
$this.closest('.open').removeClass('open');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function backupOriginalFilters() {
|
||||
DSpace.discovery.orig_filters = DSpace.discovery.filters.slice(0);
|
||||
}
|
||||
|
||||
function restoreOriginalFilters() {
|
||||
DSpace.discovery.filters = DSpace.discovery.orig_filters.slice(0);
|
||||
}
|
||||
|
||||
})(jQuery);
|
11
dspace-xmlui-mirage2/src/main/webapp/scripts/set-devmode.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function(){
|
||||
window['DSpace'] = window['DSpace'] || {};
|
||||
window.DSpace['dev_mode'] = true;
|
||||
}).call(this);
|
35
dspace-xmlui-mirage2/src/main/webapp/scripts/sidebar.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
function toggle_sidebar() {
|
||||
if ($('.row-offcanvas').hasClass('active')) {
|
||||
$('.row-offcanvas').removeClass('active').promise().done(function () {
|
||||
$('.main-content').css('min-height', 0).off('click', toggle_sidebar);
|
||||
window.setTimeout(function () {
|
||||
$('#sidebar').removeAttr('style');
|
||||
}, 350);
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
$('#sidebar').show();
|
||||
$('.row-offcanvas').addClass('active');
|
||||
$('.main-content').css('min-height', $('#sidebar').height());
|
||||
$('.main-content').on('click', toggle_sidebar);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle=offcanvas]').on('click', toggle_sidebar).bind('touchend', function () {
|
||||
$(this).mouseout();
|
||||
});
|
||||
})
|
||||
|
||||
})(jQuery);
|
24
dspace-xmlui-mirage2/src/main/webapp/scripts/utils.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function($) {
|
||||
DSpace.getTemplate = function(name) {
|
||||
if (DSpace.dev_mode || DSpace.templates === undefined || DSpace.templates[name] === undefined) {
|
||||
$.ajax({
|
||||
url : DSpace.theme_path + 'templates/' + name + '.hbs',
|
||||
success : function(data) {
|
||||
if (DSpace.templates === undefined) {
|
||||
DSpace.templates = {};
|
||||
}
|
||||
DSpace.templates[name] = Handlebars.compile(data);
|
||||
},
|
||||
async : false
|
||||
});
|
||||
}
|
||||
return DSpace.templates[name];
|
||||
};
|
||||
})(jQuery);
|
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
//Catch "Holder: invisible placeholder"
|
||||
Holder.invisible_error_fn = function(fn){
|
||||
return function(el){
|
||||
try
|
||||
{
|
||||
fn.call(this, el)
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
//Catch "Holder: invisible placeholder"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
(function($) {
|
||||
$(document).ready(function(){
|
||||
//Find any controlled vocabulary urls this page might contain
|
||||
var vocabularyUrls = $('a[href^="vocabulary:"]');
|
||||
vocabularyUrls.click(function(index){
|
||||
var $link = $(this);
|
||||
var vocabularyJSONUrl = $link.attr('href').replace('vocabulary:', '');
|
||||
//Retrieve the basic url, we will need this to add images !
|
||||
var basicUrl = vocabularyJSONUrl.substr(0, vocabularyJSONUrl.indexOf('/JSON/controlled-vocabulary'));
|
||||
var parameters = vocabularyJSONUrl.slice(vocabularyJSONUrl.indexOf('?') + 1, vocabularyJSONUrl.length).split('&');
|
||||
|
||||
//Read the input field name & the vocabulary identifier from the url
|
||||
var inputFieldName;
|
||||
var vocabularyIdentifier;
|
||||
for(var i = 0; i < parameters.length; i++){
|
||||
var parameter = parameters[i].split('=')[0];
|
||||
var value = parameters[i].split('=')[1];
|
||||
|
||||
if(parameter == 'vocabularyIdentifier'){
|
||||
vocabularyIdentifier = value;
|
||||
}else
|
||||
if(parameter == 'metadataFieldName'){
|
||||
inputFieldName = value;
|
||||
}
|
||||
}
|
||||
|
||||
var id = 'modal_vocabulary_dialog_' + vocabularyIdentifier;
|
||||
//Check if we already have a (hidden) modal
|
||||
var vocabularyDialog = $('div#'+id);
|
||||
if(0 < vocabularyDialog.length){
|
||||
//Open the modal
|
||||
vocabularyDialog.modal('show')
|
||||
}else{
|
||||
|
||||
//No dialog window found, create a new one by requesting our data by json
|
||||
$.get(basicUrl + '/controlled-vocabulary-dialog',
|
||||
{
|
||||
vocabularyIdentifier: vocabularyIdentifier,
|
||||
metadataFieldName: inputFieldName
|
||||
},
|
||||
function(resultingHtml){
|
||||
//retrieve the dialog box
|
||||
|
||||
|
||||
vocabularyDialog = $('<div class="modal fade" id="'+id+'">' + resultingHtml + '</div>');
|
||||
$( "body" ).append(vocabularyDialog);
|
||||
vocabularyDialog.modal();
|
||||
|
||||
var mainDialogDivision = vocabularyDialog.find('div[id^=aspect_submission_ControlledVocabularyTransformer_div_vocabulary_dialog_]');
|
||||
// $('body').append($(mainDialogDivision[0]));
|
||||
// var vocabularyDialog = $('div#aspect_submission_ControlledVocabularyTransformer_div_vocabulary_dialog_' + vocabularyIdentifier);
|
||||
// vocabularyDialog.dialog({
|
||||
// autoOpen: true,
|
||||
// height: 450,
|
||||
// width: 650,
|
||||
// modal: true,
|
||||
// title: $Result.find('title').html()
|
||||
// });
|
||||
|
||||
//The success function, retrieve the JSON
|
||||
$.ajax({
|
||||
url: vocabularyJSONUrl,
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function(response) {
|
||||
if(response == null){
|
||||
hideLoadingMsg();
|
||||
showErrorMsg();
|
||||
}
|
||||
|
||||
var mainList = document.createElement('ul');
|
||||
mainList.setAttribute('class', 'ds-simple-list vocabulary list-unstyled col-xs-12');
|
||||
mainList.setAttribute('id', 'vocabulary-list');
|
||||
createVocabularyNode(mainList, response, basicUrl, true);
|
||||
|
||||
//Hide the loading message !
|
||||
hideLoadingMsg();
|
||||
|
||||
mainDialogDivision[0].appendChild(mainList);
|
||||
|
||||
//Initialize all the vocabulary box javascript actions
|
||||
vocabularyDialog.find('span[id^="node_"]').click(function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var $this = $(this);
|
||||
var subNodes = $('ul#' + $this.attr('id') + '_sub');
|
||||
if(subNodes.is(':visible')){
|
||||
subNodes.hide();
|
||||
subNodes.find('li:first-child').hide();
|
||||
}else{
|
||||
subNodes.show();
|
||||
subNodes.find('li:first-child').show();
|
||||
}
|
||||
//Flip the closed/open class
|
||||
if($this.hasClass('glyphicon-folder-open')){
|
||||
$this.removeClass('glyphicon-folder-open');
|
||||
$this.addClass('glyphicon-folder-close');
|
||||
}else
|
||||
if($this.hasClass('glyphicon-folder-close')){
|
||||
$this.removeClass('glyphicon-folder-close');
|
||||
$this.addClass('glyphicon-folder-open');
|
||||
}
|
||||
});
|
||||
|
||||
//Each time we click a url ensure that our field is added in the input box !
|
||||
$('a.vocabulary-label',vocabularyDialog).bind('click',function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var $this = $(this);
|
||||
var inputFieldName = vocabularyDialog.find('input[type="hidden"][name="metadataFieldName"]').val();
|
||||
$('input[name="' + inputFieldName + '"]').val($this.attr('href'));
|
||||
|
||||
//Close the current dialog
|
||||
vocabularyDialog.modal('hide');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('button[name="filter_button"]',vocabularyDialog).bind('click',function(){
|
||||
var filterValue = $('input[name="filter"]',vocabularyDialog).val();
|
||||
var displayElements;
|
||||
if(0 < filterValue.length){
|
||||
//Perform the filtering
|
||||
//Start by hiding all the urls in our box
|
||||
var vocabularyList = vocabularyDialog.find('ul#vocabulary-list');
|
||||
vocabularyList.hide();
|
||||
vocabularyList.find('li').hide();
|
||||
var displayUrls = $('a[filter*="' + filterValue.toLowerCase() + '"]');
|
||||
//Retrieve all the parents of these urls & display them
|
||||
displayElements = displayUrls.parents('ul,li');
|
||||
}else{
|
||||
//Display them all !
|
||||
displayElements = vocabularyDialog.find('ul,li');
|
||||
}
|
||||
displayElements.show();
|
||||
//Flip class from closed to open
|
||||
displayElements.find('.glyphicon-folder-close').removeClass('glyphicon-folder-close').addClass('glyphicon-folder-open');
|
||||
//Disable normal action
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 'html'
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function createVocabularyNode(list, data, basicUrl, displayed) {
|
||||
var childNodes = data.childNodes;
|
||||
var listItem = document.createElement('li');
|
||||
var vocabularyTypeClass;
|
||||
var parent = listItem;
|
||||
if(childNodes.length == 0){
|
||||
//An actual end point use the appropriate image
|
||||
vocabularyTypeClass = 'glyphicon-file';
|
||||
}else{
|
||||
if(displayed){
|
||||
vocabularyTypeClass = 'glyphicon-folder-open';
|
||||
}else{
|
||||
vocabularyTypeClass = 'glyphicon-folder-close';
|
||||
}
|
||||
parent =$( '<a href="#"></a>');
|
||||
parent.appendTo(listItem)
|
||||
}
|
||||
|
||||
var vocabularyIcon = $( '<span class="vocabulary-node-icon btn-xs glyphicon ' + vocabularyTypeClass + '"></span>');
|
||||
vocabularyIcon.attr('id', 'node_' + data.id);
|
||||
vocabularyIcon.appendTo(parent)
|
||||
|
||||
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('href', data.value);
|
||||
link.setAttribute('class', 'vocabulary-label');
|
||||
//Also store a to lower cased value of our label in the link, this will be used for filtering
|
||||
link.setAttribute('filter', data.value.toLowerCase());
|
||||
link.innerHTML = data.label;
|
||||
listItem.appendChild(link);
|
||||
|
||||
list.appendChild(listItem);
|
||||
if(0 < childNodes.length){
|
||||
var subNodeList = document.createElement('ul');
|
||||
subNodeList.setAttribute('id', 'node_' + data.id + '_sub');
|
||||
if(!displayed){
|
||||
subNodeList.setAttribute('style', 'display: none;');
|
||||
}
|
||||
$.each(childNodes, function(key, childNode){
|
||||
createVocabularyNode(subNodeList, childNode, basicUrl, false);
|
||||
});
|
||||
list.appendChild(subNodeList);
|
||||
}
|
||||
}
|
||||
|
||||
function hideLoadingMsg() {
|
||||
$('div#aspect_submission_ControlledVocabularyTransformer_item_vocabulary-loading').hide();
|
||||
}
|
||||
|
||||
function showErrorMsg(){
|
||||
$('div#aspect_submission_ControlledVocabularyTransformer_item_vocabulary-error').removeClass('hidden');
|
||||
}
|
||||
|
||||
})($);
|
169
dspace-xmlui-mirage2/src/main/webapp/sitemap.xmap
Normal file
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
|
||||
|
||||
<map:components>
|
||||
<map:readers>
|
||||
<map:reader name="ConcatenationReader" src="org.dspace.app.xmlui.cocoon.ConcatenationReader"/>
|
||||
</map:readers>
|
||||
|
||||
<map:transformers>
|
||||
<transformer name="strip-namespaces" src="org.apache.cocoon.transformation.StripNameSpacesTransformer"/>
|
||||
</map:transformers>
|
||||
|
||||
<map:serializers>
|
||||
<map:serializer name="html-no-doctype" logger="sitemap.serializer.xhtml"
|
||||
src="org.apache.cocoon.serialization.HTMLSerializer"
|
||||
mime-type="text/html; charset=utf-8"
|
||||
pool-grow="2" pool-max="64" pool-min="2">
|
||||
<encoding>UTF-8</encoding>
|
||||
<indent>yes</indent>
|
||||
</map:serializer>
|
||||
</map:serializers>
|
||||
</map:components>
|
||||
|
||||
<map:pipelines>
|
||||
|
||||
<!--
|
||||
Define global theme variables that are used later in this
|
||||
sitemap. Two variables are typically defined here, the theme's
|
||||
path and name. The path is the directory name where this theme
|
||||
is located, such as "Reference" for the reference theme. The
|
||||
theme's name is used only for descriptive purposes to describe
|
||||
the theme.
|
||||
-->
|
||||
<map:component-configurations>
|
||||
<global-variables>
|
||||
<theme-path>${item}</theme-path>
|
||||
<theme-name>${item}</theme-name>
|
||||
</global-variables>
|
||||
</map:component-configurations>
|
||||
|
||||
|
||||
<map:pipeline>
|
||||
<!-- Allow the browser to cache static content for an hour -->
|
||||
<map:parameter name="expires" value="access plus 1 hours"/>
|
||||
|
||||
|
||||
<!-- handle static js and css -->
|
||||
<map:match pattern="themes/*/**.js">
|
||||
<map:read type="ConcatenationReader" src="{2}.js">
|
||||
<map:parameter name="requestQueryString" value="{request:queryString}"/>
|
||||
</map:read>
|
||||
</map:match>
|
||||
<map:match pattern="themes/*/**.css">
|
||||
<map:read type="ConcatenationReader" src="{2}.css">
|
||||
<map:parameter name="requestQueryString" value="{request:queryString}"/>
|
||||
</map:read>
|
||||
</map:match>
|
||||
<map:match pattern="themes/*/**.json">
|
||||
<map:read type="ConcatenationReader" src="{2}.json">
|
||||
<map:parameter name="requestQueryString" value="{request:queryString}"/>
|
||||
</map:read>
|
||||
</map:match>
|
||||
|
||||
<!-- Static content -->
|
||||
<map:match pattern="themes/*/**">
|
||||
<map:read src="{2}"/>
|
||||
</map:match>
|
||||
</map:pipeline>
|
||||
|
||||
<!--
|
||||
The theme's pipeline is used to process all requests handled
|
||||
by the theme. It is broken up into two parts, the first part
|
||||
handles all static theme content while the second part handle
|
||||
all dynamic aspect generated content. The static content is
|
||||
such things as stylesheets, images, or static pages. Typically
|
||||
these are just stored on disk and passed directly to the
|
||||
browser without any processing.
|
||||
-->
|
||||
<map:pipeline>
|
||||
<!-- Never allow the browser to cache dynamic content -->
|
||||
<map:parameter name="expires" value="now"/>
|
||||
|
||||
<!-- Aspect content
|
||||
|
||||
There are five steps to processing aspect content:
|
||||
|
||||
1: Generate the DRI page
|
||||
|
||||
The first step is to generate a DRI page for the request;
|
||||
this is handled by the aspect chain. Once it is generated
|
||||
it is the beginning of a theme's pipeline, the DRI page is
|
||||
ultimately transformed in the resulting XHTML that is
|
||||
given to the user's browser.
|
||||
|
||||
2: Add page metadata
|
||||
|
||||
The next step is to add theme specific metadata to the
|
||||
DRI page. This is metadata about where the theme is
|
||||
located and its name. Typically this metadata is different
|
||||
depending on the users browser, this allows us to give
|
||||
different stylesheets to Internet Explorer than for other
|
||||
browsers.
|
||||
|
||||
3: Transform to XHTML
|
||||
|
||||
The third step is the main component of a theme the XSL
|
||||
transformations will turn the DRI page from the aspects
|
||||
into an XHTML page useable by browsers.
|
||||
|
||||
4: Localize the page
|
||||
|
||||
The second to last step is to localize the content for the
|
||||
particular user, if they user is requesting a page in a
|
||||
particular language then those language strings are inserted
|
||||
into the resulting XHTML.
|
||||
|
||||
5: Serialize to the browser
|
||||
|
||||
The last step sends the page to the user's browser.
|
||||
|
||||
-->
|
||||
<map:match pattern="**">
|
||||
|
||||
<!-- Generate the DRI page -->
|
||||
<map:generate type="file" src="cocoon://DRI/{1}"/>
|
||||
|
||||
<!-- Fix some overly convoluted DRI constructs in
|
||||
DSpace code without having to change java code and
|
||||
interfere with other themes -->
|
||||
<map:transform src="xsl/preprocess.xsl"/>
|
||||
|
||||
<map:transform type="IncludePageMeta">
|
||||
<map:parameter name="theme.path" value="{global:theme-path}/"/>
|
||||
<map:parameter name="theme.name" value="{global:theme-name}/"/>
|
||||
</map:transform>
|
||||
|
||||
<!-- Debuging output -->
|
||||
<map:match type="request" pattern="XML">
|
||||
<map:serialize type="xml"/>
|
||||
</map:match>
|
||||
<!-- Transform to XHTML -->
|
||||
<map:transform src="xsl/theme.xsl"/>
|
||||
|
||||
<!-- Localize the page -->
|
||||
<map:act type="locale">
|
||||
<map:transform type="i18n">
|
||||
<map:parameter name="locale" value="{locale}"/>
|
||||
</map:transform>
|
||||
</map:act>
|
||||
|
||||
<!-- Remove all namespaces in the output xhtml-->
|
||||
<map:transform type="strip-namespaces" />
|
||||
|
||||
<!-- Serialize to the browser -->
|
||||
<map:serialize type="html-no-doctype"/>
|
||||
|
||||
</map:match>
|
||||
</map:pipeline>
|
||||
</map:pipelines>
|
||||
</map:sitemap>
|
12
dspace-xmlui-mirage2/src/main/webapp/styles/_style.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
|
||||
/**
|
||||
* You can put your own style in this file.
|
||||
* It will be included in all color schemes
|
||||
*/
|
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
@import "compass";
|
||||
@function twbs-font-path($font-name) {
|
||||
@return "../vendor/bootstrap-sass-official/assets/fonts/" + $font-name
|
||||
}
|
||||
@import "../vendor/bootstrap-sass-official/assets/stylesheets/bootstrap/bootstrap";
|
||||
@import "shared/dspace-bootstrap-tweaks";
|
||||
@import "../vendor/jquery-ui/themes/base/jquery-ui.css";
|
||||
@import "style";
|
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
|
||||
select#aspect_general_ChoiceLookupTransformer_field_chooser.loading {
|
||||
background-image: url('../images/authority_control/lookup-indicator.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
|
||||
}
|
||||
//
|
||||
//#aspect_general_ChoiceLookupTransformer_div_lookup h2{
|
||||
// display: none;
|
||||
//}
|
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
// Preset Bootstrap variables
|
||||
// ----------------------
|
||||
$brand-primary: #607890 !default;
|
||||
|
||||
$navbar-inverse-bg: #1F3F5E !default;
|
||||
$navbar-inverse-link-color: #eee !default;
|
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
i.expand{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
i.collapse{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collapsed i.expand{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collapsed i.collapse{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.toggler.spacer {
|
||||
margin-right: 7px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser ul{
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.ds-author-picture.small {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser h4 {
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser .artifact-title {
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 5px;
|
||||
margin-top: 0px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.list-wrapper {
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.ds-static-div.community-description.well.affix {
|
||||
width: 307px;
|
||||
top: 15px;
|
||||
|
||||
}
|
||||
|
||||
.community-browser-wrapper {
|
||||
@media (min-width: $screen-sm-min) {
|
||||
max-width: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
.community-browser-row {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
a[name='community-browser-link'] {
|
||||
line-height: 30px;
|
||||
font-size: $font-size-h4;
|
||||
// font-weight: $headings-font-weight;
|
||||
}
|
||||
p {
|
||||
color: $gray-light;
|
||||
&.toggler-wrap{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-max) {
|
||||
@include transition-property(opacity);
|
||||
@include animated();
|
||||
|
||||
&.odd-community-browser-row {
|
||||
background-color: $almost-white;
|
||||
}
|
||||
|
||||
&.related-community-browser-row {
|
||||
display:none;
|
||||
}
|
||||
|
||||
&.unrelated-community-browser-row {
|
||||
display:none;
|
||||
}
|
||||
|
||||
//&.related-community-browser-row:hover,
|
||||
//&.unrelated-community-browser-row:hover {
|
||||
// @include opacity(1);
|
||||
//}
|
||||
&.open-community-browser-row {
|
||||
//background-color: $almost-white;
|
||||
}
|
||||
|
||||
&.current-community-browser-row {
|
||||
border-bottom: 1px solid $table-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
.half-indented > * {
|
||||
margin-left: percentage((1 / $grid-columns) / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.primary.repository.community > ul{
|
||||
list-style: none;
|
||||
padding-left: 0px;
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
div.ds-logo-wrapper {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#aspect_browseArtifacts_CommunityBrowse_div_community-browse,
|
||||
#aspect_browseArtifacts_CollectionBrowse_div_collection-browse{
|
||||
|
||||
margin-bottom: 10px;
|
||||
|
||||
h3{
|
||||
color: #999;
|
||||
text-transform: uppercase;
|
||||
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5);
|
||||
margin-bottom: 5px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,187 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Discovery control gears start
|
||||
**/
|
||||
|
||||
div.controls-gear-wrapper {
|
||||
position: relative;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
.dropdown-menu .glyphicon {
|
||||
@include checkmark-style();
|
||||
}
|
||||
|
||||
.discovery-controls-gear {
|
||||
padding: 0;
|
||||
margin-right: 3px;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul.gear-selection{
|
||||
margin: 0 2px 0 0;
|
||||
list-style: none;
|
||||
background-color: #FFFFFF;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
border: 1px solid #EBEBEB;
|
||||
padding: 0;
|
||||
/*Hidden by default*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.bottom ul.gear-selection {
|
||||
/*Css to ensure that the bottom gear selection list is shown on TOP of the button */
|
||||
bottom: 33px;
|
||||
}
|
||||
|
||||
div.gear-icon{
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
|
||||
.rgba.boxshadow ul.gear-selection{
|
||||
-webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
|
||||
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
ul.gear-selection ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
ul.gear-selection li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.gear-selection li.gear-head {
|
||||
padding: 5px;
|
||||
border-top: 1px solid #EBEBEB;
|
||||
}
|
||||
|
||||
ul.gear-selection li.gear-head.first{
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
|
||||
ul.gear-selection li.gear-option{
|
||||
padding: 5px 5px 5px 25px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul.gear-selection li.gear-option:hover{
|
||||
background-color: #EBEBEB;
|
||||
}
|
||||
|
||||
ul.gear-selection li.gear-option a{
|
||||
color: #444444;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/**
|
||||
Discovery control gears end
|
||||
**/
|
||||
|
||||
|
||||
table.discovery-filters td.discovery-filter-input-cell input{
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
table.discovery-filters tr.search-filter.used-filter input.filter-add
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.searchTime{
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
div#aspect_discovery_SimpleSearch_div_search-results {
|
||||
ul{
|
||||
padding-left: 0;
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
ul.pagination-links{
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
//.discoverySearchBox .row {
|
||||
// margin-bottom: 15px;
|
||||
//}
|
||||
|
||||
.filter-control.filter-add,
|
||||
.filter-control.filter-remove {
|
||||
width:50%;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-sm-max) {
|
||||
.pagination .page-link-offset-3 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-max) {
|
||||
#aspect_discovery_SimpleSearch_list_primary-search .col-lg-3,
|
||||
#aspect_discovery_SimpleSearch_div_discovery-filters-wrapper .col-lg-4,
|
||||
#aspect_discovery_SimpleSearch_div_discovery-filters-wrapper .col-lg-2 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.pagination .page-link-offset-2 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-min) {
|
||||
.pagination .page-link-offset-1 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#aspect_discovery_SimpleSearch_field_scope {
|
||||
@media (max-width: $screen-xs-max) {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
#filters-overview-wrapper .label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
//#aspect_discovery_SimpleSearch_row_filter-controls {
|
||||
// margin-bottom: 15px;
|
||||
//}
|
||||
//
|
||||
//#aspect_discovery_SearchFacetFilter_div_filter-navigation {
|
||||
// padding-bottom: 10px;
|
||||
//}
|
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
// Extra DSpace variables
|
||||
// ----------------------
|
||||
$almost-white: #f7f7f7 !default;
|
||||
$center-section-padding-top: 20px;
|
||||
$center-section-padding-bottom: 20px;
|
||||
$artifact-title-font-size: ceil($font-size-base * 1.1666) !default; // ~14px
|
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
//.ds-form-item.row {
|
||||
// margin-bottom: 15px;
|
||||
//}
|
||||
|
||||
.submission .ds-form-item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.submission .panel .ds-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.submission .panel .ds-form-item:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.needs-xs-spacing {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.control-label.required::after {
|
||||
content: "*";
|
||||
}
|
||||
|
||||
.submission .ds-add-button {
|
||||
min-width: 100%;
|
||||
}
|
@@ -0,0 +1,452 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
.first-page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#ds-feed-option img {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#ds-options h1,
|
||||
#ds-options h2,
|
||||
#ds-options h3,
|
||||
#ds-options h4,
|
||||
#ds-options h5,
|
||||
#ds-options h6 {
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
|
||||
&.page-header {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.ds-option-set {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#ds-options{
|
||||
.ds-option-set-head {
|
||||
color: $gray-light;
|
||||
text-transform: uppercase;
|
||||
@include text-shadow(0px 1px 0px rgba(255,255,255,.5));
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
// .list-group-item.active {
|
||||
// background-color: $gray-lighter;
|
||||
// border-color: $nav-tabs-border-color;
|
||||
// color: $gray-dark;
|
||||
// }
|
||||
}
|
||||
|
||||
#aspect_discovery_SimpleSearch_div_search-results .ds-artifact-item {
|
||||
margin-bottom: 50px;
|
||||
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.author,
|
||||
.publisher-date
|
||||
{
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_CommunityBrowser_div_comunity-browser {
|
||||
.artifact-title {
|
||||
margin-bottom: 3px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.artifact-info {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_ConfigurableBrowse_div_browse-controls select {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
margin-right: 15px;
|
||||
|
||||
}
|
||||
|
||||
//.file-wrapper.row,
|
||||
//#aspect_artifactbrowser_ConfigurableBrowse_div_browse-navigation .row,
|
||||
.ds-artifact-list .artifact-title {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.ds-artifact-list .artifact-info {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_ItemViewer_div_item-view {
|
||||
.item-summary-view-metadata {
|
||||
h2 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
//dt {
|
||||
// width: 100px;
|
||||
//}
|
||||
|
||||
dd {
|
||||
//margin-left: 120px;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detailtable .label-cell {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ds-table-responsive {
|
||||
@media (max-width: $screen-xs-max) {
|
||||
overflow-x: auto;
|
||||
.word-break {
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table legend {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
footer {
|
||||
hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& .row > div{
|
||||
padding-top: $line-height-computed;
|
||||
border: 0;
|
||||
border-top: 1px solid $hr-border;
|
||||
|
||||
@media (min-width: $screen-md-min) {
|
||||
padding-left:0 ;
|
||||
padding-right:0 ;
|
||||
}
|
||||
}
|
||||
|
||||
&> .container{
|
||||
padding-top: $center-section-padding-bottom;
|
||||
padding-bottom: $center-section-padding-bottom;
|
||||
border-top: 1px solid $legend-border-color;
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
|
||||
@media (max-width: $screen-sm-max) {
|
||||
margin-top: $center-section-padding-bottom;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-max) {
|
||||
padding-left: $grid-gutter-width / 2;
|
||||
padding-right: $grid-gutter-width / 2;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ds-options {
|
||||
padding-top: $navbar-margin-bottom;
|
||||
@media(min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
|
||||
padding-right: (($grid-gutter-width/2) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#main-container {
|
||||
|
||||
.row-offcanvas{
|
||||
background-color: $almost-white;
|
||||
}
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
#sidebar{
|
||||
background-color: $almost-white;
|
||||
}
|
||||
@media(max-width: $screen-sm-max) {
|
||||
.active #sidebar {
|
||||
padding-bottom: 99999px;
|
||||
margin-bottom: -99999px + $center-section-padding-bottom;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.horizontal-slider {
|
||||
//does nothing except force hardware accelerated css animations
|
||||
@include transform(translate3d(0, 0, 0));
|
||||
|
||||
#sidebar {
|
||||
|
||||
|
||||
@media(min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
|
||||
@include box-shadow(inset 2px 2px 1px rgba(0,0,0,.05));
|
||||
border-right: 1px solid $legend-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-content {
|
||||
background-color: white;
|
||||
padding-top: $center-section-padding-top;
|
||||
padding-bottom: $center-section-padding-bottom;
|
||||
// Huge padding, and equal negative margin (minus the padding we need) fix the column height
|
||||
@media(min-width: $screen-md-min){
|
||||
padding-bottom: 99999px;
|
||||
margin-bottom: -99999px + $center-section-padding-bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-col {
|
||||
padding-top: $center-section-padding-top;
|
||||
padding-bottom: $center-section-padding-bottom;
|
||||
}
|
||||
|
||||
header {
|
||||
|
||||
.navbar {
|
||||
color: $navbar-inverse-color;
|
||||
margin-bottom: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.navbar-default{
|
||||
|
||||
background-color: $navbar-inverse-bg;
|
||||
|
||||
.navbar-brand {
|
||||
color: $navbar-inverse-brand-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-brand-hover-color;
|
||||
background-color: $navbar-inverse-brand-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-inverse-color;
|
||||
}
|
||||
|
||||
.navbar-toggle, .navbar-nav {
|
||||
|
||||
.icon-bar {
|
||||
background-color: $navbar-inverse-link-color;
|
||||
}
|
||||
|
||||
border-color: transparent;
|
||||
color: $navbar-inverse-link-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-hover-color;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
}
|
||||
|
||||
> li > a {
|
||||
color: $navbar-inverse-link-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-hover-color;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-active-color;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-disabled-color;
|
||||
background-color: $navbar-inverse-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
> .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
color: $navbar-inverse-link-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// .navbar-toggle {
|
||||
// border-color: $navbar-inverse-toggle-border-color;
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// background-color: $navbar-inverse-toggle-hover-bg;
|
||||
// }
|
||||
// .icon-bar {
|
||||
// background-color: $navbar-inverse-toggle-icon-bar-bg;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.trail-wrapper {
|
||||
background-color: lighten($brand-primary, 25%);
|
||||
border-bottom: 1px solid lighten($brand-primary, 15%);
|
||||
|
||||
.breadcrumb{
|
||||
background-color: transparent;
|
||||
margin-bottom: 0;
|
||||
|
||||
> li {
|
||||
+ li:before {
|
||||
color: $gray-dark;
|
||||
}
|
||||
}
|
||||
> .active {
|
||||
color: $gray-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-toggle {
|
||||
position: relative;
|
||||
margin-right: $navbar-padding-horizontal;
|
||||
padding: 10px;
|
||||
@include navbar-vertical-align(34px);
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
border-radius: $border-radius-base;
|
||||
margin: 0;
|
||||
//border-color: $navbar-default-toggle-border-color;
|
||||
.icon-bar {
|
||||
background-color: $component-active-bg;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $component-active-bg;
|
||||
|
||||
.icon-bar {
|
||||
background-color: $component-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-toggle .icon-bar {
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.sidebar-toggle .icon-bar + .icon-bar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
line-height: $line-height-base;
|
||||
color: $gray-light;
|
||||
margin: 0;
|
||||
padding: $padding-base-vertical 0;
|
||||
}
|
||||
|
||||
.centered-pagination,
|
||||
.centered-pagination ul {
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.centered-pagination ul {
|
||||
left: -50%;
|
||||
}
|
||||
|
||||
.centered-pagination {
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
#aspect_artifactbrowser_CommunityViewer_div_community-view h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
//.sort-options-menu {
|
||||
// .dropdown-menu .glyphicon {
|
||||
// @include checkmark-style();
|
||||
// }
|
||||
//}
|
||||
|
||||
.thumbnail {
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
& > img {
|
||||
margin-left: 0;
|
||||
border: 1px solid $thumbnail-border;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
margin-bottom: 15px;
|
||||
@media (max-width: $screen-xs-max) {
|
||||
& > li {
|
||||
float: none;
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
a:hover {
|
||||
border-radius: $border-radius-base;
|
||||
border-bottom-color: $nav-tabs-link-hover-border-color;
|
||||
}
|
||||
|
||||
&.active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $nav-pills-active-link-hover-color;
|
||||
background-color: $nav-pills-active-link-hover-bg;
|
||||
border-radius: $border-radius-base;
|
||||
border: 1px solid $nav-pills-active-link-hover-bg;
|
||||
|
||||
.caret {
|
||||
border-top-color: $nav-pills-active-link-hover-color;
|
||||
border-bottom-color: $nav-pills-active-link-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
|
||||
& > li a {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
.artifact-title {
|
||||
font-size: $artifact-title-font-size;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.artifact-abstract {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
.glyphicon.glyphicon-file {
|
||||
color: $gray-lighter;
|
||||
margin-left: -10px;
|
||||
font-size: 120px;
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
font-size: 107px;
|
||||
}
|
||||
|
||||
@media (min-width: $screen-md-min) {
|
||||
font-size: 107px;
|
||||
}
|
||||
|
||||
@media (min-width: $screen-lg-min) {
|
||||
font-size: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-wrapper.row {
|
||||
@media(max-width: $screen-xs-max) {
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px solid $gray-lighter;
|
||||
}
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
.simple-item-view-description {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.item-page-field-wrapper {
|
||||
margin-bottom: 25px;
|
||||
word-break: break-word;
|
||||
|
||||
h5 {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.simple-item-view-collections {
|
||||
.ds-referenceSet-list {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
.ui-autocomplete .ui-state-focus{
|
||||
text-decoration: none;
|
||||
color: $dropdown-link-hover-color;
|
||||
background-color: $dropdown-link-hover-bg;
|
||||
}
|
||||
|
||||
.ui-helper-hidden-accessible{
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type='text'].ui-autocomplete-loading{
|
||||
background-image: url("../../images/authority_control/lookup-indicator.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 99% 50%;
|
||||
background-size: 25px 25px;
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
@import "compass";
|
||||
// variables
|
||||
@import "classic_mirage_color_scheme/bootstrap_variables";
|
||||
|
||||
// Bootstrap
|
||||
@function twbs-font-path($font-name) {
|
||||
@return "../vendor/bootstrap-sass-official/assets/fonts/" + $font-name
|
||||
}
|
||||
@import "../vendor/bootstrap-sass-official/assets/stylesheets/bootstrap/bootstrap";
|
||||
|
||||
@import "classic_mirage_color_scheme/dspace_variables";
|
||||
|
||||
// DSpace theme
|
||||
@import "classic_mirage_color_scheme/utils";
|
||||
@import "classic_mirage_color_scheme/general";
|
||||
@import "classic_mirage_color_scheme/forms";
|
||||
@import "classic_mirage_color_scheme/discovery";
|
||||
@import "classic_mirage_color_scheme/community-list";
|
||||
@import "classic_mirage_color_scheme/community-view";
|
||||
@import "classic_mirage_color_scheme/item-lists";
|
||||
@import "classic_mirage_color_scheme/item-view";
|
||||
@import "classic_mirage_color_scheme/authority-control";
|
||||
@import "classic_mirage_color_scheme/vocabulary-support";
|
||||
|
||||
@import "classic_mirage_color_scheme/jquery_ui";
|
||||
@import "shared/dspace-bootstrap-tweaks";
|
||||
@import "../vendor/jquery-ui/themes/base/jquery-ui.css";
|
||||
@import "style";
|
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
.word-break {
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
|
||||
/* Non standard for webkit */
|
||||
word-break: break-word;
|
||||
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
@mixin animated() {
|
||||
@include transition-duration(0.3s);
|
||||
@include transition-timing-function(ease);
|
||||
}
|
||||
|
||||
.margin-animated {
|
||||
@include transition-property(margin);
|
||||
@include animated();
|
||||
}
|
||||
|
||||
@mixin checkmark-style() {
|
||||
font-size: 0.8em;
|
||||
font-weight: 100;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.justify {
|
||||
text-align: justify;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
ul.vocabulary {
|
||||
margin-left: 0;
|
||||
margin-top: 10px ;
|
||||
padding-left: ($grid-gutter-width / 2);
|
||||
padding-right: ($grid-gutter-width / 2);
|
||||
}
|
||||
|
||||
ul.vocabulary,
|
||||
ul.vocabulary ul,
|
||||
ul.vocabulary li
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.vocabulary div.vocabulary-node-icon{
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#aspect_submission_ControlledVocabularyTransformer_list_filter-list .alert{
|
||||
margin-top: 15px;
|
||||
}
|
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
ul.ds-simple-list.vocabulary ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
header .navbar-brand img{
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-xs-max) {
|
||||
table.ds-gloss-list{
|
||||
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
}
|
||||
|
||||
table#aspect_administrative_ControlPanel_table_users a{
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
* -------
|
||||
*/
|
||||
@media screen and (max-width: $screen-sm-max) {
|
||||
|
||||
#main-container {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#sidebar{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Off Canvas : improved version of http://getbootstrap.com/examples/offcanvas/
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
|
||||
.row-offcanvas {
|
||||
position: relative;
|
||||
-webkit-transition: all .25s ease-out;
|
||||
-moz-transition: all .25s ease-out;
|
||||
transition: all .25s ease-out;
|
||||
}
|
||||
|
||||
.row-offcanvas-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.row-offcanvas-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.row-offcanvas-right
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
right: -50%; /* 6 columns */
|
||||
}
|
||||
|
||||
.row-offcanvas-left
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
left: -50%; /* 6 columns */
|
||||
}
|
||||
|
||||
.row-offcanvas-right.active {
|
||||
right: 50%; /* 6 columns */
|
||||
}
|
||||
|
||||
.row-offcanvas-left.active {
|
||||
left: 50%; /* 6 columns */
|
||||
}
|
||||
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 50%; /* 6 columns */
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $screen-xs-max) {
|
||||
|
||||
.row-offcanvas-right
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
right: -100%; /* 6 columns */
|
||||
}
|
||||
|
||||
.row-offcanvas-right.active {
|
||||
|
||||
.main-content {
|
||||
padding-right: $grid-gutter-width;
|
||||
}
|
||||
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
margin-right: $grid-gutter-width;
|
||||
}
|
||||
|
||||
right: 100%; /* 6 columns */
|
||||
}
|
||||
|
||||
.col-xs-6.col-sm-3.sidebar-offcanvas {
|
||||
width: 100%; /* 6 columns */
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,61 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
{{#filters}}
|
||||
<div id="aspect_discovery_SimpleSearch_row_filter-new-{{index}}"
|
||||
class="ds-form-item row advanced-filter-row search-filter">
|
||||
<div class="col-xs-4 col-sm-2">
|
||||
<p>
|
||||
<select id="aspect_discovery_SimpleSearch_field_filtertype_{{index}}" class="ds-select-field form-control"
|
||||
name="filtertype_{{index}}">
|
||||
{{#set_selected type}}
|
||||
{{#each ../../i18n.filtertype}}
|
||||
<option value="{{@key}}">{{this}}</option>
|
||||
{{/each}}
|
||||
{{/set_selected}}
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-2">
|
||||
<p>
|
||||
<select id="aspect_discovery_SimpleSearch_field_filter_relational_operator_{{index}}"
|
||||
class="ds-select-field form-control" name="filter_relational_operator_{{index}}">
|
||||
{{#set_selected relational_operator}}
|
||||
{{#each ../../i18n.filter_relational_operator}}
|
||||
<option value="{{@key}}">{{this}}</option>
|
||||
{{/each}}
|
||||
{{/set_selected}}
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-6">
|
||||
<p>
|
||||
<input id="aspect_discovery_SimpleSearch_field_filter_{{index}}"
|
||||
class="ds-text-field form-control discovery-filter-input discovery-filter-input"
|
||||
name="filter_{{index}}" type="text" value="{{query}}">
|
||||
</p>
|
||||
</div>
|
||||
<div class="hidden-xs col-sm-2">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<p class="btn-group">
|
||||
<button id="aspect_discovery_SimpleSearch_field_add-filter_{{index}}"
|
||||
class="ds-button-field btn btn-default filter-control filter-add filter-control filter-add"
|
||||
name="add-filter_{{index}}" type="submit" title="Add Filter"><span
|
||||
class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span></button>
|
||||
</p>
|
||||
<p class="btn-group">
|
||||
<button id="aspect_discovery_SimpleSearch_field_remove-filter_{{index}}"
|
||||
class="ds-button-field btn btn-default filter-control filter-remove filter-control filter-remove"
|
||||
name="remove-filter_{{index}}" type="submit" title="Remove"><span
|
||||
class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span></button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/filters}}
|
@@ -0,0 +1,12 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
{{#each orig_filters}}
|
||||
<label href="#" class="label label-primary" data-index="{{index}}">{{query}} ×</label>
|
||||
{{/each}}
|
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
@@ -0,0 +1,132 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Modifications to the rendering of elements in the administrative aspect.
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:mods="http://www.loc.gov/mods/v3"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<!--Add the class 'tabbed' to the form for administrative pages containing tabs and wrap the tab content with a div with class 'pane',
|
||||
the rest is just a copy of the default interactive div template-->
|
||||
<xsl:template match="dri:div[contains(@rend, 'administrative') and dri:list[@rend = 'horizontal']]">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<xsl:apply-templates select="@pagination">
|
||||
<xsl:with-param name="position">top</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
<form>
|
||||
<xsl:call-template name="standardAttributes">
|
||||
<xsl:with-param name="class">ds-interactive-div tabbed</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:attribute name="action"><xsl:value-of select="@action"/></xsl:attribute>
|
||||
<xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute>
|
||||
<xsl:if test="@method='multipart'">
|
||||
<xsl:attribute name="method">post</xsl:attribute>
|
||||
<xsl:attribute name="enctype">multipart/form-data</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="onsubmit">javascript:tSubmit(this);</xsl:attribute>
|
||||
<!--For Item Submission process, disable ability to submit a form by pressing 'Enter'-->
|
||||
<xsl:if test="starts-with(@n,'submit')">
|
||||
<xsl:attribute name="onkeydown">javascript:return disableEnterKey(event);</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="dri:list[@rend = 'horizontal']"/>
|
||||
<div class="pane">
|
||||
<xsl:apply-templates select="*[not(name()='head' or @rend = 'horizontal')]"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!-- JS to scroll form to DIV parent of "Add" button if jump-to -->
|
||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='jumpTo']">
|
||||
<script type="text/javascript">
|
||||
<xsl:text>var button = document.getElementById('</xsl:text>
|
||||
<xsl:value-of select="translate(@id,'.','_')"/>
|
||||
<xsl:text>').elements['</xsl:text>
|
||||
<xsl:value-of select="concat('submit_',/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='jumpTo'],'_add')"/>
|
||||
<xsl:text>'];</xsl:text>
|
||||
<xsl:text>
|
||||
if (button != null) {
|
||||
var n = button.parentNode;
|
||||
for (; n != null; n = n.parentNode) {
|
||||
if (n.tagName == 'DIV') {
|
||||
n.scrollIntoView(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</xsl:text>
|
||||
</script>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="@pagination">
|
||||
<xsl:with-param name="position">bottom</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--the tabs are floating, so give the ul the class 'clearfix' to ensure it has a height-->
|
||||
<xsl:template match="dri:div[contains(@rend, 'administrative')]/dri:list[@rend = 'horizontal']">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<ul>
|
||||
<xsl:call-template name="standardAttributes">
|
||||
<xsl:with-param name="class">ds-simple-list clearfix</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="nested"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<!--give the active tab the class 'active-tab'-->
|
||||
<xsl:template match="dri:div[contains(@rend, 'administrative')]/dri:list[@rend = 'horizontal']/dri:item[dri:hi[@rend = 'bold']]" mode="nested">
|
||||
<li class="active-tab">
|
||||
<xsl:apply-templates />
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<!--Template for the bitstream reordering-->
|
||||
<xsl:template match="dri:cell[starts-with(@id, 'aspect.administrative.item.EditItemBitstreamsForm.cell.bitstream_order_')]" priority="2">
|
||||
<td>
|
||||
<xsl:call-template name="standardAttributes"/>
|
||||
<xsl:apply-templates select="*[not(@type='button')]" />
|
||||
<!--A div that will indicate the old & the new order-->
|
||||
<div>
|
||||
<span>
|
||||
<!--Give this one an ID so that the javascript can change his value-->
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="dri:field/@id"/>
|
||||
<xsl:text>_new</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="dri:field/dri:value"/>
|
||||
</span>
|
||||
<xsl:text> (</xsl:text>
|
||||
<i18n:text>xmlui.administrative.item.EditItemBitstreamsForm.previous_order</i18n:text>
|
||||
<xsl:value-of select="dri:field/dri:value"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates select="dri:field[@type='button']"/>
|
||||
</td>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,82 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Rendering of the OpenURL COinS references
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
|
||||
<!--
|
||||
*********************************************
|
||||
OpenURL COinS Rendering Template
|
||||
*********************************************
|
||||
|
||||
COinS Example:
|
||||
|
||||
<span class="Z3988"
|
||||
title="ctx_ver=Z39.88-2004&
|
||||
rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&
|
||||
rfr_id=info%3Asid%2Focoins.info%3Agenerator&
|
||||
rft.title=Making+WordPress+Content+Available+to+Zotero&
|
||||
rft.aulast=Kraus&
|
||||
rft.aufirst=Kari&
|
||||
rft.subject=News&
|
||||
rft.source=Zotero%3A+The+Next-Generation+Research+Tool&
|
||||
rft.date=2007-02-08&
|
||||
rft.type=blogPost&
|
||||
rft.format=text&
|
||||
rft.identifier=http://www.zotero.org/blog/making-wordpress-content-available-to-zotero/&
|
||||
rft.language=English"></span>
|
||||
|
||||
This Code does not parse authors names, instead relying on dc.contributor to populate the
|
||||
coins
|
||||
-->
|
||||
|
||||
<xsl:template name="renderCOinS">
|
||||
<xsl:text>ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&</xsl:text>
|
||||
<xsl:for-each select=".//dim:field[@element = 'identifier']">
|
||||
<xsl:text>rft_id=</xsl:text>
|
||||
<xsl:value-of select="encoder:encode(string(.))"/>
|
||||
<xsl:text>&</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text>rfr_id=info%3Asid%2Fdspace.org%3Arepository&</xsl:text>
|
||||
<xsl:for-each select=".//dim:field[@element != 'description' and @mdschema !='dc' and @qualifier != 'provenance']">
|
||||
<xsl:value-of select="concat('rft.', @element,'=',encoder:encode(string(.))) "/>
|
||||
<xsl:if test="position()!=last()">
|
||||
<xsl:text>&</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,148 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Files listing rendering specific to the ORE bundle
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
xmlns:dcterms="http://purl.org/dc/terms/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
|
||||
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<!-- Rendering the file list from an Atom ReM bitstream stored in the ORE bundle -->
|
||||
<xsl:template match="mets:fileGrp[@USE='ORE']">
|
||||
<xsl:variable name="AtomMapURL" select="concat('cocoon:/',substring-after(mets:file/mets:FLocat[@LOCTYPE='URL']//@*[local-name(.)='href'],$context-path))"/>
|
||||
<h2><i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-head</i18n:text></h2>
|
||||
<table class="ds-table file-list">
|
||||
<thead>
|
||||
<tr class="ds-table-header-row">
|
||||
<th><i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-file</i18n:text></th>
|
||||
<th><i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-size</i18n:text></th>
|
||||
<th><i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-format</i18n:text></th>
|
||||
<th><i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-view</i18n:text></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates select="document($AtomMapURL)/atom:entry/atom:link[@rel='http://www.openarchives.org/ore/terms/aggregates']">
|
||||
<xsl:sort select="@title"/>
|
||||
</xsl:apply-templates>
|
||||
</tbody>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Iterate over the links in the ORE resource maps and make them into bitstream references in the file section -->
|
||||
<xsl:template match="atom:link[@rel='http://www.openarchives.org/ore/terms/aggregates']">
|
||||
<xsl:variable name="link_href" select="@href"/>
|
||||
<xsl:if test="/atom:entry/oreatom:triples/rdf:Description[@rdf:about=$link_href][dcterms:description='ORIGINAL']
|
||||
or not(/atom:entry/oreatom:triples/rdf:Description[@rdf:about=$link_href])">
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:text>ds-table-row </xsl:text>
|
||||
<xsl:if test="(position() mod 2 = 0)">even </xsl:if>
|
||||
<xsl:if test="(position() mod 2 = 1)">odd </xsl:if>
|
||||
</xsl:attribute>
|
||||
<td>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="@href"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@title">
|
||||
<xsl:value-of select="@title"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@href"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(@title) > 50">
|
||||
<xsl:variable name="title_length" select="string-length(@title)"/>
|
||||
<xsl:value-of select="substring(@title,1,15)"/>
|
||||
<xsl:text> ... </xsl:text>
|
||||
<xsl:value-of select="substring(@title,$title_length - 25,$title_length)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@title">
|
||||
<xsl:value-of select="@title"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@href"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</td>
|
||||
<!-- File size always comes in bytes and thus needs conversion -->
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@length < 1000">
|
||||
<xsl:value-of select="@length"/>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.size-bytes</i18n:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@length < 1000000">
|
||||
<xsl:value-of select="substring(string(@length div 1000),1,5)"/>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.size-kilobytes</i18n:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@length < 1000000001">
|
||||
<xsl:value-of select="substring(string(@length div 1000000),1,5)"/>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.size-megabytes</i18n:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@length > 1000000000">
|
||||
<xsl:value-of select="substring(string(@length div 1000000000),1,5)"/>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.size-gigabytes</i18n:text>
|
||||
</xsl:when>
|
||||
<!-- When one isn't available -->
|
||||
<xsl:otherwise><xsl:text>n/a</xsl:text></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<!-- Currently format carries forward the mime type. In the original DSpace, this
|
||||
would get resolved to an application via the Bitstream Registry, but we are
|
||||
constrained by the capabilities of METS and can't really pass that info through. -->
|
||||
<td>
|
||||
<xsl:value-of select="substring-before(@type,'/')"/>
|
||||
<xsl:text>/</xsl:text>
|
||||
<xsl:value-of select="substring-after(@type,'/')"/>
|
||||
</td>
|
||||
<td>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="@href"/>
|
||||
</xsl:attribute>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-viewOpen</i18n:text>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Starting point of the artifactbrowser transformation.
|
||||
This xsl references all artifactbrowser related dependencies.
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
|
||||
|
||||
<xsl:import href="common.xsl"/>
|
||||
<xsl:import href="item-list.xsl"/>
|
||||
<xsl:import href="collection-list.xsl"/>
|
||||
<xsl:import href="community-list.xsl"/>
|
||||
<xsl:import href="item-view.xsl"/>
|
||||
<xsl:import href="collection-view.xsl"/>
|
||||
<xsl:import href="community-view.xsl"/>
|
||||
<xsl:import href="ORE.xsl"/>
|
||||
<xsl:import href="COinS.xsl"/>
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,140 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Rendering of a list of collections (e.g. on a community homepage,
|
||||
or on the community-list page)
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
|
||||
xmlns:confman="org.dspace.core.ConfigurationManager"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl util confman">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<xsl:template match="dri:p[dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.month'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.month' or @id='aspect.administrative.WithdrawnItems.field.month' ]]">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<xsl:apply-templates select="i18n:text"/>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<xsl:apply-templates select="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.month'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.month' or @id='aspect.administrative.PrivateItems.field.month']"/>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<xsl:apply-templates select="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.year'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.year' or @id='aspect.administrative.PrivateItems.field.year']"/>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:p[dri:field/@id='aspect.artifactbrowser.ConfigurableBrowse.field.starts_with'
|
||||
or dri:field/@id='aspect.discovery.SearchFacetFilter.field.starts_with'
|
||||
or dri:field/@id='aspect.administrative.WithdrawnItems.field.starts_with'
|
||||
or dri:field/@id='aspect.administrative.PrivateItems.field.starts_with']">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<p class="input-group">
|
||||
<xsl:apply-templates
|
||||
select="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.starts_with'
|
||||
or @id='aspect.discovery.SearchFacetFilter.field.starts_with'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.starts_with'
|
||||
or @id='aspect.administrative.PrivateItems.field.starts_with']"/>
|
||||
|
||||
<span class="input-group-btn">
|
||||
<xsl:apply-templates
|
||||
select="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.submit'
|
||||
or @id='aspect.discovery.SearchFacetFilter.field.submit'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.submit'
|
||||
or @id='aspect.administrative.PrivateItems.field.submit']"/>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.starts_with'
|
||||
or @id='aspect.discovery.SearchFacetFilter.field.starts_with'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.starts_with'
|
||||
or @id='aspect.administrative.PrivateItems.field.starts_with']">
|
||||
<input>
|
||||
<xsl:call-template name="fieldAttributes"/>
|
||||
<xsl:attribute name="value">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./dri:value[@type='raw']">
|
||||
<xsl:value-of select="./dri:value[@type='raw']"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="./dri:value[@type='default']"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title"><xsl:value-of select="dri:help"/></xsl:attribute>
|
||||
<xsl:attribute name="i18n:attr">placeholder title</xsl:attribute>
|
||||
<xsl:apply-templates select="*[not(self::dri:help)]"/>
|
||||
</input>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:p[dri:field/@id='aspect.artifactbrowser.ConfigurableBrowse.field.year'
|
||||
or dri:field/@id='aspect.administrative.WithdrawnItems.field.year'
|
||||
or dri:field/@id='aspect.administrative.PrivateItems.field.year']">
|
||||
<div class="form-group">
|
||||
<label><xsl:apply-templates select="i18n:text[1]"/></label>
|
||||
<div class="row">
|
||||
<div class="col-xs-5 col-sm-3">
|
||||
<xsl:apply-templates select="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.year'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.year'
|
||||
or @id='aspect.administrative.PrivateItems.field.year' ]"/>
|
||||
</div>
|
||||
<div class="col-xs-7 col-sm-6">
|
||||
<div class="input-group">
|
||||
<xsl:apply-templates
|
||||
select="../dri:p/dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.starts_with'
|
||||
or @id='aspect.administrative.WithdrawnItems.field.starts_with'
|
||||
or @id='aspect.administrative.PrivateItems.field.starts_with']"/>
|
||||
<span class="input-group-btn">
|
||||
<xsl:apply-templates
|
||||
select="../dri:p/dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.submit' or @id='aspect.administrative.WithdrawnItems.field.submit'
|
||||
or @id='aspect.administrative.PrivateItems.field.submit']"/>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:div[dri:p/dri:field/@id='aspect.artifactbrowser.ConfigurableBrowse.field.year']/dri:p[dri:field/@id='aspect.artifactbrowser.ConfigurableBrowse.field.starts_with']"/>
|
||||
<xsl:template match="dri:div[dri:p/dri:field/@id='aspect.administrative.WithdrawnItems.field.year']/dri:p[dri:field/@id='aspect.administrative.WithdrawnItems.field.starts_with']"/>
|
||||
<xsl:template match="dri:div[dri:p/dri:field/@id='aspect.administrative.PrivateItems.field.year']/dri:p[dri:field/@id='aspect.administrative.PrivateItems.field.starts_with']"/>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Rendering of a list of collections (e.g. on a community homepage,
|
||||
or on the community-list page)
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
|
||||
xmlns:confman="org.dspace.core.ConfigurationManager"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl util confman">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<!-- A collection rendered in the summaryList pattern. Encountered on the community-list page -->
|
||||
<xsl:template name="collectionSummaryList-DIM">
|
||||
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
|
||||
<div class="artifact-description">
|
||||
<h4 class="artifact-title">
|
||||
<a href="{@OBJID}">
|
||||
<span class="Z3988">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($data/dim:field[@element='title'][1]) > 0">
|
||||
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</span>
|
||||
</a>
|
||||
<!--Display community strengths (item counts) if they exist-->
|
||||
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) > 0">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
</h4>
|
||||
<xsl:variable name="abstract" select="$data/dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
|
||||
<xsl:if test="$abstract and string-length($abstract[1]) > 0">
|
||||
<div class="artifact-info">
|
||||
<span class="short-description text-muted">
|
||||
<xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- A collection rendered in the detailList pattern. Encountered on the item view page as
|
||||
the "this item is part of these collections" list -->
|
||||
<xsl:template name="collectionDetailList-DIM">
|
||||
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
|
||||
<a href="{@OBJID}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($data/dim:field[@element='title'][1]) > 0">
|
||||
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
<!--Display collection strengths (item counts) if they exist-->
|
||||
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) > 0">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
<br/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$data/dim:field[@element='description' and @qualifier='abstract']">
|
||||
<xsl:copy-of select="$data/dim:field[@element='description' and @qualifier='abstract']/node()"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:copy-of select="$data/dim:field[@element='description'][1]/node()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- A collection rendered in the detailList pattern. Encountered on the item view page as
|
||||
the "this item is part of these collections" list -->
|
||||
<xsl:template name="collectionItemPageSummaryList-DIM">
|
||||
<xsl:variable name="data" select="./mets:dmdSec/mets:mdWrap/mets:xmlData/dim:dim"/>
|
||||
<a href="{@OBJID}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($data/dim:field[@element='title'][1]) > 0">
|
||||
<xsl:value-of select="$data/dim:field[@element='title'][1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
<!--Display collection strengths (item counts) if they exist-->
|
||||
<xsl:if test="string-length($data/dim:field[@element='format'][@qualifier='extent'][1]) > 0">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:value-of select="$data/dim:field[@element='format'][@qualifier='extent'][1]"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,83 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Rendering specific to the collection home page.
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<!-- The summaryView of communities and collections is undefined. -->
|
||||
<xsl:template name="collectionSummaryView-DIM">
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.collection-not-implemented</i18n:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- A collection rendered in the detailView pattern; default way of viewing a collection. -->
|
||||
<xsl:template name="collectionDetailView-DIM">
|
||||
<div class="detail-view"> 
|
||||
<!-- Generate the logo, if present, from the file section -->
|
||||
<xsl:apply-templates select="./mets:fileSec/mets:fileGrp[@USE='LOGO']"/>
|
||||
<!-- Generate the info about the collections from the metadata section -->
|
||||
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
|
||||
mode="collectionDetailView-DIM"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generate the info about the collection from the metadata section -->
|
||||
<xsl:template match="dim:dim" mode="collectionDetailView-DIM">
|
||||
<xsl:if test="string-length(dim:field[@element='description'][not(@qualifier)])>0">
|
||||
<p class="intro-text">
|
||||
<xsl:copy-of select="dim:field[@element='description'][not(@qualifier)]/node()"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="string-length(dim:field[@element='description'][@qualifier='tableofcontents'])>0">
|
||||
<div class="detail-view-news">
|
||||
<h3><i18n:text>xmlui.dri2xhtml.METS-1.0.news</i18n:text></h3>
|
||||
<p class="news-text">
|
||||
<xsl:copy-of select="dim:field[@element='description'][@qualifier='tableofcontents']/node()"/>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0">
|
||||
<div class="detail-view-rights-and-license">
|
||||
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0">
|
||||
<p class="copyright-text">
|
||||
<xsl:copy-of select="dim:field[@element='rights'][not(@qualifier)]/node()"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,362 @@
|
||||
<!--
|
||||
|
||||
The contents of this file are subject to the license and copyright
|
||||
detailed in the LICENSE and NOTICE files at the root of the source
|
||||
tree and available online at
|
||||
|
||||
http://www.dspace.org/license/
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Parts of the artifactbrowser which are not
|
||||
specific to a single listing or page. These will not
|
||||
frequently be adapted in a theme
|
||||
|
||||
Author: art.lowel at atmire.com
|
||||
Author: lieven.droogmans at atmire.com
|
||||
Author: ben at atmire.com
|
||||
Author: Alexey Maslov
|
||||
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
|
||||
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
|
||||
xmlns:mets="http://www.loc.gov/METS/"
|
||||
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
|
||||
xmlns:xlink="http://www.w3.org/TR/xlink/"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:ore="http://www.openarchives.org/ore/terms/"
|
||||
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xalan="http://xml.apache.org/xalan"
|
||||
xmlns:encoder="xalan://java.net.URLEncoder"
|
||||
xmlns:confman="org.dspace.core.ConfigurationManager"
|
||||
exclude-result-prefixes="i18n dri mets dim xlink xsl xalan encoder confman">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<!-- These templates are devoted to handling the referenceSet and reference elements. Although they are considered
|
||||
structural elements, neither of the two contains actual content. Instead, references contain references
|
||||
to object metadata under objectMeta, while referenceSets group references together.
|
||||
-->
|
||||
|
||||
|
||||
<!-- Starting off easy here, with a summaryList -->
|
||||
|
||||
<!-- Current issues:
|
||||
|
||||
1. There is no check for the repository identifier. Need to fix that by concatenating it with the
|
||||
object identifier and using the resulting string as the key on items and reps.
|
||||
2. The use of a key index across the object store is cryptic and counterintuitive and most likely
|
||||
could benefit from better documentation.
|
||||
-->
|
||||
|
||||
<!-- When you come to an referenceSet you have to make a decision. Since it contains objects, and each
|
||||
object is its own entity (and handled in its own template) the decision of the overall structure
|
||||
would logically (and traditionally) lie with this template. However, to accomplish this we would
|
||||
have to look ahead and check what objects are included in the set, which involves resolving the
|
||||
references ahead of time and getting the information from their METS profiles directly.
|
||||
|
||||
Since this approach creates strong coupling between the set and the objects it contains, and we
|
||||
have tried to avoid that, we use the "pioneer" method. -->
|
||||
|
||||
|
||||
<!-- First, the detail list case -->
|
||||
<xsl:template match="dri:referenceSet[@type = 'detailList']" priority="2">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<ul class="ds-referenceSet-list">
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="detailList"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Next up is the summary view case that at this point applies only to items, since communities and
|
||||
collections do not have two separate views. -->
|
||||
<xsl:template match="dri:referenceSet[@type = 'summaryView']" priority="2">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="summaryView"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Finally, we have the detailed view case that is applicable to items, communities and collections.
|
||||
In DRI it constitutes a standard view of collections/communities and a complete metadata listing
|
||||
view of items. -->
|
||||
<xsl:template match="dri:referenceSet[@type = 'detailView']" priority="2">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="detailView"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Summarylist case. This template used to apply templates to the "pioneer" object (the first object
|
||||
in the set) and let it figure out what to do. This is no longer the case, as everything has been
|
||||
moved to the list model. A special theme, called TableTheme, has beeen created for the purpose of
|
||||
preserving the pioneer model. -->
|
||||
<xsl:template match="dri:referenceSet[@type = 'summaryList']" priority="2">
|
||||
<xsl:apply-templates select="dri:head"/>
|
||||
<!-- Here we decide whether we have a hierarchical list or a flat one -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="descendant-or-self::dri:referenceSet/@rend='hierarchy' or ancestor::dri:referenceSet/@rend='hierarchy'">
|
||||
<ul class="ds-artifact-list list-unstyled">
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="summaryList"/>
|
||||
</ul>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="ds-artifact-list list-unstyled">
|
||||
<xsl:apply-templates select="*[not(name()='head')]" mode="summaryList"/>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generate the logo, if present, from the file section -->
|
||||
<xsl:template match="mets:fileGrp[@USE='LOGO']">
|
||||
<div class="ds-logo-wrapper">
|
||||
<img src="{mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href}" class="logo img-responsive">
|
||||
<xsl:attribute name="alt">xmlui.dri2xhtml.METS-1.0.collection-logo-alt</xsl:attribute>
|
||||
<xsl:attribute name="attr" namespace="http://apache.org/cocoon/i18n/2.1">alt</xsl:attribute>
|
||||
</img>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="dri:referenceSet[@id='aspect.artifactbrowser.ItemViewer.referenceSet.collection-viewer']/dri:reference" mode="summaryView">
|
||||
<!-- simplified check to verify whether access rights are available in METS -->
|
||||
<xsl:variable name='METSRIGHTS-enabled' select="contains(confman:getProperty('plugin.named.org.dspace.content.crosswalk.DisseminationCrosswalk'), 'METSRIGHTS')" />
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- If this is an Item, display the METSRIGHTS section, so we
|
||||
know which files have access restrictions.
|
||||
This requires the METSRightsCrosswalk to be enabled! -->
|
||||
<xsl:if test="@type='DSpace Item' and $METSRIGHTS-enabled">
|
||||
<xsl:text>?rightsMDTypes=METSRIGHTS</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!-- This comment just displays the full URL in an HTML comment, for easy reference. -->
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="summaryView"/>
|
||||
<!--<xsl:apply-templates /> prevents the collections section from being rendered in the default way-->
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:referenceSet[@type = 'itemPageSummaryList']" priority="2">
|
||||
<ul class="ds-referenceSet-list">
|
||||
<xsl:apply-templates mode="itemPageSummaryList"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:reference" mode="itemPageSummaryList">
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- No options selected, render the full METS document -->
|
||||
</xsl:variable>
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<li>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="itemPageSummaryList"/>
|
||||
<xsl:apply-templates />
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="mets:METS[mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']][@LABEL='DSpace Collection']" mode="itemPageSummaryList">
|
||||
<xsl:call-template name="collectionItemPageSummaryList-DIM"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- The following options can be appended to the external metadata URL to request specific
|
||||
sections of the METS document:
|
||||
|
||||
sections:
|
||||
|
||||
A comma-separated list of METS sections to included. The possible values are: "metsHdr", "dmdSec",
|
||||
"amdSec", "fileSec", "structMap", "structLink", "behaviorSec", and "extraSec". If no list is provided then *ALL*
|
||||
sections are rendered.
|
||||
|
||||
|
||||
dmdTypes:
|
||||
|
||||
A comma-separated list of metadata formats to provide as descriptive metadata. The list of avaialable metadata
|
||||
types is defined in the dspace.cfg, disseminationcrosswalks. If no formats are provided them DIM - DSpace
|
||||
Intermediate Format - is used.
|
||||
|
||||
|
||||
amdTypes:
|
||||
|
||||
A comma-separated list of metadata formats to provide administative metadata. DSpace does not currently
|
||||
support this type of metadata.
|
||||
|
||||
|
||||
fileGrpTypes:
|
||||
|
||||
A comma-separated list of file groups to render. For DSpace a bundle is translated into a METS fileGrp, so
|
||||
possible values are "THUMBNAIL","CONTENT", "METADATA", etc... If no list is provided then all groups are
|
||||
rendered.
|
||||
|
||||
|
||||
structTypes:
|
||||
|
||||
A comma-separated list of structure types to render. For DSpace there is only one structType: LOGICAL. If this
|
||||
is provided then the logical structType will be rendered, otherwise none will. The default operation is to
|
||||
render all structure types.
|
||||
-->
|
||||
|
||||
<!-- Then we resolve the reference tag to an external mets object -->
|
||||
<xsl:template match="dri:reference" mode="summaryList">
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- Since this is a summary only grab the descriptive metadata, and the thumbnails -->
|
||||
<xsl:text>?sections=dmdSec,fileSec&fileGrpTypes=THUMBNAIL</xsl:text>
|
||||
<!-- An example of requesting a specific metadata standard (MODS and QDC crosswalks only work for items)->
|
||||
<xsl:if test="@type='DSpace Item'">
|
||||
<xsl:text>&dmdTypes=DC</xsl:text>
|
||||
</xsl:if>-->
|
||||
</xsl:variable>
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<li>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:text>ds-artifact-item </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="summaryList"/>
|
||||
<xsl:apply-templates />
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:reference" mode="detailList">
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- No options selected, render the full METS document -->
|
||||
</xsl:variable>
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<li>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="detailList"/>
|
||||
<xsl:apply-templates />
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:reference" mode="summaryView">
|
||||
<!-- simplified check to verify whether access rights are available in METS -->
|
||||
<xsl:variable name='METSRIGHTS-enabled' select="contains(confman:getProperty('plugin.named.org.dspace.content.crosswalk.DisseminationCrosswalk'), 'METSRIGHTS')" />
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- If this is an Item, display the METSRIGHTS section, so we
|
||||
know which files have access restrictions.
|
||||
This requires the METSRightsCrosswalk to be enabled! -->
|
||||
<xsl:if test="@type='DSpace Item' and $METSRIGHTS-enabled">
|
||||
<xsl:text>?rightsMDTypes=METSRIGHTS</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!-- This comment just displays the full URL in an HTML comment, for easy reference. -->
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="summaryView"/>
|
||||
<xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dri:reference" mode="detailView">
|
||||
<xsl:variable name="externalMetadataURL">
|
||||
<xsl:text>cocoon:/</xsl:text>
|
||||
<xsl:value-of select="@url"/>
|
||||
<!-- No options selected, render the full METS document -->
|
||||
</xsl:variable>
|
||||
<xsl:comment> External Metadata URL: <xsl:value-of select="$externalMetadataURL"/> </xsl:comment>
|
||||
<xsl:apply-templates select="document($externalMetadataURL)" mode="detailView"/>
|
||||
<xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The summaryList display type; used to generate simple surrogates for the item involved
|
||||
-->
|
||||
|
||||
<xsl:template match="mets:METS[mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']]" mode="summaryList">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LABEL='DSpace Item'">
|
||||
<xsl:call-template name="itemSummaryList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Collection'">
|
||||
<xsl:call-template name="collectionSummaryList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Community'">
|
||||
<xsl:call-template name="communitySummaryList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.non-conformant</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The detailList display type; used to generate simple surrogates for the item involved, but with
|
||||
a slightly higher level of information provided. Not commonly used.
|
||||
-->
|
||||
|
||||
<xsl:template match="mets:METS[mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']]" mode="detailList">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LABEL='DSpace Item'">
|
||||
<xsl:call-template name="itemDetailList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Collection'">
|
||||
<xsl:call-template name="collectionDetailList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Community'">
|
||||
<xsl:call-template name="communityDetailList-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.non-conformant</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The summaryView display type; used to generate a near-complete view of the item involved. It is currently
|
||||
not applicable to communities and collections.
|
||||
-->
|
||||
<xsl:template match="mets:METS[mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']]" mode="summaryView">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LABEL='DSpace Item'">
|
||||
<xsl:call-template name="itemSummaryView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Collection'">
|
||||
<xsl:call-template name="collectionSummaryView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Community'">
|
||||
<xsl:call-template name="communitySummaryView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.non-conformant</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The detailView display type; used to generate a complete view of the object involved. It is currently
|
||||
used with the "full item record" view of items as well as the default views of communities and collections.
|
||||
-->
|
||||
<xsl:template match="mets:METS[mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']]" mode="detailView">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LABEL='DSpace Item'">
|
||||
<xsl:call-template name="itemDetailView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Collection'">
|
||||
<xsl:call-template name="collectionDetailView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@LABEL='DSpace Community'">
|
||||
<xsl:call-template name="communityDetailView-DIM"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<i18n:text>xmlui.dri2xhtml.METS-1.0.non-conformant</i18n:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|