/*!
  Creates a \<link\> link tag for a style sheet with href=\a "src". The
  \a src must be one of URL, a absolute path or a relative path. If \a src
  is a relative path, it must exist in the public/css directory.
*/
QString TViewHelper::styleSheetTag(const QString &src, bool withTimestamp, const THtmlAttribute &attributes) const
{
    THtmlAttribute attr = attributes;
    if (!attr.contains("type")) {
        attr.prepend("type", "text/css");
    }
    if (!attr.contains("rel")) {
        attr.prepend("rel", "stylesheet");
    }
    attr.prepend("href", cssPath(src, withTimestamp));
    return selfClosingTag("link", attr);
}
/*!
  Creates a \<script\> script tag with src=\a "src". The \a src must
  be one of URL, a absolute path or a relative path. If \a src is a
  relative path, it must exist in the public/js directory.
*/
QString TViewHelper::scriptTag(const QString &src, bool withTimestamp, const THtmlAttribute &attributes) const
{
    THtmlAttribute attr = attributes;
    if (!attr.contains("type")) {
        attr.prepend("type", "text/javascript");
    }
    attr.prepend("src", jsPath(src, withTimestamp));
    return tag("script", attr, QString());
}