diff options
| author | anicet | 2015-06-19 15:41:22 +0200 |
|---|---|---|
| committer | anicet | 2015-06-19 15:41:22 +0200 |
| commit | b7051fa387add838e3ff819cd24ed78591e64ef8 (patch) | |
| tree | 50e4ff3bae971545491e7ea09a5012dd1eefe5b3 /app | |
| parent | 6623ae62a071b99c9cb8e5a9454c791cf1bdbbd4 (diff) | |
| download | chouette-core-b7051fa387add838e3ff819cd24ed78591e64ef8.tar.bz2 | |
Compliance Check : fix errors diplay
Diffstat (limited to 'app')
| -rw-r--r-- | app/assets/stylesheets/main/compliance_checks.css.scss | 36 | ||||
| -rw-r--r-- | app/views/compliance_checks/_compliance_check_results.erb | 24 |
2 files changed, 28 insertions, 32 deletions
diff --git a/app/assets/stylesheets/main/compliance_checks.css.scss b/app/assets/stylesheets/main/compliance_checks.css.scss index 298df15e6..496ebeeae 100644 --- a/app/assets/stylesheets/main/compliance_checks.css.scss +++ b/app/assets/stylesheets/main/compliance_checks.css.scss @@ -69,13 +69,21 @@ } dl.inline dt { float: left; - width: 20%; - padding-top: 10px; + clear: left; + width: 35%; + padding-top: 5px; border-top: 1px solid #eee; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; } dl.inline dd { float: left; - width: 80%; + width: 65%; padding-top: 10px; border-top: 1px solid #eee; } @@ -154,24 +162,8 @@ background-color: #ff9a0c; } - .td_error { - width: 30%; - - .title_error i { margin-right: 5px; } - - div.details_error{ - margin: 0px 0px 0px 3px !important; - display: none; - - p.detail_error{ - margin: 0px 0px 5px 0px !important; - } - - .file_error{ - margin-left: 26px; - font-size: 10px; - color: #898e7f; - } - } + .file_error{ + font-size: 14px; + color: #898e7f; } } diff --git a/app/views/compliance_checks/_compliance_check_results.erb b/app/views/compliance_checks/_compliance_check_results.erb index f7c85019c..78c29aaff 100644 --- a/app/views/compliance_checks/_compliance_check_results.erb +++ b/app/views/compliance_checks/_compliance_check_results.erb @@ -51,9 +51,10 @@ <%= ("#{test.error_count || 0} #{ComplianceCheckResult.human_attribute_name(:violation_count)}") if test.errors.present? %> </td> <td> - <dl class="inline"> - <p><b><%=t("activemodel.attributes.compliance_check_result.#{test.test_id}")%></b></p> + <p><b><%=t("activemodel.attributes.compliance_check_result.#{test.test_id}")%></b></p> + <% if test.errors.present? %> <% test.errors.first(10).each do |error| %> + <dl class="inline"> <dt> <% if error["source"].present? %> <% if error[:source].object_path.present? %> @@ -64,18 +65,21 @@ <% end %> <% end %> <% if error[:source].file.present? %> - <%= "#{error[:source].objectid}" if error[:source].objectid.present? %> - <p class="file_error"> - <%= error[:source].file.filename %> - <%= ", li: #{error[:source].file.line_number}" if error[:source].file.line_number.present? %> - <%= ", co: #{error[:source].file.column_number}" if error[:source].file.column_number.present? %> - </p> + <%= error[:source].objectid if error[:source].objectid.present? %> <% end %> <% end %> </dt> <dd><%=t("compliance_check_result.details.detail_#{error[:error_id]}", object_labels_hash(error))%></dd> - <% end if test.errors.present? %> - </dl> + </dl> + <% if error[:source].file.present? %> + <p class="file_error"> + <%= error[:source].file.filename %> + <%= ", li: #{error[:source].file.line_number}" if error[:source].file.line_number.present? %> + <%= ", co: #{error[:source].file.column_number}" if error[:source].file.column_number.present? %> + </p> + <% end %> + <% end %> + <% end %> </td> <td> <button data-content='<%=t("activemodel.attributes.compliance_check_result.#{test.test_id}")%>' |
