Object

gitbucket.core.view

helpers

Related Doc: package view

Permalink

object helpers extends AvatarImageProvider with LinkConverter with RequestCache

Provides helper methods for Twirl templates.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. helpers
  2. RequestCache
  3. IssuesService
  4. AccountService
  5. SystemSettingsService
  6. LinkConverter
  7. AvatarImageProvider
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class RegexReplaceString extends AnyRef

    Permalink
  2. implicit class RichHtmlSeq extends AnyRef

    Permalink

    Implicit conversion to add mkHtml() to Seq[Html].

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def activityMessage(message: String)(implicit context: Context): Html

    Permalink

    Convert link notations in the activity message.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def assets(implicit context: Context): String

    Permalink

    Returns the url to the root of assets.

  7. def authenticate(settings: SystemSettings, userName: String, password: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Option[Account]

    Permalink
    Definition Classes
    AccountService
  8. def avatar(commit: CommitInfo, size: Int)(implicit context: Context): Html

    Permalink

    Returns <img> which displays the avatar icon for the given mail address.

    Returns <img> which displays the avatar icon for the given mail address. This method looks up Gravatar if avatar icon has not been configured in user settings.

  9. def avatar(userName: String, size: Int, tooltip: Boolean = false, mailAddress: String = "")(implicit context: Context): Html

    Permalink

    Returns <img> which displays the avatar icon for the given user name.

    Returns <img> which displays the avatar icon for the given user name. This method looks up Gravatar if avatar icon has not been configured in user settings.

  10. def avatarLink(commit: CommitInfo, size: Int)(implicit context: Context): Html

    Permalink

    Generates the avatar link to the account page.

    Generates the avatar link to the account page. If user does not exist or disabled, this method returns avatar image without link.

  11. def avatarLink(userName: String, size: Int, mailAddress: String = "", tooltip: Boolean = false, label: Boolean = false)(implicit context: Context): Html

    Permalink

    Generates the avatar link to the account page.

    Generates the avatar link to the account page. If user does not exist or disabled, this method returns avatar image without link.

  12. def baseUrl(implicit request: HttpServletRequest): String

    Permalink
    Definition Classes
    SystemSettingsService
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def closeIssuesFromMessage(message: String, userName: String, owner: String, repository: String)(implicit s: Session): Unit

    Permalink
    Definition Classes
    IssuesService
  15. def commitStateIcon(state: CommitState): Html

    Permalink
  16. def commitStateText(state: CommitState, commitId: String): String

    Permalink
  17. def convertRefsLinks(text: String, repository: RepositoryInfo, issueIdPrefix: String = "#", escapeHtml: Boolean = true)(implicit context: Context): String

    Permalink

    Converts issue id, username and commit id to link in the given text.

    Converts issue id, username and commit id to link in the given text.

    Attributes
    protected
    Definition Classes
    LinkConverter
  18. def countIssue(condition: IssueSearchCondition, onlyPullRequest: Boolean, repos: (String, String)*)(implicit s: Session): Int

    Permalink

    Returns the count of the search result against issues.

    Returns the count of the search result against issues.

    condition

    the search condition

    onlyPullRequest

    if true then counts only pull request, false then counts both of issue and pull request.

    repos

    Tuple of the repository owner and the repository name

    returns

    the count of the search result

    Definition Classes
    IssuesService
  19. def countIssueGroupByLabels(owner: String, repository: String, condition: IssueSearchCondition, filterUser: Map[String, String])(implicit s: Session): Map[String, Int]

    Permalink

    Returns the Map which contains issue count for each labels.

    Returns the Map which contains issue count for each labels.

    owner

    the repository owner

    repository

    the repository name

    condition

    the search condition

    returns

    the Map which contains issue count for each labels (key is label name, value is issue count)

    Definition Classes
    IssuesService
  20. def createAccount(userName: String, password: String, fullName: String, mailAddress: String, isAdmin: Boolean, url: Option[String])(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  21. def createComment(owner: String, repository: String, loginUser: String, issueId: Int, content: String, action: String)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  22. def createGroup(groupName: String, url: Option[String])(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  23. def createIssue(owner: String, repository: String, loginUser: String, title: String, content: Option[String], assignedUserName: Option[String], milestoneId: Option[Int], isPullRequest: Boolean = false)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  24. def createIssueComment(owner: String, repository: String, commit: CommitInfo)(implicit s: Session): Unit

    Permalink
    Definition Classes
    IssuesService
  25. def createIssueLink(repository: RepositoryInfo, issueId: Int)(implicit context: Context): String

    Permalink

    Creates a link to the issue or the pull request from the issue id.

    Creates a link to the issue or the pull request from the issue id.

    Attributes
    protected
    Definition Classes
    LinkConverter
  26. def createReferComment(owner: String, repository: String, fromIssue: Issue, message: String, loginAccount: Account)(implicit s: Session): Unit

    Permalink
    Definition Classes
    IssuesService
  27. def cut(value: String, length: Int): String

    Permalink
  28. def date(date: Date): String

    Permalink

    Format java.util.Date to "yyyy-MM-dd".

  29. def datetime(date: Date): String

    Permalink

    Format java.util.Date to "yyyy-MM-dd HH:mm:ss".

  30. def datetimeAgo(date: Date): String

    Permalink

    Format java.util.Date to "x {seconds/minutes/hours/days/months/years} ago"

  31. def datetimeAgoRecentOnly(date: Date): String

    Permalink

    Format java.util.Date to "x {seconds/minutes/hours/days} ago" If duration over 1 month, format to "d MMM (yyyy)"

  32. def datetimeRFC3339(date: Date): String

    Permalink

    Format java.util.Date to "yyyy-MM-dd'T'hh:mm:ss'Z'".

  33. def decorateHtml(html: String, repository: RepositoryInfo)(implicit context: Context): String

    Permalink
  34. def deleteComment(commentId: Int)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  35. def deleteIssueLabel(owner: String, repository: String, issueId: Int, labelId: Int)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  36. def detectAndRenderLinks(text: String, repository: RepositoryInfo)(implicit context: Context): String

    Permalink
  37. def editorType(fileName: String): String

    Permalink

    Returns file type for AceEditor.

  38. def encodeRefName(value: String): String

    Permalink

    URL encode except '/'.

  39. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  41. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  42. def getAccountByMailAddress(mailAddress: String)(implicit context: Context): Option[Account]

    Permalink
    Definition Classes
    RequestCache
  43. def getAccountByMailAddress(mailAddress: String, includeRemoved: Boolean = false)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Option[Account]

    Permalink
    Definition Classes
    AccountService
  44. def getAccountByUserName(userName: String)(implicit context: Context): Option[Account]

    Permalink
    Definition Classes
    RequestCache
  45. def getAccountByUserName(userName: String, includeRemoved: Boolean = false)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Option[Account]

    Permalink
    Definition Classes
    AccountService
  46. def getAccountsByUserNames(userNames: Set[String], knowns: Set[Account], includeRemoved: Boolean = false)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Map[String, Account]

    Permalink
    Definition Classes
    AccountService
  47. def getAllUsers(includeRemoved: Boolean = true)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): List[Account]

    Permalink
    Definition Classes
    AccountService
  48. def getAvatarImageHtml(userName: String, size: Int, mailAddress: String = "", tooltip: Boolean = false)(implicit context: Context): Html

    Permalink

    Returns <img> which displays the avatar icon.

    Returns <img> which displays the avatar icon. Looks up Gravatar if avatar icon has not been configured in user settings.

    Attributes
    protected
    Definition Classes
    AvatarImageProvider
  49. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  50. def getComment(owner: String, repository: String, commentId: String)(implicit s: Session): Option[model.IssueCommentComponent.IssueComments.TableElementType]

    Permalink
    Definition Classes
    IssuesService
  51. def getComments(owner: String, repository: String, issueId: Int)(implicit s: Session): List[model.IssueCommentComponent.IssueComments.TableElementType]

    Permalink
    Definition Classes
    IssuesService
  52. def getCommentsForApi(owner: String, repository: String, issueId: Int)(implicit s: Session): List[(IssueComment, Account, Issue)]

    Permalink

    returns

    IssueComment and commentedUser and Issue

    Definition Classes
    IssuesService
  53. def getCommitStatues(issueList: Seq[(String, String, Int)])(implicit s: Session): Map[(String, String, Int), CommitStatusInfo]

    Permalink
    Definition Classes
    IssuesService
  54. def getGroupMembers(groupName: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): List[GroupMember]

    Permalink
    Definition Classes
    AccountService
  55. def getGroupNames(userName: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): List[String]

    Permalink
    Definition Classes
    AccountService
  56. def getGroupsByUserName(userName: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): List[String]

    Permalink
    Definition Classes
    AccountService
  57. def getIssue(userName: String, repositoryName: String, issueId: String)(implicit context: Context): Option[Issue]

    Permalink
    Definition Classes
    RequestCache
  58. def getIssue(owner: String, repository: String, issueId: String)(implicit s: Session): Option[model.IssueComponent.Issues.TableElementType]

    Permalink
    Definition Classes
    IssuesService
  59. def getIssueLabel(owner: String, repository: String, issueId: Int, labelId: Int)(implicit s: Session): Option[model.IssueLabelComponent.IssueLabels.TableElementType]

    Permalink
    Definition Classes
    IssuesService
  60. def getIssueLabels(owner: String, repository: String, issueId: Int)(implicit s: Session): List[Label]

    Permalink
    Definition Classes
    IssuesService
  61. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  62. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  63. def isLastAdministrator(account: Account)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Boolean

    Permalink
    Definition Classes
    AccountService
  64. def isPast(date: Date): Boolean

    Permalink

    Test whether the given Date is past date.

  65. def isRenderable(fileName: String): Boolean

    Permalink

    Tests whether the given file is renderable.

    Tests whether the given file is renderable. It's tested by the file extension.

  66. def issueLink(repository: RepositoryInfo, issueId: Int)(implicit context: Context): Html

    Permalink

    Creates a link to the issue or the pull request from the issue id.

  67. def json(obj: AnyRef): String

    Permalink

    Render a given object as the JSON string.

  68. def link(value: String, repository: RepositoryInfo)(implicit context: Context): Html

    Permalink

    Converts commit id, issue id and username to the link.

  69. def loadSystemSettings(): SystemSettings

    Permalink
    Definition Classes
    SystemSettingsService
  70. def markdown(markdown: String, repository: RepositoryInfo, enableWikiLink: Boolean, enableRefsLink: Boolean, enableLineBreaks: Boolean, enableAnchor: Boolean = true, enableTaskList: Boolean = false, hasWritePermission: Boolean = false, pages: List[String] = Nil)(implicit context: Context): Html

    Permalink

    Converts Markdown of Wiki pages to HTML.

  71. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  72. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  73. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  74. def plural(count: Int, singular: String, plural: String = ""): String

    Permalink

    Returns singular if count is 1, otherwise plural.

    Returns singular if count is 1, otherwise plural. If plural is not specified, returns singular + "s" as plural.

  75. def pre(value: Html): Html

    Permalink
  76. def registerIssueLabel(owner: String, repository: String, issueId: Int, labelId: Int)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  77. def removeHtml(html: Html): Html

    Permalink

    Remove html tags from the given Html instance.

  78. def removeUserRelatedData(userName: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  79. def renderMarkup(filePath: List[String], fileContent: String, branch: String, repository: RepositoryInfo, enableWikiLink: Boolean, enableRefsLink: Boolean, enableAnchor: Boolean)(implicit context: Context): Html

    Permalink

    Render the given source (only markdown is supported in default) as HTML.

    Render the given source (only markdown is supported in default) as HTML. You can test if a file is renderable in this method by isRenderable().

  80. def saveSystemSettings(settings: SystemSettings): Unit

    Permalink
    Definition Classes
    SystemSettingsService
  81. def searchIssue(condition: IssueSearchCondition, pullRequest: Boolean, offset: Int, limit: Int, repos: (String, String)*)(implicit s: Session): List[IssueInfo]

    Permalink

    Returns the search result against issues.

    Returns the search result against issues.

    condition

    the search condition

    pullRequest

    if true then returns only pull requests, false then returns only issues.

    offset

    the offset for pagination

    limit

    the limit for pagination

    repos

    Tuple of the repository owner and the repository name

    returns

    the search result (list of tuples which contain issue, labels and comment count)

    Definition Classes
    IssuesService
  82. def searchIssuesByKeyword(owner: String, repository: String, query: String)(implicit s: Session): List[(Issue, Int, String)]

    Permalink

    Search issues by keyword.

    Search issues by keyword.

    owner

    the repository owner

    repository

    the repository name

    query

    the keywords separated by whitespace.

    returns

    issues with comment count and matched content of issue or comment

    Definition Classes
    IssuesService
  83. def searchPullRequestByApi(condition: IssueSearchCondition, offset: Int, limit: Int, repos: (String, String)*)(implicit s: Session): List[(Issue, Account, Int, PullRequest, Repository, Account)]

    Permalink

    for api

    for api

    returns

    (issue, issueUser, commentCount, pullRequest, headRepo, headOwner)

    Definition Classes
    IssuesService
  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  85. val timeUnits: List[(Long, String)]

    Permalink
  86. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  87. def updateAccount(account: Account)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  88. def updateAssignedUserName(owner: String, repository: String, issueId: Int, assignedUserName: Option[String])(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  89. def updateAvatarImage(userName: String, image: Option[String])(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  90. def updateClosed(owner: String, repository: String, issueId: Int, closed: Boolean)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  91. def updateComment(commentId: Int, content: String)(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  92. def updateGroup(groupName: String, url: Option[String], removed: Boolean)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  93. def updateGroupMembers(groupName: String, members: List[(String, Boolean)])(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  94. def updateIssue(owner: String, repository: String, issueId: Int, title: String, content: Option[String])(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  95. def updateLastLoginDate(userName: String)(implicit s: scala.slick.driver.JdbcProfile.SimpleQL.Session): Unit

    Permalink
    Definition Classes
    AccountService
  96. def updateMilestoneId(owner: String, repository: String, issueId: Int, milestoneId: Option[Int])(implicit s: Session): Int

    Permalink
    Definition Classes
    IssuesService
  97. def url(userName: String)(implicit context: Context): String

    Permalink

    Generates the url to the account page.

  98. def url(repository: RepositoryInfo)(implicit context: Context): String

    Permalink

    Generates the url to the repository.

  99. def urlEncode(value: Option[String]): String

    Permalink
  100. def urlEncode(value: String): String

    Permalink
  101. def user(userName: String, mailAddress: String = "", styleClass: String = "")(implicit context: Context): Html

    Permalink

    Generates the text link to the account page.

    Generates the text link to the account page. If user does not exist or disabled, this method returns user name as text without link.

  102. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  103. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  104. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RequestCache

Inherited from IssuesService

Inherited from AccountService

Inherited from SystemSettingsService

Inherited from LinkConverter

Inherited from AvatarImageProvider

Inherited from AnyRef

Inherited from Any

Ungrouped