<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2006–2013 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
-->
<!DOCTYPE window [
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd">
	%zoteroDTD;
	<!ENTITY % preferencesDTD SYSTEM "chrome://zotero/locale/preferences.dtd">
	%preferencesDTD;
]>

<overlay id="zotero-prefpane-cite-overlay"
		xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	
	<prefpane id="zotero-prefpane-cite"
			onpaneload="Zotero_Preferences.Cite.init()"
			helpTopic="cite">
		
		<preferences id="zotero-preferences-cite">
			<preference id="pref-cite-useClassicAddCitationDialog" name="extensions.zotero.integration.useClassicAddCitationDialog" type="bool"/>
			<preference id="pref-cite-citePaperJournalArticleURL" name="extensions.zotero.export.citePaperJournalArticleURL" type="bool"/>
		</preferences>
		
		<tabbox>
			<tabs>
				<tab id="styles-tab" label="&zotero.preferences.cite.styles;"/>
				<tab id="wordProcessors-tab" label="&zotero.preferences.cite.wordProcessors;"/>
			</tabs>
			<tabpanels>
				<tabpanel orient="vertical" id="styles">
					<groupbox flex="1">
						<caption label="&zotero.preferences.cite.styles.styleManager;"/>
						
						<tree flex="1" id="styleManager" hidecolumnpicker="true" rows="6"
								onselect="document.getElementById('styleManager-delete').disabled = undefined"
								onkeypress="if (event.keyCode == event.DOM_VK_DELETE) { Zotero_Preferences.Cite.deleteSelectedStyle(); }">
							<treecols>
								<treecol id="styleManager-title" label="&zotero.preferences.cite.styles.styleManager.title;" flex="1"/>
								<treecol id="styleManager-updated" label="&zotero.preferences.cite.styles.styleManager.updated;"/>
							</treecols>
							<treechildren id="styleManager-rows"/>
						</tree>
						<separator class="thin"/>
						<hbox align="center" flex="1" height="40">
							<label class="zotero-text-link"
									value="&zotero.preferences.export.getAdditionalStyles;" flex="1"
									onclick="Zotero_Preferences.Cite.openStylesPage(); event.preventDefault()"/>
							<button disabled="true" id="styleManager-delete" label="-"
								oncommand="Zotero_Preferences.Cite.deleteStyle()"/>
							<button label="+" oncommand="Zotero_Preferences.Cite.addStyle()"/>
						</hbox>
					</groupbox>
					
					<groupbox>
						<caption label="&zotero.preferences.citationOptions.caption;"/>
						
						<checkbox label="&zotero.preferences.export.citePaperJournalArticleURL;" preference="pref-cite-citePaperJournalArticleURL"/>
						<!-- This doesn't wrap without an explicit width, for some reason -->
						<label id="export-citePaperJournalArticleURL" width="45em">
							&zotero.preferences.export.citePaperJournalArticleURL.description;
						</label>
					</groupbox>
					
					<groupbox>
						<caption label="&zotero.general.tools;"/>
						
						<hbox>
							<button id="openCSLEdit"
								label="&zotero.preferences.styleEditor;"
								oncommand="Zotero_Preferences.openInViewer('chrome://zotero/content/tools/csledit.xul', true)"/>
							<button id="openCSLPreview"
								label="&zotero.preferences.stylePreview;"
								oncommand="Zotero_Preferences.openInViewer('chrome://zotero/content/tools/cslpreview.xul', true)"/>
						</hbox>
					</groupbox>
				</tabpanel>
				<tabpanel orient="vertical" id="wordProcessors">
					<vbox id="wordProcessors-somePluginsDisabled" hidden="true">
						<label style="font-weight: bold; margin-top: 1em; text-align: center">Some word processor plugins are disabled.</label>
						<hbox pack="center" style="margin-bottom: 2em">
							<button id="wordProcessors-enablePlugins"
								label="Enable Plugins and Restart Zotero"
								oncommand="Zotero_Preferences.Cite.enableWordPlugins()"/>
						</hbox>
					</vbox>
					<checkbox label="&zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog;" preference="pref-cite-useClassicAddCitationDialog"/>
				</tabpanel>
			</tabpanels>
		</tabbox>
	</prefpane>
	
	<script src="preferences_cite.js" type="application/javascript;version=1.8"/>
</overlay>
