Changed colors for buttons. Imporved preview area. Added clone panel to empty project
This commit is contained in:
parent
5b88c1e34c
commit
cd3d50caf2
9 changed files with 113 additions and 69 deletions
|
@ -20,7 +20,7 @@
|
|||
= "..."
|
||||
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
|
||||
.actions
|
||||
= submit_tag "Compare", class: "btn btn-primary"
|
||||
= submit_tag "Compare", class: "btn primary"
|
||||
|
||||
|
||||
- unless @commits.empty?
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
= f.hidden_field :noteable_id
|
||||
= f.hidden_field :noteable_type
|
||||
= f.text_area :note, size: 255
|
||||
#preview-note.well.hide
|
||||
#preview-note.preview_note.hide
|
||||
.hint
|
||||
.right Comments are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||
.clearfix
|
||||
|
||||
.row.note_advanced_opts.hide
|
||||
.span3
|
||||
= f.submit 'Add Comment', class: "btn primary submit_note grouped", id: "submit_note"
|
||||
= f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note"
|
||||
= link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link'
|
||||
.span4.notify_opts
|
||||
%h6.left Notify via email:
|
||||
|
@ -30,7 +30,7 @@
|
|||
.span5.attachments
|
||||
%h6.left Attachment:
|
||||
%span.file_name File name...
|
||||
|
||||
|
||||
.input.input_file
|
||||
%a.file_upload.btn.small Upload File
|
||||
= f.file_field :attachment, class: "input-file"
|
||||
|
|
21
app/views/projects/_clone_panel.html.haml
Normal file
21
app/views/projects/_clone_panel.html.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
.project_clone_panel
|
||||
.row
|
||||
.span7
|
||||
.form-horizontal
|
||||
.input-prepend.project_clone_holder
|
||||
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
|
||||
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
|
||||
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
|
||||
.span4.right
|
||||
.right
|
||||
- if can? current_user, :download_code, @project
|
||||
= link_to archive_project_repository_path(@project), class: "btn small grouped" do
|
||||
%i.icon-download-alt
|
||||
Download
|
||||
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
|
||||
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
|
||||
Merge Request
|
||||
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
|
||||
= link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
|
||||
Issue
|
||||
|
|
@ -1,4 +1,12 @@
|
|||
= render 'shared/no_ssh'
|
||||
.project_clone_panel
|
||||
.row
|
||||
.span7
|
||||
.form-horizontal
|
||||
.input-prepend.project_clone_holder
|
||||
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
|
||||
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
|
||||
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
|
||||
%div.git-empty
|
||||
%h4 Git global setup:
|
||||
%pre.dark
|
||||
|
@ -28,3 +36,16 @@
|
|||
- if can? current_user, :admin_project, @project
|
||||
.prepend-top-20
|
||||
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
var link_sel = ".project_clone_holder a";
|
||||
$(link_sel).bind("click", function() {
|
||||
$(link_sel).removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("#project_clone").val($(this).attr("data-clone"));
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -1,33 +1,12 @@
|
|||
= render "project_head"
|
||||
|
||||
.project_clone_panel
|
||||
.row
|
||||
.span7
|
||||
.form-horizontal
|
||||
.input-prepend.project_clone_holder
|
||||
= link_to "SSH", "#", class: "btn small active", :"data-clone" => @project.ssh_url_to_repo
|
||||
= link_to "HTTP", "#", class: "btn small", :"data-clone" => @project.http_url_to_repo
|
||||
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
|
||||
.span4.right
|
||||
.right
|
||||
- if can? current_user, :download_code, @project
|
||||
= link_to archive_project_repository_path(@project), class: "btn small grouped" do
|
||||
%i.icon-download-alt
|
||||
Download
|
||||
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
|
||||
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
|
||||
Merge Request
|
||||
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
|
||||
= link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
|
||||
Issue
|
||||
|
||||
= render 'clone_panel'
|
||||
= render "events/event_last_push", event: @last_push
|
||||
.content_list= render @events
|
||||
|
||||
:javascript
|
||||
:javascript
|
||||
$(function(){
|
||||
var link_sel = ".project_clone_holder a";
|
||||
$(link_sel).bind("click", function() {
|
||||
$(link_sel).bind("click", function() {
|
||||
$(link_sel).removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("#project_clone").val($(this).attr("data-clone"));
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%strong Looking for
|
||||
.input
|
||||
= text_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge", id: "dashboard_search"
|
||||
= submit_tag 'Search', class: "btn btn-primary"
|
||||
= submit_tag 'Search', class: "btn primary"
|
||||
- if params[:search].present?
|
||||
%br
|
||||
%h3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue