mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
code changes after rebasing
This commit is contained in:
parent
da98788031
commit
acdea2198d
4 changed files with 13 additions and 15 deletions
|
@ -3,10 +3,8 @@ class RepositoriesController < ApplicationController
|
|||
before_action :check_view_all_permissions, only: :index
|
||||
before_action :check_edit_and_destroy_permissions, only:
|
||||
%(destroy destroy_modal rename_modal update)
|
||||
before_action :check_create_permissions, only: [
|
||||
:create_new_modal,
|
||||
:create
|
||||
]
|
||||
before_action :check_create_permissions, only:
|
||||
%(create_new_modal create)
|
||||
|
||||
def index
|
||||
render('repositories/index')
|
||||
|
@ -34,9 +32,9 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
if @repository.save
|
||||
flash[:success] = t("repositories.create.success_flash", name: @repository.name)
|
||||
flash[:success] = t("repositories.index.modal_create.success_flash", name: @repository.name)
|
||||
format.json {
|
||||
render json: { url: team_repositories_path(@team, create_action: true) },
|
||||
render json: { url: team_repositories_path(repository: @repository) },
|
||||
status: :ok
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="create-new-modal-label">
|
||||
<%= t("repositories.create.title") %>
|
||||
<%= t("repositories.index.modal_create.title") %>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-action="submit"><%= t("repositories.create.submit") %></button>
|
||||
<button type="button" class="btn btn-primary" data-action="submit"><%= t("repositories.index.modal_create.submit") %></button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("general.cancel") %></button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<%= bootstrap_form_for [@team, @new_repository], remote: :true do |f| %>
|
||||
<%= f.text_field :name, label: t("repositories.create.name_label"), placeholder: t("repositories.create.name_placeholder") %>
|
||||
<%= f.text_field :name, label: t("repositories.index.modal_create.name_label"), placeholder: t("repositories.index.modal_create.name_placeholder") %>
|
||||
<% end %>
|
||||
|
|
|
@ -177,12 +177,12 @@ en:
|
|||
name: "New repository name"
|
||||
name_placeholder: "My repository"
|
||||
rename: "Rename repository"
|
||||
create:
|
||||
title: "Create new repository"
|
||||
name_label: "Repository name"
|
||||
name_placeholder: "My repository"
|
||||
submit: "Create repository"
|
||||
success_flash: "Repository <strong>%{name}</strong> successfully created."
|
||||
modal_create:
|
||||
title: "Create new repository"
|
||||
name_label: "Repository name"
|
||||
name_placeholder: "My repository"
|
||||
submit: "Create repository"
|
||||
success_flash: "Repository <strong>%{name}</strong> successfully created."
|
||||
|
||||
comments:
|
||||
options_dropdown:
|
||||
|
|
Loading…
Reference in a new issue