Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Commit 293c905

Browse files
committed
Move device details column before repair comments column
More sensible flow of information.
1 parent 076e753 commit 293c905

4 files changed

Lines changed: 61 additions & 55 deletions

File tree

app/view/party/manage.php

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@
177177
<thead>
178178
<tr>
179179
<th>#</th>
180-
<th><?php _t("Category");?>
180+
<th><?php _t("Device Category");?>
181181
<i class="fa fa-question-circle" data-toggle="popover" title="Device Category" data-html="true" data-content="<p>This is the category that the device best fits into. You can find more information on the different categories <a href='https://therestartproject.org/welcome-to-our-community-space/#What_if_a_device_does_not_fit_in_any_of_the_categories'>here</a>.</p><p>If a device does not fit in any of the categories, you have the option of choosing 'None of the above' at the end of the drop-down menu. You will then be encouraged to estimate the weight of the device. Please use this option only as a last resort.</p>"></i>
182182
</th>
183+
<th><?php _t("Device Details");?> <i class="fa fa-question-circle" data-toggle="popover" data-html="true" title="Information about the device" data-content="<p>Please provide as much information as is known about the device.</p><p><strong>Brand</strong>. This is the company that makes the device. Examples: Apple; Dyson; Sony.</p><p><strong>Model</strong>. This is the specific model of the device. Examples: iPhone 5s; DC50; Xperia Z1 Compact.</p><p><strong>Age</strong>. This is the age of the device in years, since the year of manufacture."></i></th>
183184
<th><?php _t("Repair Comments");?> <i class="fa fa-question-circle" data-toggle="popover" title="Information about the repair attempt" data-html="true" data-content="<p>Please try and provide as much information as you can on the fault and on the solution or advice given (if any). Information such as: what the fault was; what was the cause of the fault; what the solution was or could be. Any further information that you think might be useful can be provided here as well.</p><p>For example: <br/><em>Cracked screen. The phone had been dropped. Recommended purchasing replacement screen and attending next party.</em></p><p>or</p><p><em>Would not turn on. Fuse had blown. Replaced fuse.</em></p>"></i></th>
184185
<?php if (featureIsEnabled(FEATURE__DEVICE_PHOTOS)): ?>
185186
<th style="width: 280px !important;"><?php _t("Image");?> <i class="fa fa-question-circle" data-toggle="popover" title="{REPLACE TITLE}" data-content="{REPLACE CONTENT}"></i></th>
186187
<?php endif ?>
187-
<th><?php _t("Device Details");?> <i class="fa fa-question-circle" data-toggle="popover" data-html="true" title="Information about the device" data-content="<p>Please provide as much information as is known about the device.</p><p><strong>Brand</strong>. This is the company that makes the device. Examples: Apple; Dyson; Sony.</p><p><strong>Model</strong>. This is the specific model of the device. Examples: iPhone 5s; DC50; Xperia Z1 Compact.</p><p><strong>Age</strong>. This is the age of the device in years, since the year of manufacture."></i></th>
188188
<th><?php _t("Repair Status");?> <i class="fa fa-question-circle" data-toggle="popover" title="The outcome of the repair attempt" data-html="true" data-content="<p><strong>Fixed</strong>. Have we prevented the purchase of another device? Will this device still be used?</p><p><strong>Repairable</strong>. If an owner of an unrepaired device will try to fix it at home, come back to another Restart Party, or get help from a friend or a professional.</p><p><strong>End of lifecyle</strong>. When a participant tells you they have given up, and are going to recycle a device.</p><p>See <a href='https://therestartproject.org/welcome-to-our-community-space/#Enteringdata'>here</a> for more detailed information.</p>"></i></th>
189189
<th> <i class="fa fa-question-circle" data-toggle="popover" title="Spare parts required?" data-content="Whether a spare part (or parts) would be needed to complete the repair successfully. Ticking this box does not necessarily indicate that the needed part(s) were available at the party, only that there is a need for an additional part(s). Please be sure to indicate in the comments field what part is needed (if known) and whether it is available at the party."></i> <?php _t("Spare Parts?");?></th>
190190
<th></th>
@@ -225,6 +225,23 @@
225225
<input type="text" name="device[<?php echo $i; ?>][estimate]" id="device[<?php echo $i; ?>][estimate]" class="form-control" placeholder="<?php _t("Estimate...");?>" value="<?php echo $devices[$i-1]->estimate; ?>">
226226
</div>
227227
</td>
228+
229+
<td>
230+
<div class="form-group">
231+
<input type="text" name="device[<?php echo $i; ?>][brand]" id="device[<?php echo $i; ?>][brand]" class="form-control" placeholder="<?php _t("Brand - e.g. Apple, Dyson");?>" value="<?php echo $devices[$i-1]->brand; ?>">
232+
</div>
233+
234+
<div class="form-group">
235+
<input type="text" name="device[<?php echo $i; ?>][model]" id="device[<?php echo $i; ?>][model]" class="form-control" placeholder="<?php _t("Model - e.g. iPhone 5s, DC50");?>" value="<?php echo $devices[$i-1]->model; ?>">
236+
</div>
237+
238+
<div class="form-group">
239+
<?php $ageInputType = (featureIsEnabled(FEATURE__DEVICE_AGE)) ? "text" : "hidden"; ?>
240+
<input type="<?php echo $ageInputType; ?>" name="device[<?php echo $i; ?>][age]" id="device[<?php echo $i; ?>][age]" class="form-control" placeholder="<?php _t("Age - e.g. 3 years");?>" value="<?php echo $devices[$i-1]->age; ?>">
241+
</div>
242+
243+
</td>
244+
228245
<td>
229246
<textarea rows="6" class="form-control" id="device[<?php echo $i; ?>][problem]" name="device[<?php echo $i; ?>][problem]"><?php echo $devices[$i-1]->problem; ?></textarea>
230247
</td>
@@ -257,21 +274,6 @@
257274
</td>
258275
<?php endif ?>
259276

260-
<td>
261-
<div class="form-group">
262-
<input type="text" name="device[<?php echo $i; ?>][brand]" id="device[<?php echo $i; ?>][brand]" class="form-control" placeholder="<?php _t("Brand - e.g. Apple, Dyson");?>" value="<?php echo $devices[$i-1]->brand; ?>">
263-
</div>
264-
265-
<div class="form-group">
266-
<input type="text" name="device[<?php echo $i; ?>][model]" id="device[<?php echo $i; ?>][model]" class="form-control" placeholder="<?php _t("Model - e.g. iPhone 5s, DC50");?>" value="<?php echo $devices[$i-1]->model; ?>">
267-
</div>
268-
269-
<div class="form-group">
270-
<?php $ageInputType = (featureIsEnabled(FEATURE__DEVICE_AGE)) ? "text" : "hidden"; ?>
271-
<input type="<?php echo $ageInputType; ?>" name="device[<?php echo $i; ?>][age]" id="device[<?php echo $i; ?>][age]" class="form-control" placeholder="<?php _t("Age - e.g. 3 years");?>" value="<?php echo $devices[$i-1]->age; ?>">
272-
</div>
273-
274-
</td>
275277
<td>
276278
<div class="form-group">
277279
<div class="radio">
@@ -376,17 +378,6 @@ class="repairable"
376378
<input type="text" name="device[<?php echo $i; ?>][estimate]" id="device[<?php echo $i; ?>][estimate]" class="form-control" placeholder="<?php _t("Estimate...");?>">
377379
</div>
378380
</td>
379-
<td>
380-
<textarea rows="6" class="form-control" id="device[<?php echo $i; ?>][problem]" name="device[<?php echo $i; ?>][problem]"></textarea>
381-
</td>
382-
383-
<?php if (featureIsEnabled(FEATURE__DEVICE_PHOTOS)): ?>
384-
<td>
385-
<div class="form-group">
386-
<input type="file" class="form-control file" name="device[<?php echo $i; ?>][image]" data-show-upload="false" data-show-caption="true">
387-
</div>
388-
</td>
389-
<?php endif ?>
390381

391382
<td>
392383
<div class="form-group">
@@ -401,6 +392,19 @@ class="repairable"
401392
<input type="hidden" name="device[<?php echo $i; ?>][age]" id="device[<?php echo $i; ?>][age]" class="form-control" placeholder="<?php _t("Age - e.g. 3 years");?>" >
402393
</div>
403394
</td>
395+
396+
<td>
397+
<textarea rows="6" class="form-control" id="device[<?php echo $i; ?>][problem]" name="device[<?php echo $i; ?>][problem]"></textarea>
398+
</td>
399+
400+
<?php if (featureIsEnabled(FEATURE__DEVICE_PHOTOS)): ?>
401+
<td>
402+
<div class="form-group">
403+
<input type="file" class="form-control file" name="device[<?php echo $i; ?>][image]" data-show-upload="false" data-show-caption="true">
404+
</div>
405+
</td>
406+
<?php endif ?>
407+
404408
<td>
405409
<div class="form-group">
406410
<div class="radio">

public/dist/js/fixometer.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ $('.device-image-delete').click(function(e){
8585
'<input type="text" name="device[' + n +'][estimate]" id="device[' + n +'][estimate]" class="form-control" placeholder="Estimate...">' +
8686
'</div>' +
8787
'</td>' +
88+
'<td>' +
89+
'<div class="form-group">' +
90+
'<input type="text" name="device[' + n +'][brand]" id="device[' + n +'][brand]" class="form-control" placeholder="Brand - e.g. Apple, Dyson">' +
91+
'</div>' +
92+
93+
'<div class="form-group">' +
94+
'<input type="text" name="device[' + n +'][model]" id="device[' + n +'][model]" class="form-control" placeholder="Model - e.g. iPhone 5s, DC50">' +
95+
'</div>' +
96+
'<div class="form-group">' +
97+
'<input type="' + ageInputClass + '" name="device[' + n +'][age]" id="device[' + n +'][age]" class="form-control" placeholder="Age - e.g. 3 years">' +
98+
'</div>' +
99+
'</td>' +
100+
88101
'<td>' +
89102
'<textarea rows="6" class="form-control" placeholder="Information about the repair. Where possible, try to provide: fault; cause of fault; and solution/advice given" id="device[' + n +'][problem]" name="device[' + n +'][problem]"></textarea>' +
90103
'</td>';
@@ -97,19 +110,7 @@ $('.device-image-delete').click(function(e){
97110
'</div>' +
98111
'</td>';
99112
}
100-
tablerow += '<td>' +
101-
'<div class="form-group">' +
102-
'<input type="text" name="device[' + n +'][brand]" id="device[' + n +'][brand]" class="form-control" placeholder="Brand - e.g. Apple, Dyson">' +
103-
'</div>' +
104-
105-
'<div class="form-group">' +
106-
'<input type="text" name="device[' + n +'][model]" id="device[' + n +'][model]" class="form-control" placeholder="Model - e.g. iPhone 5s, DC50">' +
107-
'</div>' +
108-
'<div class="form-group">' +
109-
'<input type="' + ageInputClass + '" name="device[' + n +'][age]" id="device[' + n +'][age]" class="form-control" placeholder="Age - e.g. 3 years">' +
110-
'</div>' +
111-
'</td>' +
112-
'<td>' +
113+
tablerow += '<td>' +
113114
'<div class="form-group">' +
114115
'<div class="radio">' +
115116
'<label>' +

0 commit comments

Comments
 (0)