diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/ant/Scaladoc.scala | 12 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/Settings.scala | 9 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/page/Template.scala | 9 |
3 files changed, 28 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/ant/Scaladoc.scala b/src/compiler/scala/tools/ant/Scaladoc.scala index 419f60af21..b233d3b585 100644 --- a/src/compiler/scala/tools/ant/Scaladoc.scala +++ b/src/compiler/scala/tools/ant/Scaladoc.scala @@ -106,6 +106,9 @@ class Scaladoc extends ScalaMatchingTask { /** The document title of the generated HTML documentation. */ private var doctitle: Option[String] = None + /** The document footer of the generated HTML documentation. */ + private var docfooter: Option[String] = None + /** The document version, to be added to the title. */ private var docversion: Option[String] = None @@ -304,6 +307,14 @@ class Scaladoc extends ScalaMatchingTask { doctitle = Some(input) } + /** Sets the <code>docfooter</code> attribute. + * + * @param input The value of <code>docfooter</code>. + */ + def setDocfooter(input: String) { + docfooter = Some(input) + } + /** Set the <code>addparams</code> info attribute. * * @param input The value for <code>addparams</code>. @@ -523,6 +534,7 @@ class Scaladoc extends ScalaMatchingTask { if (!extdirs.isEmpty) docSettings.extdirs.value = asString(getExtdirs) if (!encoding.isEmpty) docSettings.encoding.value = encoding.get if (!doctitle.isEmpty) docSettings.doctitle.value = decodeEscapes(doctitle.get) + if (!docfooter.isEmpty) docSettings.docfooter.value = decodeEscapes(docfooter.get) if (!docversion.isEmpty) docSettings.docversion.value = decodeEscapes(docversion.get) if (!docsourceurl.isEmpty) docSettings.docsourceurl.value =decodeEscapes(docsourceurl.get) if (!docUncompilable.isEmpty) docSettings.docUncompilable.value = decodeEscapes(docUncompilable.get) diff --git a/src/compiler/scala/tools/nsc/doc/Settings.scala b/src/compiler/scala/tools/nsc/doc/Settings.scala index 9615b506c5..cfd6635a76 100644 --- a/src/compiler/scala/tools/nsc/doc/Settings.scala +++ b/src/compiler/scala/tools/nsc/doc/Settings.scala @@ -41,6 +41,13 @@ class Settings(error: String => Unit) extends scala.tools.nsc.Settings(error) { "" ) + val docfooter = StringSetting ( + "-doc-footer", + "footer", + "A footer on every ScalaDoc page, by default the EPFL/Typesafe copyright notice. Can be overridden with a custom footer.", + "" + ) + val docUncompilable = StringSetting ( "-doc-no-compile", "path", @@ -81,7 +88,7 @@ class Settings(error: String => Unit) extends scala.tools.nsc.Settings(error) { // For improved help output. def scaladocSpecific = Set[Settings#Setting]( - docformat, doctitle, docversion, docUncompilable, docsourceurl, docgenerator + docformat, doctitle, docfooter, docversion, docUncompilable, docsourceurl, docgenerator ) val isScaladocSpecific: String => Boolean = scaladocSpecific map (_.name) } diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index 6eb21bf016..ba1aba2f0b 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -168,7 +168,14 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { </div> <div id="tooltip" ></div> - <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> + + { + if (Set("epfl", "EPFL").contains(tpl.universe.settings.docfooter.value)) + <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> + else + <div id="footer"> { tpl.universe.settings.docfooter.value } </div> + } + </body> } |