1111 <th >{{ trans (' cruds.document.fields.name' ) } } </th >
1212 <th >{{ trans (' cruds.document.fields.size' ) } } </th >
1313 <th >{{ trans (' cruds.document.fields.hash' ) } } </th >
14+ <th >{{ trans (' cruds.document.fields.links' ) } } </th >
15+ <th >{{ trans (' cruds.document.fields.status' ) } } </th >
1416 </tr >
1517 </thead >
1618
1719 @foreach ($documents as $doc )
1820 <tr >
19- <td >
20- {{ $doc -> id } }
21- </td >
21+ <td >{{ $doc -> id } } </td >
2222 <td class =" text-center" >
2323 <a href =" /bob/show/{{ $doc -> control_id } }" >{{ $doc -> control_id } } </a >
2424 </td >
2525 <td >
26- <a href =" /doc/show/{{ $doc -> id } }" >{{ substr ($doc -> filename ,0 , 32 ) } } </a >
26+ <a href =" /doc/show/{{ $doc -> id } }" >{{ substr ($doc -> filename , 0 , 32 ) } } </a >
2727 </td >
28- <td >
29- {{ \Illuminate \Support \Number:: fileSize ($doc -> size ) } }
30- </td >
31- <td >
32- {{ $doc -> hash } }
33- <br >
28+ <td >{{ \Illuminate \Support \Number:: fileSize ($doc -> size ) } } </td >
29+ <td ><small >{{ $doc -> hash } } </small ></td >
30+ <td class =" text-center" >
31+ @if ($doc -> file_exists )
32+ @if ($doc -> link_count > 1 )
33+ <span class =" badge bg-blue" >{{ $doc -> link_count } } </span >
34+ @else
35+ {{ $doc -> link_count } }
36+ @endif
37+ @else
38+ -
39+ @endif
3440 </td >
3541 <td >
3642 <b >
37- @if (file_exists ( storage_path ( ' docs/ ' ) . $doc -> id ) )
38- @if ($doc -> hash == hash_file ( " sha256 " , storage_path ( ' docs/ ' ) . $doc -> id ) )
39- <font color = " green" >OK</font >
43+ @if ($doc -> file_exists )
44+ @if ($doc -> hash_valid )
45+ <span style = " color : green ; " >OK</span >
4046 @else
41- <font color = " red" >HASH FAILS</font >
47+ <span style = " color : red " >HASH FAILS</span >
4248 @endif
4349 @else
44- < font color = " red" >MISSING</font >
50+ < span style = " color : red " >MISSING</span >
4551 @endif
4652 </b >
4753 </td >
5056</table >
5157</div >
5258
53- @endsection
59+ @endsection
0 commit comments