|
| 1 | +<div class="container"> |
| 2 | + <%= link_to t('return_btn'), reports_path, class: 'btn btn-secondary' %> |
| 3 | +</div> |
1 | 4 | <div class="d-flex">
|
2 | 5 | <div class="container d-flex flex-column w-50">
|
3 | 6 | <div class="mt-3">
|
|
35 | 38 | <p class="card-text"><%= @report.message %></p>
|
36 | 39 |
|
37 | 40 | <p class="card-subtitle mb-2 text-muted">
|
38 |
| - <%= I18n.t('.reporting_profile') %>: <%= link_to @report.profile.full_name, profile_path(@report.profile) %> |
| 41 | + <%= t('.reporting_profile') %>: <%= link_to @report.profile.full_name, profile_path(@report.profile) %> |
39 | 42 | </p>
|
40 | 43 | <% if @report.pending? %>
|
41 | 44 | <div class="d-flex flex-row justify-content-center mt-5 gap-5">
|
42 |
| - <% unless @report.reportable.is_a? Profile %> |
43 |
| - <%= button_to t('.remove_content_btn'), remove_content_report_path(@report), class:'card-btn flex-column btn btn-danger btn-lg' %> |
| 45 | + <% if @report.reportable.is_a? Profile %> |
| 46 | + <%= button_to t('.remove_profile_btn'), remove_profile_report_path(@report), |
| 47 | + class:'card-btn flex-column btn btn-danger btn-lg', |
| 48 | + data: { turbo_confirm: t('.remove_profile_warning') } %> |
| 49 | + <% else %> |
| 50 | + <%= button_to t('.remove_content_btn'), remove_content_report_path(@report), |
| 51 | + class:'card-btn flex-column btn btn-danger btn-lg', |
| 52 | + data: { turbo_confirm: t('.remove_content_warning') } %> |
44 | 53 | <% end %>
|
45 | 54 | <%= button_to t('.reject_btn'), reject_report_path(@report), class:'card-btn flex-column btn btn-secondary btn-lg ml-2' %>
|
46 | 55 | </div>
|
47 | 56 | <% else %>
|
48 | 57 | <div class="d-flex flex-row justify-content-center mt-5">
|
49 | 58 | <h4 class= "card-subtitle mb-2 text-dark">
|
50 |
| - <%= I18n.t('reports.index.rejected') if @report.rejected? %> |
| 59 | + <%= t('reports.index.rejected') if @report.rejected? %> |
51 | 60 | </h4>
|
52 | 61 | <h4 class= "card-subtitle mb-2 text-danger">
|
53 |
| - <%= I18n.t('reports.index.granted') if @report.granted? %> |
| 62 | + <% if @report.granted? %> |
| 63 | + <%= t('.profile_removed') if @report.reportable.is_a? Profile %> |
| 64 | + <%= t('.content_removed') unless @report.reportable.is_a? Profile %> |
| 65 | + <% end %> |
54 | 66 | </h4>
|
55 | 67 | </div>
|
56 | 68 | <% end %>
|
|
0 commit comments