v1 finished
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
<div class="w-full flex flex-col items-center">
|
||||
<div class="text-4xl mb-10">
|
||||
Network Directory Admin
|
||||
</div>
|
||||
|
||||
<div class="w-1/2 flex flex-col space-y-10 ml-20 mt-10">
|
||||
<a href="/admin/local_network" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="flex flex-col space-y-10 mt-10">
|
||||
<a href="/admin/local_network" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Local Network
|
||||
</a>
|
||||
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Machines
|
||||
</a>
|
||||
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Service Types
|
||||
</a>
|
||||
|
||||
<a href="/admin/services" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<a href="/admin/services" class="inline-block w-50 px-3 py-1 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Services
|
||||
</a>
|
||||
|
||||
<a href="/" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back to Directory
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="text-4xl mb-10">
|
||||
Local Network Settings
|
||||
</div>
|
||||
<% unless @is_readonly %>
|
||||
<% unless @editing %>
|
||||
<div class="w-1/2 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex ml-10 space-x-2">
|
||||
@@ -14,35 +14,53 @@
|
||||
<input type="hidden" name="local_network[id]" value="<%= @local_network.id %>">
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class="h-8 border-2 border-[#8000FF] rounded-lg text-center" type="text" id="local_network_name" name="local_network[name]" value="<%= @local_network.name %>" <%= 'readonly' if @is_readonly %> >
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_name" name="local_network[name]" value="<%= @local_network.name %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Name</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class="h-8 border-2 border-[#8000FF] rounded-lg text-center" type="text" id="local_network_subnet" name="local_network[subnet]" value="<%= @local_network.subnet %>" <%= 'readonly' if @is_readonly %> >
|
||||
<div class="text-[#2FD400]">Subnet</div>
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_subnet" name="local_network[subnet]" value="<%= @local_network.subnet %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Subnet</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class="h-8 border-2 border-[#8000FF] rounded-lg text-center" type="text" id="local_network_tld" name="local_network[tld]" value="<%= @local_network.tld %>" <%= 'readonly' if @is_readonly %> >
|
||||
<div class="text-[#2FD400]">Top Level Domain</div>
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_tld" name="local_network[tld]" value="<%= @local_network.tld %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Top Level Domain</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.primary_dark_hex}] bg-white" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_primary_dark_hex" name="local_network[primary_dark_hex]" value="<%= @local_network.primary_dark_hex %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Primary Dark Hex</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.primary_light_hex}]" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_primary_light_hex" name="local_network[primary_light_hex]" value="<%= @local_network.primary_light_hex %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Primary Light Hex</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.accent_hex}]" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_accent_hex" name="local_network[accent_hex]" value="<%= @local_network.accent_hex %>" <%= 'readonly' if @editing %> >
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Accent Hex</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col space-y-2 mt-10">
|
||||
<% if @is_readonly %>
|
||||
<div class="w-1/2 flex justify-end space-x-5">
|
||||
<a href="/admin/local_network/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<% if @editing %>
|
||||
<div class="w-1/2 flex ml-10 space-x-5">
|
||||
<a href="/admin/local_network/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Edit Local Network
|
||||
</a>
|
||||
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back To Admin
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="w-1/2 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-1/2 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Local Network
|
||||
</button>
|
||||
<a href="/admin/local_network" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/local_network" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="text-4xl mb-10">
|
||||
Network Machines
|
||||
</div>
|
||||
<% unless @is_readonly %>
|
||||
<% unless @editing %>
|
||||
<div class="w-2/3 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col ml-10 space-y-2">
|
||||
@@ -16,49 +16,49 @@
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_name"
|
||||
name="machines[][name]"
|
||||
value="<%= mach.name %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Name</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_domain"
|
||||
name="machines[][domain]"
|
||||
value="<%= mach.domain %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Domain</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Domain</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_local_ip_octet"
|
||||
name="machines[][local_ip_octet]"
|
||||
value="<%= mach.local_ip_octet %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Local IP Octet</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Local IP Octet</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="mach_<%= index %>_tailscale_ip"
|
||||
name="machines[][tailscale_ip]"
|
||||
value="<%= mach.tailscale_ip %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @machines.length - 1 %>
|
||||
<div class="text-[#2FD400]">Tailscale IP</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Tailscale IP</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,65 +67,68 @@
|
||||
|
||||
|
||||
<div class="flex flex-col space-y-2 mt-10">
|
||||
<% if @is_readonly %>
|
||||
<div class="w-2/3 flex justify-end space-x-5">
|
||||
<a href="/admin/machines/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<% if @editing %>
|
||||
<div class="w-2/3 flex ml-10 space-x-5">
|
||||
<a href="/admin/machines/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Edit/Add Machines
|
||||
</a>
|
||||
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back To Admin
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="w-2/3 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<div class="flex space-x-2 mb-10 ml-10">
|
||||
<input type="hidden" name="machines[][id]" value="">
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_name"
|
||||
name="machines[][name]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_name" class="text-[#2FD400]">Name</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_name" class="text-[#<%= @accent_hex %>]">Name</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_domain"
|
||||
name="machines[][domain]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_domain" class="text-[#2FD400]">Domain</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_domain" class="text-[#<%= @accent_hex %>]">Domain</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_local_ip_octet"
|
||||
name="machines[][local_ip_octet]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_local_ip_octet" class="text-[#2FD400]">Local IP Octet</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_local_ip_octet" class="text-[#<%= @accent_hex %>]">Local IP Octet</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="mach_new_tailscale_ip"
|
||||
name="machines[][tailscale_ip]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="mach_new_tailscale_ip" class="text-[#2FD400]">Tailscale IP</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="mach_new_tailscale_ip" class="text-[#<%= @accent_hex %>]">Tailscale IP</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-2/3 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-2/3 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Machines
|
||||
</button>
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/machines" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="text-4xl mb-10">
|
||||
Service Types
|
||||
</div>
|
||||
<% unless @is_readonly %>
|
||||
<% unless @editing %>
|
||||
<div class="w-1/2 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col ml-10 space-y-2">
|
||||
@@ -16,72 +16,90 @@
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="servt_<%= index %>_name"
|
||||
name="service_types[][name]"
|
||||
value="<%= servt.name %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @service_types.length - 1 %>
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Name</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{servt.hex_color}]" : "text-[##{@accent_hex}]" %>'
|
||||
id="servt_<%= index %>_hex_color"
|
||||
name="service_types[][hex_color]"
|
||||
value="<%= servt.hex_color %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @service_types.length - 1 %>
|
||||
<div class="text-[#2FD400]">Hex Color</div>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Hex Color</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="h-8 w-40 border-2 border-[#<%= @light_hex %>] rounded-lg text-center">
|
||||
<%= servt.services.count %>
|
||||
</div>
|
||||
<% if index == @service_types.length - 1 %>
|
||||
<div class='<%= "text-[##{@accent_hex}]" if @editing %> text-center'>Services Count</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<a href="/admin/service_types/<%= servt.name.downcase %>" class="h-8 w-80 border-2 border-[#<%= @light_hex %>] rounded-lg text-center font-semibold text-[#<%= @accent_hex %>] hover:text-[#<%= @light_hex %>]">
|
||||
Update <%= servt.name %> Services Order
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex flex-col space-y-2 mt-10">
|
||||
<% if @is_readonly %>
|
||||
<div class="w-1/2 flex justify-end space-x-5">
|
||||
<a href="/admin/service_types/edit" class="inline-block w-60 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<% if @editing %>
|
||||
<div class="w-1/2 flex ml-10 space-x-5">
|
||||
<a href="/admin/service_types/edit" class="inline-block w-60 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Edit/Add Service Types
|
||||
</a>
|
||||
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back To Admin
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="w-1/2 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<div class="flex space-x-2 mb-10 ml-10">
|
||||
<input type="hidden" name="service_types[][id]" value="">
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="servt_new_name"
|
||||
name="service_types[][name]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="servt_new_name" class="text-[#2FD400]">Name</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="servt_new_name" class="text-[#<%= @accent_hex %>]">Name</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="servt_new_hex_color"
|
||||
name="service_types[][hex_color]"
|
||||
value=""
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<label for="servt_new_hex_color" class="text-[#2FD400]">Hex Color</label>
|
||||
<%= 'readonly' if @editing %> >
|
||||
<label for="servt_new_hex_color" class="text-[#<%= @accent_hex %>]">Hex Color</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-1/2 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-1/2 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Service Types
|
||||
</button>
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -10,33 +10,33 @@
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="service_<%= index %>_name"
|
||||
name="services[][name]"
|
||||
value="<%= service.name %>"
|
||||
readonly >
|
||||
<% if index == @service_type.services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class="">Name</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center text-[#<%= @accent_hex %>]"
|
||||
id="service_<%= index %>_position"
|
||||
name="services[][position]"
|
||||
value="<%= service.position %>" >
|
||||
<% if index == @service_type.services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Position</div>
|
||||
<div class="">Position</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="w-1/2 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-1/2 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Service Positions
|
||||
</button>
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/service_types" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="text-4xl mb-10">
|
||||
Services
|
||||
</div>
|
||||
<% unless @is_readonly %>
|
||||
<% unless @editing %>
|
||||
<div class="w-19/20 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col ml-10 space-y-2">
|
||||
@@ -16,73 +16,73 @@
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="serv_<%= index %>_name"
|
||||
name="services[][name]"
|
||||
value="<%= serv.name %>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">Name</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<select class="h-8 border-2 border-[#8000FF] rounded-lg text-center" name="services[][service_type_id]" id="service_type_select" <%= 'disabled' if @is_readonly %> >
|
||||
<select class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'name="services[][service_type_id]" id="service_type_select" <%= 'disabled' if @editing %> >
|
||||
<option value="">Select a Service Type</option>
|
||||
<% @service_types.each do |service_type| %>
|
||||
<option value="<%= service_type.id %>" <%= "selected" if serv.service_type_id == service_type.id %>><%= service_type.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Service Type</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">Service Type</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<select class="h-8 border-2 border-[#8000FF] rounded-lg text-center" name="services[][machine_id]" id="machine_select" <%= 'disabled' if @is_readonly %> >
|
||||
<select class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'name="services[][machine_id]" id="machine_select" <%= 'disabled' if @editing %> >
|
||||
<option value="">Select a Service Type</option>
|
||||
<% @machines.each do |machine| %>
|
||||
<option value="<%= machine.id %>" <%= "selected" if serv.machine_id == machine.id %>><%= machine.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Machine</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">Machine</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="serv_<%= index %>_subdomain"
|
||||
name="services[][subdomain]"
|
||||
value="<%= serv.subdomain%>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Subdomain</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">Subdomain</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="serv_<%= index %>_port"
|
||||
name="services[][port]"
|
||||
value="<%= serv.port%>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">Port</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">Port</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>'
|
||||
id="serv_<%= index %>_url_path"
|
||||
name="services[][url_path]"
|
||||
value="<%= serv.url_path%>"
|
||||
<%= 'readonly' if @is_readonly %> >
|
||||
<%= 'readonly' if @editing %> >
|
||||
<% if index == @services.length - 1 %>
|
||||
<div class="text-[#2FD400]">URL Path (optional)</div>
|
||||
<div class="<%= "text-[##{@accent_hex}]" if @editing %>">URL Path (optional)</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -92,82 +92,85 @@
|
||||
|
||||
|
||||
<div class="flex flex-col space-y-2 mt-10">
|
||||
<% if @is_readonly %>
|
||||
<div class="w-19/20 flex justify-end space-x-5">
|
||||
<a href="/admin/services/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<% if @editing %>
|
||||
<div class="w-19/20 flex ml-10 space-x-5">
|
||||
<a href="/admin/services/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Edit/Add Services
|
||||
</a>
|
||||
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Back To Admin
|
||||
</a>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="w-19/20 flex flex-none items-center justify-between ml-5 mb-2">
|
||||
<div class="flex-none text-xl text-[#2FD400]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#2FD400]"></div>
|
||||
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">New</div>
|
||||
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
|
||||
</div>
|
||||
<div class="flex space-x-2 mb-10 ml-10"">
|
||||
<input type="hidden" name="services[][id]" value="">
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="serv_new_name"
|
||||
name="services[][name]"
|
||||
value="">
|
||||
<div class="text-[#2FD400]">Name</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">Name</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<select class="h-8 border-2 border-[#8000FF] rounded-lg text-center" name="services[][service_type_id]" id="service_type_select" <%= 'disabled' if @is_readonly %> >
|
||||
<select class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center" name="services[][service_type_id]" id="service_type_select" <%= 'disabled' if @editing %> >
|
||||
<option value="">Select a Service Type</option>
|
||||
<% @service_types.each do |service_type| %>
|
||||
<option value="<%= service_type.id %>"><%= service_type.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<div class="text-[#2FD400]">Service Type</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">Service Type</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<select class="h-8 border-2 border-[#8000FF] rounded-lg text-center" name="services[][machine_id]" id="machine_select" <%= 'disabled' if @is_readonly %> >
|
||||
<select class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center" name="services[][machine_id]" id="machine_select" <%= 'disabled' if @editing %> >
|
||||
<option value="">Select a Service Type</option>
|
||||
<% @machines.each do |machine| %>
|
||||
<option value="<%= machine.id %>"><%= machine.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<div class="text-[#2FD400]">Machine</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">Machine</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="serv_new_subdomain"
|
||||
name="services[][subdomain]"
|
||||
value="">
|
||||
<div class="text-[#2FD400]">Subdomain</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">Subdomain</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="serv_new_port"
|
||||
name="services[][port]"
|
||||
value="">
|
||||
<div class="text-[#2FD400]">Port</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">Port</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<input type="text"
|
||||
class="h-8 border-2 border-[#8000FF] rounded-lg text-center"
|
||||
class="h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center"
|
||||
id="serv_new_url_path"
|
||||
name="services[][url_path]"
|
||||
value="">
|
||||
<div class="text-[#2FD400]">URL Path (optional)</div>
|
||||
<div class="text-[#<%= @accent_hex %>]">URL Path (optional)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="w-19/20 flex justify-end space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#8000FF] border-2 border-[#8000FF] rounded-lg hover:text-[#2FD400] hover:bg-[#140029] hover:border-[#2FD400] transition-colors duration-200">
|
||||
<div class="w-19/20 flex ml-10 space-x-5">
|
||||
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
|
||||
Save Services
|
||||
</button>
|
||||
<a href="/admin/services" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#140029] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#140029] hover:border-[#F80800] transition-colors duration-200">
|
||||
<a href="/admin/services" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user