- commit = @repository.commit(tag.target)
- release = @releases.find { |release| release.tag == tag.name }
%li
  %div
    = link_to namespace_project_tag_path(@project.namespace, @project, tag.name) do
      %strong
        = icon('tag')
        = tag.name
    - if tag.message.present?
      &nbsp;
      = strip_gpg_signature(tag.message)

    .controls
      = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, tag.name), class: 'btn-grouped btn' do
        = icon("pencil")
      - if can? current_user, :download_code, @project
        = render 'projects/tags/download', ref: tag.name, project: @project

  - if commit
    = render 'projects/branches/commit', commit: commit, project: @project
  - else
    %p
      Cant find HEAD commit for this tag
  - if release && release.description.present?
    .description.prepend-top-default
      .wiki
        = preserve do
          = markdown release.description

- commit = @repository.commit(tag.target)
- release = @releases.find { |release| release.tag == tag.name }
%li
  %div
    = link_to namespace_project_tag_path(@project.namespace, @project, tag.name) do
      %strong
        = icon('tag')
        = tag.name
    - if tag.message.present?
      &nbsp;
      = strip_gpg_signature(tag.message)

    .controls
      - if can?(current_user, :download_code, @project)
        = render 'projects/tags/download', ref: tag.name, project: @project

      - if can?(current_user, :push_code, @project)
        = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, tag.name), class: 'btn-grouped btn has_tooltip', title: "Edit release notes" do
          = icon("pencil")
  - if commit
    = render 'projects/branches/commit', commit: commit, project: @project
  - else
    %p
      Cant find HEAD commit for this tag
  - if release && release.description.present?
    .description.prepend-top-default
      .wiki
        = preserve do
          = markdown release.description

Add permission check for tag list release notes button
Add permission check for tag list release notes button
