Commit 5c7b91e2 authored by Robert Speicher's avatar Robert Speicher

Single quotes/icon helper in views

parent 6883e6e0
- content_for :note_actions do - content_for :note_actions do
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen js-note-target-reopen", title: 'Reopen Issue' = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue'
- else - else
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue" = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close js-note-target-close', title: 'Close Issue'
= render 'shared/show_aside' = render 'shared/show_aside'
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
%span= pluralize(@issue.participants(current_user).count, 'participant') %span= pluralize(@issue.participants(current_user).count, 'participant')
- @issue.participants(current_user).each do |participant| - @issue.participants(current_user).each do |participant|
= link_to_member(@project, participant, name: false, size: 24) = link_to_member(@project, participant, name: false, size: 24)
.voting_notes#notes= render "projects/notes/notes_with_form" .voting_notes#notes= render 'projects/notes/notes_with_form'
%aside.col-md-3 %aside.col-md-3
.issuable-affix .issuable-affix
.clearfix .clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} %span.slead.has_tooltip{title: 'Cross-project reference'}
= cross_project_reference(@project, @issue) = cross_project_reference(@project, @issue)
%hr %hr
.context .context
......
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
.pull-right .pull-right
- if can?(current_user, :write_issue, @project) - if can?(current_user, :write_issue, @project)
= link_to new_namespace_project_issue_path(@project.namespace, @project), class: "btn btn-grouped new-issue-link", title: "New Issue", id: "new_issue_link" do = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-grouped new-issue-link', title: 'New Issue', id: 'new_issue_link' do
%i.fa.fa-plus = icon('plus')
New Issue New Issue
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen" = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen'
- else - else
= link_to 'Close', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue" = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close', title: 'Close Issue'
= link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: "btn btn-grouped issuable-edit" do = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-grouped issuable-edit' do
%i.fa.fa-pencil-square-o = icon('pencil-square-o')
Edit Edit
%hr %hr
...@@ -40,4 +40,4 @@ ...@@ -40,4 +40,4 @@
%hr %hr
.issue-discussion .issue-discussion
= render "projects/issues/discussion" = render 'projects/issues/discussion'
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
%span.back-to-milestone %span.back-to-milestone
= link_to namespace_project_milestone_path(@project.namespace, @project, @merge_request.milestone) do = link_to namespace_project_milestone_path(@project.namespace, @project, @merge_request.milestone) do
%strong %strong
%i.fa.fa-clock-o = icon('clock-o')
= @merge_request.milestone.title = @merge_request.milestone.title
- else - else
none none
.issuable-context-selectbox .issuable-context-selectbox
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'}) = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: 'Select milestone' }, {class: 'select2 select2-compact js-select2 js-milestone'})
= hidden_field_tag :merge_request_context = hidden_field_tag :merge_request_context
= f.submit class: 'btn' = f.submit class: 'btn'
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
%label %label
Subscription: Subscription:
%button.btn.btn-block.subscribe-button{:type => 'button'} %button.btn.btn-block.subscribe-button{:type => 'button'}
%i.fa.fa-eye = icon('eye')
%span= @merge_request.subscribed?(current_user) ? "Unsubscribe" : "Subscribe" %span= @merge_request.subscribed?(current_user) ? 'Unsubscribe' : 'Subscribe'
- subscribtion_status = @merge_request.subscribed?(current_user) ? "subscribed" : "unsubscribed" - subscribtion_status = @merge_request.subscribed?(current_user) ? 'subscribed' : 'unsubscribed'
.subscription-status{"data-status" => subscribtion_status} .subscription-status{data: {status: subscribtion_status}}
.description-block.unsubscribed{class: ( "hidden" if @merge_request.subscribed?(current_user) )} .description-block.unsubscribed{class: ( 'hidden' if @merge_request.subscribed?(current_user) )}
You're not receiving notifications from this thread. You're not receiving notifications from this thread.
.description-block.subscribed{class: ( "hidden" unless @merge_request.subscribed?(current_user) )} .description-block.subscribed{class: ( 'hidden' unless @merge_request.subscribed?(current_user) )}
You're receiving notifications because you're subscribed to this thread. You're receiving notifications because you're subscribed to this thread.
:coffeescript :coffeescript
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
= render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field'
.comment-hints.clearfix .comment-hints.clearfix
.pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }} .pull-left Comments are parsed with #{link_to 'GitLab Flavored Markdown', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
.pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }. .pull-right Attach files by dragging & dropping or #{link_to 'selecting them', '#', class: 'markdown-selector', tabindex: -1 }.
.note-form-actions .note-form-actions
.buttons .buttons
= f.submit 'Save Comment', class: "btn btn-primary btn-save btn-grouped js-comment-button" = f.submit 'Save Comment', class: 'btn btn-primary btn-save btn-grouped js-comment-button'
= link_to 'Cancel', "#", class: "btn btn-cancel note-edit-cancel" = link_to 'Cancel', '#', class: 'btn btn-cancel note-edit-cancel'
\ No newline at end of file
...@@ -2,28 +2,28 @@ ...@@ -2,28 +2,28 @@
.timeline-entry-inner .timeline-entry-inner
.timeline-icon .timeline-icon
- if note.system - if note.system
%span.fa.fa-circle %span= icon('circle')
- else - else
= link_to user_path(note.author) do = link_to user_path(note.author) do
= image_tag avatar_icon(note.author_email), class: "avatar s40", alt: '' = image_tag avatar_icon(note.author_email), class: 'avatar s40', alt: ''
.timeline-content .timeline-content
.note-header .note-header
.note-actions .note-actions
= link_to "##{dom_id(note)}", name: dom_id(note) do = link_to "##{dom_id(note)}", name: dom_id(note) do
%i.fa.fa-link = icon('link')
Link here Link here
   
- if can?(current_user, :admin_note, note) && note.editable? - if can?(current_user, :admin_note, note) && note.editable?
= link_to "#", title: "Edit comment", class: "js-note-edit" do = link_to '#', title: 'Edit comment', class: 'js-note-edit' do
%i.fa.fa-pencil-square-o = icon('pencil-square-o')
Edit Edit
   
= link_to namespace_project_note_path(@project.namespace, @project, note), title: "Remove comment", method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: "danger js-note-delete" do = link_to namespace_project_note_path(@project.namespace, @project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'danger js-note-delete' do
%i.fa.fa-trash-o.cred = icon('trash-o', class: 'cred')
Remove Remove
- if note.system - if note.system
= link_to user_path(note.author) do = link_to user_path(note.author) do
= image_tag avatar_icon(note.author_email), class: "avatar s16", alt: '' = image_tag avatar_icon(note.author_email), class: 'avatar s16', alt: ''
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
%span.author-username %span.author-username
= '@' + note.author.username = '@' + note.author.username
...@@ -33,20 +33,20 @@ ...@@ -33,20 +33,20 @@
- if note.superceded?(@notes) - if note.superceded?(@notes)
- if note.upvote? - if note.upvote?
%span.vote.upvote.label.label-gray.strikethrough %span.vote.upvote.label.label-gray.strikethrough
%i.fa.fa-thumbs-up = icon('thumbs-up')
\+1 \+1
- if note.downvote? - if note.downvote?
%span.vote.downvote.label.label-gray.strikethrough %span.vote.downvote.label.label-gray.strikethrough
%i.fa.fa-thumbs-down = icon('thumbs-down')
\-1 \-1
- else - else
- if note.upvote? - if note.upvote?
%span.vote.upvote.label.label-success %span.vote.upvote.label.label-success
%i.fa.fa-thumbs-up = icon('thumbs-up')
\+1 \+1
- if note.downvote? - if note.downvote?
%span.vote.downvote.label.label-danger %span.vote.downvote.label.label-danger
%i.fa.fa-thumbs-down = icon('thumbs-down')
\-1 \-1
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
= link_to note.attachment.url, target: '_blank' do = link_to note.attachment.url, target: '_blank' do
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
.attachment .attachment
= link_to note.attachment.url, target: "_blank" do = link_to note.attachment.url, target: '_blank' do
%i.fa.fa-paperclip = icon('paperclip')
= note.attachment_identifier = note.attachment_identifier
= link_to delete_attachment_namespace_project_note_path(@project.namespace, @project, note), = link_to delete_attachment_namespace_project_note_path(@project.namespace, @project, note),
title: "Delete this attachment", method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: "danger js-note-attachment-delete" do title: 'Delete this attachment', method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: 'danger js-note-attachment-delete' do
%i.fa.fa-trash-o.cred = icon('trash-o', class: 'cred')
.clear .clear
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment