Merge branch 'dev' into master

This commit is contained in:
stormand 2016-12-10 03:11:31 -06:00 committed by GitHub
commit 4f81cefb40
20 changed files with 9946 additions and 353 deletions

View File

@ -5,4 +5,4 @@ You are allowed to:
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="assets" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="task" /><Generator name="test_unit:generator" /><Generator name="test_unit:job" /><Generator name="test_unit:plugin" /></GeneratorsGroup></Settings>
--><GeneratorsGroup><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="mailer" /><Generator name="metal" /><Generator name="migration" /><Generator name="model" /><Generator name="model_subclass" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /></GeneratorsGroup></Settings>

View File

@ -2,12 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="d7b1c0f9-5303-4042-90a5-05cecbda0e94" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<<<<<<< HEAD
=======
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/courses_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/courses_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/homes_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/homes_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/courses/index.html.erb" afterPath="$PROJECT_DIR$/app/views/courses/index.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/courses/list.html.erb" afterPath="$PROJECT_DIR$/app/views/courses/list.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/shared/_sidenav.html.erb" afterPath="$PROJECT_DIR$/app/views/shared/_sidenav.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
>>>>>>> flyingwaters-master
</list>
<ignored path="vim.iws" />
<ignored path=".idea/workspace.xml" />
@ -36,58 +36,31 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="_form.html.erb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/views/courses/_form.html.erb">
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/homes/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="897">
<caret line="125" column="0" selection-start-line="125" selection-start-column="0" selection-end-line="125" selection-end-column="0" />
<state relative-caret-position="288">
<caret line="16" column="39" selection-start-line="16" selection-start-column="39" selection-end-line="16" selection-end-column="39" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Gemfile">
<file leaf-file-name="20161109105023_add_open_to_courses.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/migrate/20161109105023_add_open_to_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="774">
<caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="20160907152104_create_courses.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/migrate/20160907152104_create_courses.rb">
<file leaf-file-name="homes_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/homes_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="5" column="20" selection-start-line="4" selection-start-column="16" selection-end-line="4" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="default.jpg" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/fallback/default.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
</file>
<file leaf-file-name="new.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/users/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_form.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/users/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<caret line="4" column="46" selection-start-line="4" selection-start-column="46" selection-end-line="4" selection-end-column="46" />
<folding />
</state>
</provider>
@ -96,28 +69,70 @@
<file leaf-file-name="detail.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/courses/detail.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="22" column="8" selection-start-line="21" selection-start-column="9" selection-end-line="21" selection-end-column="10" />
<state relative-caret-position="396">
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/homes/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="10" column="31" selection-start-line="10" selection-start-column="31" selection-end-line="10" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="edit.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/courses/edit.html.erb">
<file leaf-file-name="20160907152104_create_courses.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/migrate/20160907152104_create_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="10" selection-start-line="15" selection-start-column="10" selection-end-line="15" selection-end-column="10" />
<caret line="15" column="27" selection-start-line="15" selection-start-column="20" selection-end-line="15" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="default.jpg" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/assets/images/fallback/default.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
</file>
<file leaf-file-name="avatar_uploader.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/uploaders/avatar_uploader.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="27" column="35" selection-start-line="27" selection-start-column="35" selection-end-line="27" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="grades_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/grades_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="22" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="courses_controller.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="79" column="23" selection-start-line="79" selection-start-column="23" selection-end-line="79" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="list.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/courses/list.html.erb">
<provider selected="true" editor-type-id="text-editor">
<<<<<<< HEAD
<state relative-caret-position="330">
<caret line="27" column="35" selection-start-line="27" selection-start-column="35" selection-end-line="27" selection-end-column="35" />
=======
<state relative-caret-position="-198">
<caret line="10" column="14" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
>>>>>>> flyingwaters-master
<folding />
</state>
</provider>
@ -132,14 +147,13 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="dev" />
<entry key="$PROJECT_DIR$" value="master" />
</map>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/app/views/users/transcript.html.erb" />
<option value="$PROJECT_DIR$/app/helpers/sessions_helper.rb" />
<option value="$PROJECT_DIR$/app/views/teachers/manage_transcript.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/teachers_controller.rb" />
@ -149,13 +163,9 @@
<option value="$PROJECT_DIR$/app/views/users/_sidenav.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/_sidenav.html.erb" />
<option value="$PROJECT_DIR$/app/views/grades/upload.html.erb" />
<option value="$PROJECT_DIR$/config/routes.rb" />
<option value="$PROJECT_DIR$/app/views/shared/_sidenav.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/grades_controller.rb" />
<option value="$PROJECT_DIR$/app/views/grades/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/list.html.erb" />
<option value="$PROJECT_DIR$/app/views/layouts/_content.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/new.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/edit.html.erb" />
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
@ -182,14 +192,19 @@
<option value="$PROJECT_DIR$/app/models/image.rb" />
<option value="$PROJECT_DIR$/app/uploaders/image_uploader.rb" />
<option value="$PROJECT_DIR$/app/controllers/image_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/homes_controller.rb" />
<option value="$PROJECT_DIR$/db/migrate/20161108164630_add_avatar_to_courses.rb" />
<option value="$PROJECT_DIR$/app/models/course.rb" />
<option value="$PROJECT_DIR$/app/controllers/courses_controller.rb" />
<option value="$PROJECT_DIR$/app/views/courses/_form.html.erb" />
<option value="$PROJECT_DIR$/app/views/courses/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/layouts/_content.html.erb" />
<option value="$PROJECT_DIR$/config/routes.rb" />
<option value="$PROJECT_DIR$/app/views/courses/list.html.erb" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/app/views/courses/detail.erb" />
<option value="$PROJECT_DIR$/app/controllers/homes_controller.rb" />
<option value="$PROJECT_DIR$/app/views/homes/index.html.erb" />
<option value="$PROJECT_DIR$/app/uploaders/avatar_uploader.rb" />
<option value="$PROJECT_DIR$/app/views/courses/_form.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/courses_controller.rb" />
</list>
</option>
</component>
@ -237,9 +252,10 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="RailsProjectView" />
<<<<<<< HEAD
<pane id="Scope" />
=======
>>>>>>> flyingwaters-master
<pane id="ProjectPane">
<subPane>
<PATH>
@ -276,28 +292,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="vim" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="CourseSelect" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="homes" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="vim" />
@ -333,13 +327,61 @@
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="uploaders" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="vim" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="CourseSelect" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="vim" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="CourseSelect" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="controllers" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<<<<<<< HEAD
<pane id="Scratches">
<subPane />
</pane>
<pane id="RailsProjectView" />
=======
<pane id="RailsProjectView" />
<pane id="Scope" />
<pane id="Scratches">
<subPane />
</pane>
>>>>>>> flyingwaters-master
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="WebServerToolWindowFactoryState" value="false" />
@ -574,6 +616,27 @@
<workItem from="1478674726204" duration="2626000" />
<workItem from="1478686736886" duration="167000" />
<workItem from="1479035444853" duration="51000" />
<workItem from="1479012254949" duration="54000" />
<workItem from="1479273173231" duration="405000" />
<workItem from="1479273591547" duration="7353000" />
<workItem from="1479281188590" duration="6069000" />
<workItem from="1479290164702" duration="49000" />
<workItem from="1479290433098" duration="9109000" />
<workItem from="1479299887930" duration="2374000" />
<workItem from="1479597022926" duration="1290000" />
<workItem from="1479572693816" duration="3973000" />
<workItem from="1479577369583" duration="779000" />
<workItem from="1479578250669" duration="32000" />
<workItem from="1479683655211" duration="1866000" />
<workItem from="1479924259664" duration="2601000" />
<workItem from="1479900001385" duration="4573000" />
<workItem from="1479904669591" duration="466000" />
<workItem from="1479905211350" duration="825000" />
<<<<<<< HEAD
<workItem from="1481119587206" duration="25000" />
=======
<workItem from="1481119198687" duration="347000" />
>>>>>>> flyingwaters-master
</task>
<task id="LOCAL-00001" summary="增加课程介绍,首页轮播的外观搭建">
<created>1478067100340</created>
@ -593,7 +656,11 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="28785000" />
<<<<<<< HEAD
<option name="totallyTimeSpent" value="70628000" />
=======
<option name="totallyTimeSpent" value="70950000" />
>>>>>>> flyingwaters-master
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -608,13 +675,13 @@
<frame x="65" y="24" width="1855" height="1056" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.44180915" sideWeight="0.4858757" order="1" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23607281" sideWeight="0.4858757" order="1" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3287483" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39889959" sideWeight="0.51373184" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34751773" sideWeight="0.5156082" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.41945288" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.35764945" sideWeight="0.49030694" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34954408" sideWeight="0.4843918" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3513732" sideWeight="0.5141243" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -645,118 +712,23 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="158" />
<breakpoints>
<line-breakpoint enabled="true" type="ruby-line">
<url>file://$PROJECT_DIR$/app/controllers/courses_controller.rb</url>
<line>134</line>
<option name="timeStamp" value="160" />
</line-breakpoint>
<line-breakpoint enabled="true" type="ruby-line">
<url>file://$PROJECT_DIR$/app/controllers/homes_controller.rb</url>
<line>2</line>
<option name="timeStamp" value="162" />
</line-breakpoint>
</breakpoints>
<option name="time" value="163" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/test/controllers/courses_controller_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="3" column="17" selection-start-line="3" selection-start-column="17" selection-end-line="3" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/controllers/homes_controller_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="5" column="7" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs22/object.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="431" column="8" selection-start-line="431" selection-start-column="8" selection-end-line="431" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/models/user_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/controllers/grades_controller_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="5" column="7" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/controllers/users_controller_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="7" column="0" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/integration/site_layout_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="11" column="11" selection-start-line="11" selection-start-column="11" selection-end-line="11" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="21" column="37" selection-start-line="21" selection-start-column="24" selection-end-line="21" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.2.4/gems/minitest-5.9.0/lib/minitest/test.rb" />
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.5.2/lib/action_dispatch/testing/assertions/response.rb" />
<entry file="file://$PROJECT_DIR$/test/integration/user_login_test.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/fixtures/users.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="10" column="27" selection-start-line="10" selection-start-column="27" selection-end-line="10" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/database.yml.travis">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/database.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="3" column="9" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="252">
<caret line="14" column="20" selection-start-line="14" selection-start-column="20" selection-end-line="14" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/sessions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="432">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/list.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="41" column="53" selection-start-line="41" selection-start-column="53" selection-end-line="41" selection-end-column="53" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/grade.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
@ -772,13 +744,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/grades_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="22" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161102035441_create_detail_courses.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
<provider selected="true" editor-type-id="text-editor">
@ -790,13 +755,6 @@
<entry file="file://$PROJECT_DIR$/test/fixtures/course_details.yml" />
<entry file="file://$PROJECT_DIR$/db/migrate/20161108153212_add_attachment_image_to_images.rb" />
<entry file="file://$PROJECT_DIR$/db/migrate/20161108155922_drop_image.rb" />
<entry file="file://$PROJECT_DIR$/db/migrate/20160909105514_create_grades.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="26" selection-start-line="3" selection-start-column="6" selection-end-line="3" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20160818081955_create_users.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
@ -821,111 +779,244 @@
</entry>
<entry file="file://$PROJECT_DIR$/app/models/image.rb" />
<entry file="file://$PROJECT_DIR$/app/uploaders/image_uploader.rb" />
<entry file="file://$PROJECT_DIR$/app/views/courses/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="19" selection-start-line="12" selection-start-column="19" selection-end-line="12" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/image_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/homes_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161102052958_add_course_introduction_to_courses.rb" />
<entry file="file://$PROJECT_DIR$/app/models/course.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="40" selection-start-line="2" selection-start-column="40" selection-end-line="2" selection-end-column="40" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161108164630_add_avatar_to_courses.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="11" selection-start-line="18" selection-start-column="11" selection-end-line="18" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/images/background.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/fallback/default.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/fallback/default.jpg" />
<entry file="file://$PROJECT_DIR$/app/views/users/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="897">
<caret line="125" column="0" selection-start-line="125" selection-start-column="0" selection-end-line="125" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20160907152104_create_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="5" column="20" selection-start-line="4" selection-start-column="16" selection-end-line="4" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/users/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Gemfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="774">
<caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
<state relative-caret-position="882">
<caret line="49" column="0" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/sessions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="432">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="10" selection-start-line="5" selection-start-column="10" selection-end-line="5" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/application.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="16" column="39" selection-start-line="16" selection-start-column="39" selection-end-line="16" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_footer.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_content.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="10" selection-start-line="15" selection-start-column="10" selection-end-line="15" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="252">
<caret line="14" column="18" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/users/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1152">
<caret line="64" column="58" selection-start-line="64" selection-start-column="21" selection-end-line="64" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="19" selection-start-line="12" selection-start-column="19" selection-end-line="12" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2160">
<caret line="120" column="4" selection-start-line="120" selection-start-column="4" selection-end-line="120" selection-end-column="76" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/routes.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="25" column="16" selection-start-line="25" selection-start-column="16" selection-end-line="25" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="396">
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/course.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="10" selection-start-line="2" selection-start-column="10" selection-end-line="2" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/1/100520.jpeg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/1/big_aaa.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/uploads/course/avatar/1/lb_aaa.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/images/fallback/default_original.jpeg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161102052958_add_course_introduction_to_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="45" selection-start-line="2" selection-start-column="26" selection-end-line="2" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20160909105514_create_grades.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="26" selection-start-line="3" selection-start-column="6" selection-end-line="3" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20160907152104_create_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="15" column="27" selection-start-line="15" selection-start-column="20" selection-end-line="15" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/homes_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="46" selection-start-line="4" selection-start-column="46" selection-end-line="4" selection-end-column="46" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161109105023_add_open_to_courses.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20161113072827_add_open_attribute.rb" />
<entry file="file://$PROJECT_DIR$/app/views/homes/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="16" column="39" selection-start-line="16" selection-start-column="39" selection-end-line="16" selection-end-column="39" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/detail.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="22" column="8" selection-start-line="21" selection-start-column="9" selection-end-line="21" selection-end-column="10" />
<state relative-caret-position="396">
<caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/homes/index.html.erb">
<entry file="file://$PROJECT_DIR$/app/assets/images/fallback/default.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/uploaders/avatar_uploader.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="10" column="31" selection-start-line="10" selection-start-column="31" selection-end-line="10" selection-end-column="31" />
<state relative-caret-position="330">
<caret line="27" column="35" selection-start-line="27" selection-start-column="35" selection-end-line="27" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/grades_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="22" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/courses/list.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-198">
<caret line="10" column="14" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/courses_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="79" column="23" selection-start-line="79" selection-start-column="23" selection-end-line="79" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/uploaders/avatar_uploader.rb" />
</component>
</project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

View File

@ -61,13 +61,16 @@ class CoursesController < ApplicationController
def list
@course=Course.all
@course_open=Course.where(:open=>true)
@course_open=@course_open-current_user.courses
@course_open=Course.where("open = ?", true)-current_user.courses
@course_close=@course-@course_open
@theparams=params
end
def select
@allcourse=current_user.courses
@course=Course.find_by_id(params[:id])
@allcourse.each do |k|
if(k.course_week.nil?||@course.course_week.nil?)
next
@ -88,7 +91,6 @@ class CoursesController < ApplicationController
end
if !@course.limit_num.nil? && @course.limit_num!=0
if(@course.limit_num==0)
if(@course.student_num < @course.limit_num)
current_user.courses<<@course
@course.student_num+=1
@ -96,7 +98,7 @@ class CoursesController < ApplicationController
flash={:success => "成功选择课程: #{@course.name}"}
redirect_to courses_path, flash: flash
else
flash={:sucess => "选课人数已满: #{@course.name}"}
flash={:danger => "选课人数已满: #{@course.name}"}
@course=Course.all
@course_open=Course.where(:open=>true)
@course_open=@course_open-current_user.courses
@ -109,15 +111,6 @@ class CoursesController < ApplicationController
flash={:success => "成功选择课程: #{@course.name}"}
redirect_to courses_path, flash: flash
end
else
current_user.courses<<@course
@course.student_num+=1
@course.update_attributes(:student_num=>@course.student_num)
flash={:success => "成功选择课程: #{@course.name}"}
redirect_to courses_path, flash: flash
end
end
def quit
@ -142,6 +135,42 @@ class CoursesController < ApplicationController
@course=Course.find_by_id(params[:id])
end
def search
temp="%"+params[:name]+"%"
@theparams=Course.find_by_id(1)
@course=Course.all
@course_open=Course.where("name like ? AND open =?", temp ,true)
@course_close=Course.where("name like ? AND open =?", temp ,false)
if params[:teaching_type]!=""
@course_open=@course_open.where("teaching_type =?", params[:teaching_type])
@course_close=@course_close.where("teaching_type =?", params[:teaching_type])
end
if params[:course_type]!=""
@course_open=@course_open.where("course_type =?", params[:course_type])
@course_close=@course_close.where("course_type =?", params[:course_type])
end
if params[:credit]!=""
@course_open=@course_open.where("credit =?", params[:credit])
@course_close=@course_close.where("credit =?", params[:credit])
end
if params[:exam_type]!=""
@course_open=@course_open.where("exam_type =?", params[:exam_type])
@course_close=@course_close.where("exam_type =?", params[:exam_type])
end
@course_open=@course_open-current_user.courses
@course_close=@course_close-current_user.courses
@theparams=params
render 'list'
end
def refresh_search
@course=Course.all
@course_open=Course.where("open = ?", true)-current_user.courses
@course_close=@course-@course_open
@theparams=params
render 'list'
end
private

View File

@ -2,8 +2,9 @@ class HomesController < ApplicationController
def index
@course=Course.all
@course1=Course.find_by_id(1)
@course_play_first=Course.order("student_num DESC").limit(1)
@course_play=Course.order("student_num DESC").limit(3)-@course_play_first
@course_play_first=@course_play_first.take
end
end

View File

@ -20,12 +20,12 @@ class AvatarUploader < CarrierWave::Uploader::Base
def default_url
# For Rails 3.1+ asset pipeline compatibility:
# ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
"fallback/" + [version_name, "default.jpg"].compact.join('_')
#"fallback/" + [version_name, "default.jpg"].compact.join('_')
end
version :thumb do
process :resize_to_fill => [1200, 300]
process :resize_to_fill => [1910, 550]
end

View File

@ -7,16 +7,58 @@
<%= render "shared/sidenav" %>
</div>
<% end %>
<div class="col-md-offset-3 col-sm-6">
<% if logged_in? %>
<div class="col-md-offset-1 col-sm-6" >
<% else %>
<div class="col-md-offset-3 col-sm-6" >
<% end %>
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="text-center">课程: <%= @course.name %></h3>
</div>
<div class="panel-body">
<%= @course.course_introduction %>
<%= image_tag @course.avatar, {width: "1000", height: "228"} %>
<%= image_tag(@course.avatar_url(:thumb)) if @course.avatar %>
<h1><%= @course.name %></h1>
<%= image_tag(@course.avatar_url, class: "img-responsive" ) if !@course.avatar.blank? %>
<%= image_tag "fallback/default_original.jpg" , class: "img-responsive" if @course.avatar.blank? %>
<h4>课程介绍:</h4>
<p><%=@course.course_introduction if !@course.course_introduction.blank? %><%="暂无课程介绍" if @course.course_introduction.blank? %></p>
<div class="row">
<div class="col-sm-3">
<h4>课程属性</h4>
<p><%=@course.course_type %></p>
</div>
<div class="col-sm-3">
<h4>授课方式</h4>
<p><%=@course.teaching_type %></p>
</div>
<div class="col-sm-3">
<h4>考试方式</h4>
<p><%=@course.exam_type %></p>
</div>
<div class="col-sm-3">
<h4>主讲教师</h4>
<p><%=@course.teacher.name %></p>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<h4>限选/已选</h4>
<p><%=@course.limit_num if !@course.limit_num.blank? %> <%="无限选" if @course.limit_num.blank? %>/<%=@course.student_num %></p>
</div>
<div class="col-sm-3">
<h4>课时/学分</h4>
<p><%=@course.credit %></p>
</div>
<div class="col-sm-3">
<h4>时间/周数</h4>
<p><%=@course.course_time %>/<%=@course.course_week %></p>
</div>
<div class="col-sm-3">
<h4>上课教室</h4>
<p><%=@course.class_room %></p>
</div>
</div>
</div>
</div>
</div>

View File

@ -37,12 +37,10 @@
<% if teacher_logged_in? %>
<td><%= link_to "编辑", edit_course_url(course), class: 'btn btn-xs btn-info' %></td>
<% if course.open %>
<td><%= link_to "关闭", close_course_url(course), class: 'btn btn-xs btn-info' %></td>
<td><%= link_to "关闭", close_course_url(course), class: 'btn btn-xs btn-danger' %></td>
<% else %>
<td><%= link_to "打开", open_course_url(course), class: 'btn btn-xs btn-info' %></td>
<% end %>
<td><%= link_to "删除", course_path(course), :method => "delete", class: 'btn btn-xs btn-danger', :data => {confirm: '确定要删除此课程?'} %></td>
<% elsif student_logged_in? %>
<td><%= link_to "删除", quit_course_path(course), class: 'btn-sm btn-danger' %></td>

View File

@ -9,6 +9,45 @@
<div class="panel-heading">
<h3 class="panel-title">选修课程</h3>
</div>
<br>
<%= form_tag("/courses/search", method: "get") do %>
<%= link_to '', refresh_search_courses_path, :class => "btn btn-md glyphicon glyphicon-refresh" %>
<%= text_field_tag(:name, @theparams[:name] ) %>
<select name="credit" id="credit">
<option value="">所有课时学分</option>
<% @course.select(:credit).distinct.each do |ct| %>
<option value=<%= ct.credit %> <%= selected="selected" if @theparams[:credit]==ct.credit %>><%= ct.credit %></option>
<% end %>
</select>
<select name="course_type" id="course_type">
<option value="">所有课程属性</option>
<% @course.select(:course_type).distinct.each do |ct| %>
<option value=<%= ct.course_type %> <%= selected="selected" if @theparams[:course_type]==ct.course_type %>><%= ct.course_type %></option>
<% end %>
</select>
<select name="teaching_type" id="teaching_type">
<option value="">所有授课方式</option>
<% @course.select(:teaching_type).distinct.each do |ct| %>
<option value=<%= ct.teaching_type %> <%= selected="selected" if @theparams[:teaching_type]==ct.teaching_type %>><%= ct.teaching_type %></option>
<% end %>
</select>
<select name="exam_type" id="exam_type">
<option value="">所有考试方式</option>
<% @course.select(:exam_type).distinct.each do |ct| %>
<option value=<%= ct.exam_type %> <%= selected="selected" if @theparams[:exam_type]==ct.exam_type %>><%= ct.exam_type %></option>
<% end %>
</select>
<%= submit_tag("Search" ,class:"btn btn-md btn-primary") %>
<% end %>
<div class="panel-body" style="min-height: 450px">
<table class="table table-striped table-hover">
<thead>
@ -40,7 +79,29 @@
<td><%= course.teaching_type %></td>
<td><%= course.exam_type %></td>
<td><%= course.teacher.name %></td>
<td><%= link_to "加入课程", select_course_path(course), class: 'btn-sm btn-info' %></td>
<td>
<%= link_to select_course_path(course) do %>
<button type="button" class="btn btn-sm btn-primary" >加入课程</button>
<% end %>
</td>
</tr>
<% end %>
<% @course_close.each do |course| %>
<tr>
<td><%= course.course_code %></td>
<td><%= link_to course.name, detail_course_path(course), class: 'btn-sm' %></td>
<td><%= course.credit %></td>
<td><%= course.limit_num %></td>
<td><%= course.student_num %></td>
<td><%= course.course_type %></td>
<td><%= course.teaching_type %></td>
<td><%= course.exam_type %></td>
<td><%= course.teacher.name %></td>
<td> <button type="button" class="btn btn-sm btn-default" disabled="disabled">
加入课程
</button></td>
</tr>
<% end %>

View File

@ -1,6 +1,4 @@
<div class="container">
<div id="myCarousel" class="carousel slide">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
@ -8,24 +6,24 @@
</ol>
<!-- 轮播Carousel项目 -->
<div class="carousel-inner">
<div class="item active" >
<%= link_to detail_course_path(@course1) do %>
<%= image_tag(@course1.avatar_url(:thumb)) %>
<div class="carousel-caption"><%= @course1.name %></div>
<div class="item active">
<%= link_to detail_course_path(@course_play_first) do %>
<%= image_tag @course_play_first.avatar_url(:thumb) if !@course_play_first.avatar.blank? %>
<%= image_tag "fallback/default.jpg" if @course_play_first.avatar.blank? %>
<div class="carousel-caption"><%= @course_play_first.name %></div>
<% end %>
</div>
<div class="item">
<%= link_to detail_course_path(@course1) do %>
<%= image_tag(@course1.avatar_url(:thumb)) %>
<div class="carousel-caption"><%= @course1.name %></div>
<% @course_play.each do |play| %>
<div class="item" >
<%= link_to detail_course_path(play) do %>
<%= image_tag play.avatar_url(:thumb) if !play.avatar.blank? %>
<%= image_tag "fallback/default.jpg" if play.avatar.blank? %>
<div class="carousel-caption"><%= play.name %></div>
<% end %>
</div>
<div class="item">
<%= link_to detail_course_path(@course1) do %>
<%= image_tag(@course1.avatar_url(:thumb)) %>
<div class="carousel-caption"><%= @course1.name %></div>
<% end %>
</div>
</div>
<!-- 轮播Carousel导航 -->
<a class="carousel-control left" href="#myCarousel"
@ -40,8 +38,15 @@
<hr>
<div class="container">
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel">
<div class="panel-body" style="min-height: 450px">
<table class="table table-striped table-hover">
@ -51,15 +56,11 @@
<th>课程编号</th>
<th>课程名称</th>
<th>课时/学分</th>
<th>限选</th>
<th>已选</th>
<th>课程属性</th>
<th>授课方式</th>
<th>考试方式</th>
<th>主讲教师</th>
<th>time</th>
<th>week</th>
<th>room</th>
</tr>
</thead>
@ -71,15 +72,10 @@
<td><%= course.course_code %></td>
<td><%= link_to course.name, detail_course_path(course), class: 'btn-sm' %></td>
<td><%= course.credit %></td>
<td><%= course.limit_num %></td>
<td><%= course.student_num %></td>
<td><%= course.course_type %></td>
<td><%= course.teaching_type %></td>
<td><%= course.exam_type %></td>
<td><%= course.teacher.name %></td>
<td><%= course.course_time %></td>
<td><%= course.course_week %></td>
<td><%= course.class_room %></td>
</tr>
<% end %>
@ -89,4 +85,3 @@
</div>
</div>
</div>
</div>

View File

@ -27,6 +27,8 @@ Rails.application.routes.draw do
end
collection do
get :list
get :search
get :refresh_search
end
end

2744
css/animate.css vendored Normal file

File diff suppressed because it is too large Load Diff

5831
css/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

7
css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

792
css/style.css Normal file
View File

@ -0,0 +1,792 @@
/* ==== Google font ==== */
@import url('http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic|Montserrat:700|Merriweather:400italic');
body {
width: 100%;
height: 100%;
font-family: 'Lato',sans-serif;
font-weight: 300;
color: #666;
background-color: #fff;
}
html {
width: 100%;
height: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0 0 30px;
text-transform: uppercase;
font-family: Montserrat,sans-serif;
font-weight: 700;
letter-spacing: 1px;
}
p {
margin: 0 0 20px;
font-size: 16px;
line-height: 1.6em;
}
p.lead {
font-weight: 600;
}
a {
color: #28c3ab;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
a:hover,
a:focus {
text-decoration: none;
color: #176e61;
}
.light {
font-weight: 400;
}
.navbar {
margin-bottom: 0;
border-bottom: 1px solid rgba(255,255,255,.3);
}
.navbar-brand {
font-weight: 700;
}
.navbar-brand {
height: 40px;
padding: 5px 15px;
font-size: 18px;
line-height: 1em;
}
.navbar-brand h1{
color: #fff;
font-size: 20px;
line-height: 40px;
}
.navbar-brand:focus {
outline: 0;
}
.nav.navbar-nav {
background-color: rgba(255,255,255,.4);
}
.navbar-custom.top-nav-collapse .nav.navbar-nav {
background-color: rgba(0,0,0,0);
}
.navbar-custom ul.nav li a {
font-size: 12px;
letter-spacing: 1px;
color: #444;
text-transform: uppercase;
font-weight: 700;
}
.navbar-custom.top-nav-collapse ul.nav li a {
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
color: #fff;
}
.navbar-custom ul.nav ul.dropdown-menu {
border-radius: 0;
}
.navbar-custom ul.nav ul.dropdown-menu li {
border-bottom: 1px solid #f5f5f5;
}
.navbar-custom ul.nav ul.dropdown-menu li:last-child{
border-bottom: none;
}
.navbar-custom ul.nav ul.dropdown-menu li a {
padding: 10px 20px;
}
.navbar-custom ul.nav ul.dropdown-menu li a:hover {
background: #fefefe;
}
.navbar-custom.top-nav-collapse ul.nav ul.dropdown-menu li a {
color: #666;
}
.navbar-custom .nav li a {
-webkit-transition: background .3s ease-in-out;
-moz-transition: background .3s ease-in-out;
transition: background .3s ease-in-out;
}
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus,
.navbar-custom .nav li.active {
outline: 0;
background-color: rgba(255,255,255,.2);
}
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus,
.navbar-custom .nav li.active {
outline: 0;
background-color: rgba(255,255,255,.2);
}
.navbar-toggle {
padding: 4px 6px;
font-size: 14px;
color: #fff;
}
.navbar-toggle:focus,
.navbar-toggle:active {
outline: 0;
}
/* loader */
#preloader {
background: #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 999;
}
#loaderInner {
background:#ffffff url(../img/spinner.gif) center center no-repeat;
height: 60px;
left: 50%;
margin: -50px 0 0 -50px;
position: absolute;
top: 50%;
width: 60px;
}
@keyframes boxSpin{
0%{
transform: translate(-10px, 0px);
}
25%{
transform: translate(10px, 10px);
}
50%{
transform: translate(10px, -10px);
}
75%{
transform: translate(-10px, -10px);
}
100%{
transform: translate(-10px, 10px);
}
}
@keyframes shadowSpin{
0%{
box-shadow: 10px -10px #39CCCC, -10px 10px #FFDC00;
}
25%{
box-shadow: 10px 10px #39CCCC, -10px -10px #FFDC00;
}
50%{
box-shadow: -10px 10px #39CCCC, 10px -10px #FFDC00;
}
75%{
box-shadow: -10px -10px #39CCCC, 10px 10px #FFDC00;
}
100%{
box-shadow: 10px -10px #39CCCC, -10px 10px #FFDC00;
}
}
#load {
z-index: 9999;
background-color: #FF4136;
opacity: 0.75;
width: 10px;
height: 10px;
position: absolute;
top: 50%;
margin: -5px auto 0 auto;
left: 0;
right: 0;
border-radius: 0px;
border: 5px solid #FF4136;
box-shadow: 10px 0px #39CCCC, 10px 0px #01FF70;
animation: shadowSpin 1s ease-in-out infinite;
}
/* misc */
hr {
margin-top: 10px;
}
/* margins */
.marginbot-0{margin-bottom:0 !important;}
.marginbot-10{margin-bottom:10px !important;}
.marginbot-20{margin-bottom:20px !important;}
.marginbot-30{margin-bottom:30px !important;}
.marginbot-40{margin-bottom:40px !important;}
.marginbot-50{margin-bottom:50px !important;}
/* ===========================
--- General sections
============================ */
.home-section {
padding-top: 110px;
padding-bottom: 110px;
display:block;
position:relative;
z-index:120;
}
.section-heading h2 {
font-size: 40px;
}
.section-heading i {
margin-bottom: 20px;
}
/* --- section bg var --- */
.bg-white {
background: #fff;
}
.bg-gray {
background: #f8f8f8;
}
.bg-dark {
background: #575757;
}
/* --- section color var --- */
.text-light {
color: #fff;
}
/* ===========================
--- Intro
============================ */
.intro {
width:100%;
position:relative;
background: url(../img/bg1.jpg) no-repeat top center;
}
#intro.intro {
padding:20% 0 0 0;
}
.intro .slogan {
text-align: center;
}
.intro .page-scroll {
text-align: center;
}
.brand-heading {
font-size: 40px;
}
.intro-text {
font-size: 18px;
}
.intro .slogan h2 {
color: #FFF;
text-shadow: none;
font-size: 60px;
line-height: 60px;
font-weight: 700;
font-family: Montserrat, sans-serif;
background-color: rgba(0, 0, 0, 0);
text-decoration: none;
text-transform: uppercase;
border-width: 0px;
border-color: #000;
border-style: none;
text-shadow: -1px 0 1px #000;
}
.intro .slogan h4 {
color: #fff;
text-shadow: -1px 1px 1px #000;
}
/* ===========================
--- About
============================ */
.boxed-grey {
background: #f9f9f9;
padding: 20px;
}
.team h5 {
margin-bottom: 10px;
}
.team p.subtitle {
margin-bottom: 10px;
}
.avatar {
margin-bottom: 20px;
}
.team-social {
margin-left: 0;
padding-left: 0;
}
.team-social {
text-align: center;
}
.team-social li{
display: inline-block;
margin:0 !important;
padding:0;
}
.team-social a{
margin:0;
padding:0;
display: block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
background: #3bbec0;
color: #fff;
-webkit-transition: background .3s ease-in-out;
transition: background .3s ease-in-out;
}
.team-social a i{
text-align: center;
margin:0;
padding:0;
}
.team-social .social-facebook a{background: #3873ae;}
.team-social .social-twitter a{background: #62c6f8;}
.team-social .social-dribble a{background: #d74980;}
.team-social .social-deviantart a{background: #8da356;}
.team-social .social-google a{background: #000;}
.team-social .social-vimeo a{background: #51a6d3;}
.team-social .social-facebook a:hover{background: #4893ce;}
.team-social .social-twitter a:hover{background: #82e6ff;}
.team-social .social-dribble a:hover{background: #f769a0;}
.team-social .social-deviantart a:hover{background: #adc376;}
.team-social .social-google a:hover{background: #333;}
.team-social .social-vimeo a:hover{background: #71c6f3;}
/* ===========================
--- Services
============================ */
.service-icon {
margin-bottom: 20px;
}
/* ===========================
--- Contact
============================ */
form#contact-form .form-group label {
text-align: left !important;
display: block;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 12px;
}
form#contact-form input,form#contact-form select,form#contact-form textarea {
border-radius: 0;
border: 1px solid #eee;
-webkit-box-shadow: none;
box-shadow: none;
}
form#contact-form input:focus,form#contact-form select:focus,form#contact-form textarea:focus {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.input-group-addon {
background-color: #fefefe;
border: 1px solid #eee;
border-radius: 0;
}
.widget-contact {
text-align: left;
}
.company-social {
margin-left: 0;
padding-left: 0;
margin-top: 10px;
}
.company-social {
text-align: left;
}
.company-social li{
display: inline-block;
margin:0 !important;
padding:0;
}
.company-social a{
margin:0;
padding:0;
display: block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
background: #3bbec0;
color: #fff;
-webkit-transition: background .3s ease-in-out;
transition: background .3s ease-in-out;
}
.company-social a i{
text-align: center;
margin:0;
padding:0;
}
.company-social .social-facebook a{background: #3873ae;}
.company-social .social-twitter a{background: #62c6f8;}
.company-social .social-dribble a{background: #d74980;}
.company-social .social-deviantart a{background: #8da356;}
.company-social .social-google a{background: #000;}
.company-social .social-vimeo a{background: #51a6d3;}
.company-social .social-facebook a:hover{background: #4893ce;}
.company-social .social-twitter a:hover{background: #82e6ff;}
.company-social .social-dribble a:hover{background: #f769a0;}
.company-social .social-deviantart a:hover{background: #adc376;}
.company-social .social-google a:hover{background: #333;}
.company-social .social-vimeo a:hover{background: #71c6f3;}
/* ===========================
--- Footer
============================ */
footer {
text-align: center;
padding: 50px 0 ;
}
footer p {
color: #f8f8f8;
}
/* ==========================
Parallax
============================= */
#parallax1{
background-image: url(../img/parallax/1.jpg);
}
#parallax1:after {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEklEQVQImWNgYGD4z0AswK4SAFXuAf8EPy+xAAAAAElFTkSuQmCC);
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 0;
opacity: 0.7;
z-index: -1;
}
#parallax2{
background-image: url(../img/parallax/2.jpg);
}
#parallax2:after {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEklEQVQImWNgYGD4z0AswK4SAFXuAf8EPy+xAAAAAElFTkSuQmCC);
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 0;
opacity: 0.7;
z-index: -1;
}
/* ===========================
--- Elements
============================ */
.btn {
border-radius: 0;
text-transform: uppercase;
font-family: Montserrat,sans-serif;
font-weight: 400;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.btn-circle {
width: 70px;
height: 70px;
margin-top: 15px;
padding: 7px 16px;
border: 2px solid #fff;
border-radius: 50%;
font-size: 40px;
color: #fff;
background: 0 0;
-webkit-transition: background .3s ease-in-out;
-moz-transition: background .3s ease-in-out;
transition: background .3s ease-in-out;
}
.btn-circle.btn-dark {
border: 2px solid #666;
color: #666;
}
.btn-circle:hover,
.btn-circle:focus {
outline: 0;
color: #fff;
background: rgba(255,255,255,.1);
}
.btn-circle.btn-dark :hover,
.btn-circle.btn-dark :focus {
outline: 0;
color: #999;
background: #fff;
}
.btn-circle.btn-dark :hover i,
.btn-circle.btn-dark :focus i{
color: #999;
}
.page-scroll .btn-circle i.animated {
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 1s;
-moz-transition-property: -moz-transform;
-moz-transition-duration: 1s;
}
.page-scroll .btn-circle:hover i.animated {
-webkit-animation-name: pulse;
-moz-animation-name: pulse;
-webkit-animation-duration: 1.5s;
-moz-animation-duration: 1.5s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-timing-function: linear;
}
@-webkit-keyframes pulse {
0 {
-webkit-transform: scale(1);
transform: scale(1);
}
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@-moz-keyframes pulse {
0 {
-moz-transform: scale(1);
transform: scale(1);
}
50% {
-moz-transform: scale(1.2);
transform: scale(1.2);
}
100% {
-moz-transform: scale(1);
transform: scale(1);
}
}
#text {
color: #fff;
background: #ffcc00;
}
#map {
height: 500px;
}
.btn-skin:hover,
.btn-skin:focus,
.btn-skin:active,
.btn-skin.active {
color: #fff;
background-color: #666;
border-color: #666;
}
.btn-default:hover,
.btn-default:focus {
border: 1px solid #28c3ab;
outline: 0;
color: #000;
background-color: #28c3ab;
}
.btn-huge {
padding: 25px;
font-size: 26px;
}
.banner-social-buttons {
margin-top: 0;
}
/* Media queries */
@media(min-width:767px) {
.navbar {
padding: 20px 0;
border-bottom: 0;
letter-spacing: 1px;
background: 0 0;
-webkit-transition: background .5s ease-in-out,padding .5s ease-in-out;
-moz-transition: background .5s ease-in-out,padding .5s ease-in-out;
transition: background .5s ease-in-out,padding .5s ease-in-out;
}
.top-nav-collapse {
padding: 0;
background-color: #000;
}
.navbar-custom.top-nav-collapse {
border-bottom: 1px solid rgba(255,255,255,.3);
}
.intro {
height: 100%;
padding: 0;
}
.brand-heading {
font-size: 100px;
}
.intro-text {
font-size: 25px;
}
}
@media (max-width:768px) {
.team.boxed-grey {
margin-bottom: 30px;
}
.boxed-grey {
margin-bottom: 30px;
}
}
@media (max-width:480px) {
.navbar-custom .nav.navbar-nav {
background-color: rgba(255,255,255,.4);
}
.navbar.navbar-custom.navbar-fixed-top {
margin-bottom: 30px;
}
.tp-banner-container {
padding-top:40px;
}
.page-scroll a.btn-circle {
width: 40px;
height: 40px;
margin-top: 10px;
padding: 7px 0;
border: 2px solid #fff;
border-radius: 50%;
font-size: 20px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB