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 | 88 | - if app.problems.any? |
89 | 89 | %h3.clear=t('.errors') |
90 | 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 | 92 | %br |
94 | 93 | %section |
95 | 94 | .problem_table{:id => 'problem_table'} | ... | ... |
app/views/problems/index.html.haml
... | ... | @@ -9,8 +9,7 @@ |
9 | 9 | = link_to 'show resolved', problems_path(:all_errs => true), :class => 'button' |
10 | 10 | |
11 | 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 | 13 | %br |
15 | 14 | %section |
16 | 15 | #problem_table.problem_table | ... | ... |
config/locales/en.yml
... | ... | @@ -77,6 +77,8 @@ en: |
77 | 77 | merge: "Merge select issues? They can be unmerged later." |
78 | 78 | unmerge: "Unmerge selected issues? They can be re-merged later." |
79 | 79 | unresolve: "Unresolve selected issues? They can be resolved again later." |
80 | + search: | |
81 | + search_placeholder: 'Search for issues' | |
80 | 82 | |
81 | 83 | comments: |
82 | 84 | confirm_delete: "Permanently delete this comment?" |
... | ... | @@ -118,7 +120,6 @@ en: |
118 | 120 | no_watcher: "Sadly, no one is watching this app" |
119 | 121 | repository: Repository |
120 | 122 | revision: Revision |
121 | - search_placeholder: 'Search for issues' | |
122 | 123 | show_hide: "(show/hide)" |
123 | 124 | unresolved_errs: unresolved errs |
124 | 125 | unwatch: unwatch | ... | ... |