Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed May 24, 2024
1 parent d2cb626 commit f57669b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/components/universities/checkbox.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class Universities::CheckBox < BaseComponent
needs name : String
needs description : String
needs full_path : String
needs all_name_inputs : Array(String)

def render
Expand Down
32 changes: 15 additions & 17 deletions src/components/universities/main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -119,76 +119,74 @@ then set (next <input/>).value to my.value2
end

private def render_chong_wen_bao_checkboxs
full_path = context.request.resource

fieldset do
legend ""
span class: "switch col m3" do
mount CheckBox, "chong_2023", "2023", full_path, all_name_inputs
mount CheckBox, "chong_2023", "2023", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "chong_2022", "2022", full_path, all_name_inputs
mount CheckBox, "chong_2022", "2022", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "chong_2021", "2021", full_path, all_name_inputs
mount CheckBox, "chong_2021", "2021", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "chong_2020", "2020", full_path, all_name_inputs
mount CheckBox, "chong_2020", "2020", all_name_inputs
end
end

fieldset do
legend ""
span class: "switch col m3" do
mount CheckBox, "wen_2023", "2023", full_path, all_name_inputs
mount CheckBox, "wen_2023", "2023", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "wen_2022", "2022", full_path, all_name_inputs
mount CheckBox, "wen_2022", "2022", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "wen_2021", "2021", full_path, all_name_inputs
mount CheckBox, "wen_2021", "2021", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "wen_2020", "2020", full_path, all_name_inputs
mount CheckBox, "wen_2020", "2020", all_name_inputs
end
end

fieldset do
legend ""
span class: "switch col m3" do
mount CheckBox, "bao_2023", "2023", full_path, all_name_inputs
mount CheckBox, "bao_2023", "2023", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "bao_2022", "2022", full_path, all_name_inputs
mount CheckBox, "bao_2022", "2022", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "bao_2021", "2021", full_path, all_name_inputs
mount CheckBox, "bao_2021", "2021", all_name_inputs
end

span class: "switch col m3" do
mount CheckBox, "bao_2020", "2020", full_path, all_name_inputs
mount CheckBox, "bao_2020", "2020", all_name_inputs
end
end
end

private def render_985_checkboxs
full_path = context.request.resource
div class: "switch col m3" do
mount CheckBox, "is_985", "仅显示985", full_path, all_name_inputs
mount CheckBox, "is_985", "仅显示985", all_name_inputs
end
div class: "switch col m3" do
mount CheckBox, "is_211", "仅显示211", full_path, all_name_inputs
mount CheckBox, "is_211", "仅显示211", all_name_inputs
end
div class: "switch col m3" do
mount CheckBox, "is_good", "显示包含双一流专业高校", full_path, all_name_inputs
mount CheckBox, "is_good", "显示包含双一流专业高校", all_name_inputs
end
end

Expand Down

0 comments on commit f57669b

Please sign in to comment.