Commit 9c94b7db425455daf3f547480ceae979d4feb2ba
1 parent
3a505372
Exists in
master
and in
1 other branch
Render partial for problem search
Removing duplication by rendering problems/search partial.
Showing
4 changed files
with
6 additions
and
5 deletions
Show diff stats
app/views/apps/show.html.haml
@@ -88,8 +88,7 @@ | @@ -88,8 +88,7 @@ | ||
88 | - if app.problems.any? | 88 | - if app.problems.any? |
89 | %h3.clear=t('.errors') | 89 | %h3.clear=t('.errors') |
90 | %section | 90 | %section |
91 | - = form_tag search_problems_path(:all_errs => all_errs, :app_id => app.id), :method => :get, :remote => true do | ||
92 | - = text_field_tag :search, params[:search], :placeholder => t('.search_placeholder') | 91 | + = render 'problems/search', :all_errs => @all_errs, :app_id => app.id |
93 | %br | 92 | %br |
94 | %section | 93 | %section |
95 | .problem_table{:id => 'problem_table'} | 94 | .problem_table{:id => 'problem_table'} |
app/views/problems/index.html.haml
@@ -9,8 +9,7 @@ | @@ -9,8 +9,7 @@ | ||
9 | = link_to 'show resolved', problems_path(:all_errs => true), :class => 'button' | 9 | = link_to 'show resolved', problems_path(:all_errs => true), :class => 'button' |
10 | 10 | ||
11 | %section | 11 | %section |
12 | - = form_tag search_problems_path(:all_errs => @all_errs), :method => :get, :remote => true do | ||
13 | - = text_field_tag :search, params[:search], :placeholder => 'Search for issues' | 12 | + = render 'problems/search', :all_errs => @all_errs, :app_id => nil |
14 | %br | 13 | %br |
15 | %section | 14 | %section |
16 | #problem_table.problem_table | 15 | #problem_table.problem_table |
config/locales/en.yml
@@ -77,6 +77,8 @@ en: | @@ -77,6 +77,8 @@ en: | ||
77 | merge: "Merge select issues? They can be unmerged later." | 77 | merge: "Merge select issues? They can be unmerged later." |
78 | unmerge: "Unmerge selected issues? They can be re-merged later." | 78 | unmerge: "Unmerge selected issues? They can be re-merged later." |
79 | unresolve: "Unresolve selected issues? They can be resolved again later." | 79 | unresolve: "Unresolve selected issues? They can be resolved again later." |
80 | + search: | ||
81 | + search_placeholder: 'Search for issues' | ||
80 | 82 | ||
81 | comments: | 83 | comments: |
82 | confirm_delete: "Permanently delete this comment?" | 84 | confirm_delete: "Permanently delete this comment?" |
@@ -118,7 +120,6 @@ en: | @@ -118,7 +120,6 @@ en: | ||
118 | no_watcher: "Sadly, no one is watching this app" | 120 | no_watcher: "Sadly, no one is watching this app" |
119 | repository: Repository | 121 | repository: Repository |
120 | revision: Revision | 122 | revision: Revision |
121 | - search_placeholder: 'Search for issues' | ||
122 | show_hide: "(show/hide)" | 123 | show_hide: "(show/hide)" |
123 | unresolved_errs: unresolved errs | 124 | unresolved_errs: unresolved errs |
124 | unwatch: unwatch | 125 | unwatch: unwatch |