From 5d4531db2555d3051fc47e9268728a670ece95f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20=22BKC=22=20Carlb=C3=A4cker?= Date: Mon, 17 Oct 2016 17:58:57 +0200 Subject: Gogs Importer --- app/views/projects/new.html.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/views/projects') diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 0788924d44a..5edb9b69ed2 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -48,6 +48,11 @@ - if github_import_enabled? = link_to new_import_github_path, class: 'btn import_github' do = icon('github', text: 'GitHub') + %div + - if gogs_import_enabled? + = link_to new_import_gogs_url, class: 'btn import_gogs' do + = image_tag(image_path('gogs-logo.svg'), alt: 'Gogs', size: "14x14") + Gogs %div - if bitbucket_import_enabled? = link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}", "data-no-turbolink" => "true" do -- cgit v1.2.1 From 103114e3d73819f76bed9d8ad1bbdb8964875579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 15 Dec 2016 17:31:14 +0100 Subject: Rename Gogs to Gitea, DRY the controller and improve views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/views/projects/new.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/projects') diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 5edb9b69ed2..866b278ce57 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -48,11 +48,6 @@ - if github_import_enabled? = link_to new_import_github_path, class: 'btn import_github' do = icon('github', text: 'GitHub') - %div - - if gogs_import_enabled? - = link_to new_import_gogs_url, class: 'btn import_gogs' do - = image_tag(image_path('gogs-logo.svg'), alt: 'Gogs', size: "14x14") - Gogs %div - if bitbucket_import_enabled? = link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}", "data-no-turbolink" => "true" do @@ -73,6 +68,11 @@ - if fogbugz_import_enabled? = link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do = icon('bug', text: 'Fogbugz') + %div + - if gitea_import_enabled? + = link_to new_import_gitea_url, class: 'btn import_gitea' do + = custom_icon('go_logo') + Gitea %div - if git_import_enabled? = link_to "#", class: 'btn js-toggle-button import_git' do -- cgit v1.2.1 From dcddd0f374f9daa321bb8bfa354dc7032d02f5a0 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Wed, 14 Dec 2016 15:42:39 +0300 Subject: Remove unnecessary hidden svg elements for icons. --- app/views/projects/environments/index.html.haml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/views/projects') diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index a65a630f2d0..6aae035b3e0 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -4,10 +4,6 @@ - content_for :page_specific_javascripts do = page_specific_javascript_tag("environments/environments_bundle.js") -.commit-icon-svg.hidden - = custom_icon("icon_commit") -.play-icon-svg.hidden - = custom_icon("icon_play") #environments-list-view{ data: { environments_data: environments_list_data, "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, -- cgit v1.2.1 From 3db5b7033b13c21b904a21f751bc0f19156ea155 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Thu, 15 Dec 2016 00:59:04 +0000 Subject: Add terminal UI and controller actions --- .../environments/_terminal_button.html.haml | 3 +++ app/views/projects/environments/index.html.haml | 1 + app/views/projects/environments/show.html.haml | 1 + app/views/projects/environments/terminal.html.haml | 22 ++++++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 app/views/projects/environments/_terminal_button.html.haml create mode 100644 app/views/projects/environments/terminal.html.haml (limited to 'app/views/projects') diff --git a/app/views/projects/environments/_terminal_button.html.haml b/app/views/projects/environments/_terminal_button.html.haml new file mode 100644 index 00000000000..97de9c95de7 --- /dev/null +++ b/app/views/projects/environments/_terminal_button.html.haml @@ -0,0 +1,3 @@ +- if environment.has_terminals? && can?(current_user, :admin_environment, @project) + = link_to terminal_namespace_project_environment_path(@project.namespace, @project, environment), class: 'btn terminal-button' do + = icon('terminal') diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 6aae035b3e0..0c6f696f5b9 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -15,4 +15,5 @@ "help-page-path" => help_page_path("ci/environments"), "css-class" => container_class, "commit-icon-svg" => custom_icon("icon_commit"), + "terminal-icon-svg" => custom_icon("icon_terminal"), "play-icon-svg" => custom_icon("icon_play")}} diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index bcac73d3698..6e0d9456900 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -8,6 +8,7 @@ %h3.page-title= @environment.name.capitalize .col-md-3 .nav-controls + = render 'projects/environments/terminal_button', environment: @environment = render 'projects/environments/external_url', environment: @environment - if can?(current_user, :update_environment, @environment) = link_to 'Edit', edit_namespace_project_environment_path(@project.namespace, @project, @environment), class: 'btn' diff --git a/app/views/projects/environments/terminal.html.haml b/app/views/projects/environments/terminal.html.haml new file mode 100644 index 00000000000..a6726e509e0 --- /dev/null +++ b/app/views/projects/environments/terminal.html.haml @@ -0,0 +1,22 @@ +- @no_container = true +- page_title "Terminal for environment", @environment.name += render "projects/pipelines/head" + +- content_for :page_specific_javascripts do + = stylesheet_link_tag "xterm/xterm" + = page_specific_javascript_tag("terminal/terminal_bundle.js") + +%div{class: container_class} + .top-area + .row + .col-sm-6 + %h3.page-title + Terminal for environment + = @environment.name + + .col-sm-6 + .nav-controls + = render 'projects/deployments/actions', deployment: @environment.last_deployment + +.terminal-container{class: container_class} + #terminal{data:{project_path: "#{terminal_namespace_project_environment_path(@project.namespace, @project, @environment)}.ws"}} -- cgit v1.2.1