Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
da10cad1
Commit
da10cad1
authored
Nov 29, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop rjs from Issues#index
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
596e64e5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
25 deletions
+29
-25
app/assets/javascripts/issues.js.coffee
app/assets/javascripts/issues.js.coffee
+11
-2
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+8
-0
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+8
-7
app/controllers/projects/notes_controller.rb
app/controllers/projects/notes_controller.rb
+1
-7
app/views/projects/issues/_head.html.haml
app/views/projects/issues/_head.html.haml
+1
-5
app/views/projects/issues/index.js.haml
app/views/projects/issues/index.js.haml
+0
-4
No files found.
app/assets/javascripts/issues.js.coffee
View file @
da10cad1
...
...
@@ -54,7 +54,16 @@
unless
terms
is
last_terms
last_terms
=
terms
if
terms
.
length
>=
2
or
terms
.
length
is
0
form
.
submit
()
$
.
ajax
type
:
"GET"
url
:
location
.
href
data
:
"issue_search="
+
terms
complete
:
->
$
(
".loading"
).
hide
()
success
:
(
data
)
->
$
(
'.issues-holder'
).
html
(
data
.
html
)
Issues
.
reload
()
dataType
:
"json"
checkChanged
:
->
checked_issues
=
$
(
".selected_issue:checked"
)
...
...
app/controllers/application_controller.rb
View file @
da10cad1
...
...
@@ -188,4 +188,12 @@ class ApplicationController < ActionController::Base
count:
count
}
end
def
view_to_html_string
(
partial
)
render_to_string
(
partial
,
layout:
false
,
formats:
[
:html
]
)
end
end
app/controllers/projects/issues_controller.rb
View file @
da10cad1
...
...
@@ -11,7 +11,7 @@ class Projects::IssuesController < Projects::ApplicationController
# Allow modify issue
before_filter
:authorize_modify_issue!
,
only:
[
:edit
,
:update
]
respond_to
:
js
,
:
html
respond_to
:html
def
index
terms
=
params
[
'issue_search'
]
...
...
@@ -28,9 +28,13 @@ class Projects::IssuesController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
# index.html.erb
format
.
js
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
json
do
render
json:
{
html:
view_to_html_string
(
"projects/issues/_issues"
)
}
end
end
end
...
...
@@ -48,10 +52,7 @@ class Projects::IssuesController < Projects::ApplicationController
@target_type
=
:issue
@target_id
=
@issue
.
id
respond_to
do
|
format
|
format
.
html
format
.
js
end
respond_with
(
@issue
)
end
def
create
...
...
app/controllers/projects/notes_controller.rb
View file @
da10cad1
...
...
@@ -17,14 +17,8 @@ class Projects::NotesController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
}
format
.
json
do
html
=
render_to_string
(
"projects/notes/_notes"
,
layout:
false
,
formats:
[
:html
]
)
render
json:
{
html:
html
,
html:
view_to_html_string
(
"projects/notes/_notes"
)
}
end
end
...
...
app/views/projects/issues/_head.html.haml
View file @
da10cad1
...
...
@@ -21,9 +21,5 @@
=
link_to
new_project_issue_path
(
@project
,
issue:
{
assignee_id:
params
[
:assignee_id
],
milestone_id:
params
[
:milestone_id
]}),
class:
"btn btn-new pull-right"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
%i
.icon-plus
New Issue
=
form_tag
project_issues_path
(
@project
),
method: :get
,
remote:
true
,
id:
"issue_search_form"
,
class:
'pull-right issue-search-form'
do
=
hidden_field_tag
:status
,
params
[
:status
],
id:
'search_status'
=
hidden_field_tag
:assignee_id
,
params
[
:assignee_id
],
id:
'search_assignee_id'
=
hidden_field_tag
:milestone_id
,
params
[
:milestone_id
],
id:
'search_milestone_id'
=
hidden_field_tag
:label_name
,
params
[
:label_name
],
id:
'search_label_name'
=
form_tag
project_issues_path
(
@project
),
method: :get
,
id:
"issue_search_form"
,
class:
'pull-right issue-search-form'
do
=
search_field_tag
:issue_search
,
nil
,
{
placeholder:
'Filter by title or description'
,
class:
'input-xpadding issue_search input-xlarge append-right-10 search-text-input'
}
app/views/projects/issues/index.js.haml
deleted
100644 → 0
View file @
596e64e5
:plain
$('.issues-holder').html("
#{
escape_javascript
(
render
(
'issues'
))
}
");
History.replaceState({path: "
#{
request
.
url
}
"}, document.title, "
#{
request
.
url
}
");
Issues.reload();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment