Completed
Pull Request — master (#1874)
by Rico
10:26
created
resources/views/media-list-page.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -123,49 +123,49 @@
 block discarded – undo
123 123
 
124 124
 							<p class="card-text">
125 125
 								<?php
126
-								// Show file details
127
-								$mediatype = $media_file->type();
128
-								if ($mediatype) {
129
-									echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
130
-								}
131
-								echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1);
132
-								echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1);
133
-								if ($media_file->isExternal()) {
134
-									echo GedcomTag::getLabelValue('URL', $media_file->filename());
135
-								} elseif ($media_file->fileExists()) {
136
-									?>
126
+                                // Show file details
127
+                                $mediatype = $media_file->type();
128
+                                if ($mediatype) {
129
+                                    echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
130
+                                }
131
+                                echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1);
132
+                                echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1);
133
+                                if ($media_file->isExternal()) {
134
+                                    echo GedcomTag::getLabelValue('URL', $media_file->filename());
135
+                                } elseif ($media_file->fileExists()) {
136
+                                    ?>
137 137
 								<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#details-<?= e($n) ?>" aria-expanded="false" aria-controls="details-<?= e($n) ?>">
138 138
 									<?= I18N::translate('Media file') ?>
139 139
 								</button>
140 140
 							<div class="collapse" id="details-<?= e($n) ?>">
141 141
 								<?php
142
-								if (Auth::isEditor($tree)) {
143
-									echo GedcomTag::getLabelValue('FILE', $media_file->filename());
144
-								}
145
-								echo GedcomTag::getLabelValue('FORM', $media_file->mimeType());
146
-								foreach ($media_file->attributes() as $tag => $value) {
147
-									echo GedcomTag::getLabelValue($tag, $value);
148
-								}
149
-								?>
142
+                                if (Auth::isEditor($tree)) {
143
+                                    echo GedcomTag::getLabelValue('FILE', $media_file->filename());
144
+                                }
145
+                                echo GedcomTag::getLabelValue('FORM', $media_file->mimeType());
146
+                                foreach ($media_file->attributes() as $tag => $value) {
147
+                                    echo GedcomTag::getLabelValue($tag, $value);
148
+                                }
149
+                                ?>
150 150
 							</div>
151 151
 						<?php
152
-								} else {
153
-									echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>';
154
-								}
155
-								?>
152
+                                } else {
153
+                                    echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>';
154
+                                }
155
+                                ?>
156 156
 							</p>
157 157
 						</div>
158 158
 						<div class="card-footer">
159 159
 							<?php
160
-							foreach ($media_object->linkedIndividuals('OBJE') as $individual) {
161
-								echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
162
-							}
163
-							foreach ($media_object->linkedFamilies('OBJE') as $family) {
164
-								echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
165
-							}
166
-							foreach ($media_object->linkedSources('OBJE') as $source) {
167
-								echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
168
-							} ?>
160
+                            foreach ($media_object->linkedIndividuals('OBJE') as $individual) {
161
+                                echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
162
+                            }
163
+                            foreach ($media_object->linkedFamilies('OBJE') as $family) {
164
+                                echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
165
+                            }
166
+                            foreach ($media_object->linkedSources('OBJE') as $source) {
167
+                                echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
168
+                            } ?>
169 169
 						</div>
170 170
 					</div>
171 171
 				</div>
Please login to merge, or discard this patch.