Skip to content

Commit

Permalink
Merge pull request #23 from sukhbir-singh/master
Browse files Browse the repository at this point in the history
Fixed indentation bug
  • Loading branch information
cpg authored Jun 29, 2019
2 parents 5a253ba + 1bc0ac0 commit 1cf3f6d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 80 deletions.
95 changes: 47 additions & 48 deletions app/views/disk_wizard/done.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ css:
tbody
- count = 0
- @operations.each do |operation|
- count += 1
- count += 1
- if operation[:name].eql? 'exception'
tr
td style=("vertical-align: middle;color: red;")
Expand All @@ -80,52 +80,51 @@ css:
- operation[:parameters].try(:each_line) do |line|
= line
br/
- else
- @user_selections["format"]
.col-md-6.col-md-offset-3
table.table
thead
tr
th
| Disk name
th
| New filesystem type
- if @user_selections["option"]
th
| Mount point
tbody
tr
td = @user_selections['path']
td = Partition.FilesystemType.key(@user_selections['fs_type'].to_i)
- if @user_selections['option']
td
| \/var/hda/disks/#{@user_selections['label']}
- else
- @user_selections["format"]
.col-md-6.col-md-offset-3
table.table
thead
tr
th
| Disk name
th
| New filesystem type
- if @user_selections["option"]
th
| Mount point
tbody
tr
td = @user_selections['path']
td = Partition.FilesystemType.key(@user_selections['fs_type'].to_i)
- if @user_selections['option']
td
| \/var/hda/disks/#{@user_selections['label']}

.col-md-12.well.well-sm
a.btn.btn-success href="/tab/disks/disk_wizards"
| Continue with another device
button#get_debug_info.btn.btn-warning onclick="getDebugURL();"
| Get Debug infomation

#fpaste_loading.col-md-8.col-md-offset-2
= image_tag "disk_wizard/progress.gif"
.col-md-12.well.well-sm
a.btn.btn-success href="/tab/disks/disk_wizards"
| Continue with another device
button#get_debug_info.btn.btn-warning onclick="getDebugURL();"
| Get Debug infomation

#fpaste_loading.col-md-8.col-md-offset-2
= image_tag "disk_wizard/progress.gif"
p.text-primary
span.glyphicon.glyphicon-time
| Please wait.Generating fpaste URL.......
#debug_info.col-md-10.col-md-offset-1 style=("display: none;")
.panel.panel-default
form.form-inline role="form"
.form-group.has-success.has-feedback
label.control-label for="fpaste_url"
| URL:
span.glyphicon.glyphicon-globe
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 500px;") title=("Press Ctrl+c to coppy URL to clipboard") type="text" /
span.glyphicon.glyphicon-ok.form-control-feedback
.panel-body.text-left
p.text-primary
| After generating your paste, copy the generated url above.
p.text-primary
span.glyphicon.glyphicon-time
| Please wait.Generating fpaste URL.......
#debug_info.col-md-10.col-md-offset-1 style=("display: none;")
.panel.panel-default
form.form-inline role="form"
.form-group.has-success.has-feedback
label.control-label for="fpaste_url"
| URL:
span.glyphicon.glyphicon-globe
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 500px;") title=("Press Ctrl+c to coppy URL to clipboard") type="text" /
span.glyphicon.glyphicon-ok.form-control-feedback
.panel-body.text-left
p.text-primary
| After generating your paste, copy the generated url above.
p.text-primary
| Head over to the Amahi IRC channel, and share your link with one of the helpful folks there.
p.text-info
| Good Luck! Thanks for choosing Amahi.

| Head over to the Amahi IRC channel, and share your link with one of the helpful folks there.
p.text-info
| Good Luck! Thanks for choosing Amahi.
12 changes: 6 additions & 6 deletions app/views/disk_wizard/select_device.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ javascript:
span#progress_message
| Scanning devices....

#devices_data.row style=("display: none;")
#devices_data.row.mt-2.mb-2 style=("display: none;")
= form_tag(disk_wizards_engine.file_system_path, {method: "POST", id: "select_device"}) do
table.settings.table-bordered.table.table-hover
thead
tr.accordion-toggle data-target="#demo1" data-toggle="collapse" style=("cursor: pointer")
th.text-center Select
th.text-center Model
th.text-center Path
th.text-center Size
th.text-center.pl-1 Select
th.text-center.pl-1 Model
th.text-center.pl-1 Path
th.text-center.pl-1 Size
tbody#table_contents

.text-right
Expand All @@ -75,7 +75,7 @@ javascript:
- @mounted_disks.each do |disk|
.col-md-6
h5
= disk[:path]
= disk[:path] + " "
span.label.label-default
= number_to_human_size disk[:bytes_total]

Expand Down
60 changes: 34 additions & 26 deletions app/views/disk_wizard/select_fs.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -140,31 +140,39 @@ javascript:
#contextMenu
ul.dropdown-menu role="menu"
li
a href="#" tabindex="-1" New
a href="#" tabindex="-1"
| New
li
a href="#" tabindex="-1" Delete
a href="#" tabindex="-1"
| Delete
li.divider
li
a href="#" tabindex="-1"
| Resize/Move
li.divider
li
a href="#" tabindex="-1" Copy
a href="#" tabindex="-1"
| Copy
li
a href="#" tabindex="-1" Paste
a href="#" tabindex="-1"
| Paste
li.divider
li.dropdown-submenu
a href="#" tabindex="-1"
| Format to
ul.dropdown-menu
li
a href="#" tabindex="-1" NTFS
a href="#" tabindex="-1"
| NTFS
li
a href="#" tabindex="-1" Ext4
a href="#" tabindex="-1"
| Ext4
li
a href="#" tabindex="-1" Ext3
a href="#" tabindex="-1"
| Ext3
li
a href="#" tabindex="-1" Fat32
a href="#" tabindex="-1"
| Fat32

css:
.settings-table {
Expand All @@ -191,24 +199,24 @@ javascript:
| "TYPE"=>"part", "SIZE"=>"104857600", "PATH"=>"/dev/sda1", "MOUNTPOINT"=>nil, "FSTYPE"=>"devtmpfs"
- unless device.partitions.blank?
- for partition in device.partitions
tr data-target="#contextMenu" data-toggle="context" path="#{partition.path}" style=("position: relative;cursor: pointer;") class="#{!!(user_selections['path'] == partition.path rescue false) ? 'info context' : 'context'}"

td title=("Mount point")
= partition.mountpoint || "No mount point"
td title=("Disk name")
= partition.label
td
- if partition.fstype.nil?
span.glyphicon.glyphicon-warning-sign
| Unknown
- else
= partition.fstype
td title=("Total size")
= number_to_human_size partition.size
td
label
= check_box_tag(:format, 1, !!(user_selections['format'] && (user_selections['path'] == partition.path) rescue false), class: 'format')
- for partition in device.partitions
tr data-target="#contextMenu" data-toggle="context" path="#{partition.path}" style=("position: relative;cursor: pointer;") class="#{!!(user_selections['path'] == partition.path rescue false) ? 'info context' : 'context'}"

td title=("Mount point")
= partition.mountpoint || "No mount point"
td title=("Disk name")
= partition.label
td
- if partition.fstype.nil?
span.glyphicon.glyphicon-warning-sign
| Unknown
- else
= partition.fstype
td title=("Total size")
= number_to_human_size partition.size
td
label
= check_box_tag(:format, 1, !!(user_selections['format'] && (user_selections['path'] == partition.path) rescue false), class: 'format')

tr style=("position: relative;cursor: pointer;") path="#{device.path}" class="#{ !!(user_selections['format'] && (user_selections['partition'] == device.path) rescue false) ? 'danger' : 'warning' }"
td colspan="4"
Expand Down

0 comments on commit 1cf3f6d

Please sign in to comment.