Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
lovelyzhang | 6f936a3279 |
|
@ -53,7 +53,6 @@ build-iPhoneSimulator/
|
||||||
# JetBrain的忽略文件
|
# JetBrain的忽略文件
|
||||||
.idea/*
|
.idea/*
|
||||||
public/data/*
|
public/data/*
|
||||||
public/userpics/*
|
|
||||||
|
|
||||||
# rails的忽略文件
|
# rails的忽略文件
|
||||||
|
|
||||||
|
@ -101,9 +100,3 @@ bower.json
|
||||||
# Ignore Byebug command history file.
|
# Ignore Byebug command history file.
|
||||||
.byebug_history
|
.byebug_history
|
||||||
|
|
||||||
db/*.sqlite3
|
|
||||||
logs.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||||
|
You are allowed to:
|
||||||
|
1. Reorder generators
|
||||||
|
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="channel" /><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:plugin" /></GeneratorsGroup></Settings>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,193 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="RUBY_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="RailsFacetType" name="Ruby on Rails">
|
||||||
|
<configuration>
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="ModuleRunConfigurationManager">
|
||||||
|
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="RAILS_ENV" value="test" />
|
||||||
|
</envs>
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
|
||||||
|
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
|
||||||
|
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/components" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/public/system" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="arel (v7.1.4, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.6, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.11.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.14, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.9.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="nio4r (v1.2.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.8.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="puma (v3.6.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="railties (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rake (v11.3.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.7, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.22, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.3.12, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.3, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.4.0, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.4, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.1.5, rbenv: 2.3.1) [gem]" level="application" />
|
||||||
|
</component>
|
||||||
|
<component name="RModuleSettingsStorage">
|
||||||
|
<LOAD_PATH number="0" />
|
||||||
|
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.3.1" project-jdk-type="RUBY_SDK" />
|
||||||
|
</project>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
|
||||||
|
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
|
||||||
|
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
|
||||||
|
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs />
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
|
||||||
|
<module name="guoren" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="RAILS_ENV" value="test" />
|
||||||
|
</envs>
|
||||||
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||||
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||||
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||||
|
<COVERAGE_PATTERN ENABLED="true">
|
||||||
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||||
|
</COVERAGE_PATTERN>
|
||||||
|
</EXTENSION>
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
1
Gemfile
1
Gemfile
|
@ -27,7 +27,6 @@ gem 'jbuilder', '~> 2.5'
|
||||||
gem 'bcrypt', '~> 3.1.7'
|
gem 'bcrypt', '~> 3.1.7'
|
||||||
# will_paginate
|
# will_paginate
|
||||||
gem 'will_paginate', '~> 3.1.0'
|
gem 'will_paginate', '~> 3.1.0'
|
||||||
gem 'sendgrid-ruby'
|
|
||||||
|
|
||||||
# Use Capistrano for deployment
|
# Use Capistrano for deployment
|
||||||
# gem 'capistrano-rails', group: :development
|
# gem 'capistrano-rails', group: :development
|
||||||
|
|
|
@ -118,7 +118,6 @@ GEM
|
||||||
rb-fsevent (0.9.8)
|
rb-fsevent (0.9.8)
|
||||||
rb-inotify (0.9.7)
|
rb-inotify (0.9.7)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
ruby_http_client (3.0.0)
|
|
||||||
sass (3.4.22)
|
sass (3.4.22)
|
||||||
sass-rails (5.0.6)
|
sass-rails (5.0.6)
|
||||||
railties (>= 4.0.0, < 6)
|
railties (>= 4.0.0, < 6)
|
||||||
|
@ -126,8 +125,6 @@ GEM
|
||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
tilt (>= 1.1, < 3)
|
tilt (>= 1.1, < 3)
|
||||||
sendgrid-ruby (4.0.6)
|
|
||||||
ruby_http_client (~> 3.0.0)
|
|
||||||
spring (2.0.0)
|
spring (2.0.0)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
|
@ -180,7 +177,6 @@ DEPENDENCIES
|
||||||
rails (~> 5.0.0, >= 5.0.0.1)
|
rails (~> 5.0.0, >= 5.0.0.1)
|
||||||
rake
|
rake
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
sendgrid-ruby
|
|
||||||
spring
|
spring
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.0)
|
||||||
sqlite3
|
sqlite3
|
||||||
|
|
|
@ -68,14 +68,9 @@ class ChatController < ApplicationController
|
||||||
query_name = nil
|
query_name = nil
|
||||||
ok = false
|
ok = false
|
||||||
else
|
else
|
||||||
if query_name == @user.name
|
query_name = query_user.name
|
||||||
query_name = nil
|
query_pic = query_user.picurl
|
||||||
ok = false
|
ok = true
|
||||||
else
|
|
||||||
query_name = query_user.name
|
|
||||||
query_pic = query_user.picurl
|
|
||||||
ok = true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if all_user_names.include? query_name or query_name == @user.name
|
if all_user_names.include? query_name or query_name == @user.name
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
|
|
||||||
before_action :logged_in_user,except: [:new,:create,:forgetpasswd,:changepasswd]
|
|
||||||
@@user_pics_dir = "public/userpics"
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@user = User.new
|
@user = User.new
|
||||||
end
|
end
|
||||||
|
@ -24,6 +20,12 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
if @user.update_attributes(user_params)
|
||||||
|
flash[:success]="profile updated"
|
||||||
|
redirect_to @user
|
||||||
|
else
|
||||||
|
render 'edit'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +34,7 @@ class UsersController < ApplicationController
|
||||||
if useremail
|
if useremail
|
||||||
@user = User.find_by(email: useremail)
|
@user = User.find_by(email: useremail)
|
||||||
if !@user.nil?
|
if !@user.nil?
|
||||||
send_code @user
|
# send_code @user
|
||||||
flash[:success] = "验证码已发送至您的邮箱"
|
flash[:success] = "验证码已发送至您的邮箱"
|
||||||
redirect_to changepasswd_path(email: @user.email)
|
redirect_to changepasswd_path(email: @user.email)
|
||||||
else
|
else
|
||||||
|
@ -51,38 +53,14 @@ class UsersController < ApplicationController
|
||||||
@user = User.find_by(email: user_email)
|
@user = User.find_by(email: user_email)
|
||||||
if !@user.nil?
|
if !@user.nil?
|
||||||
render 'changepasswd'
|
render 'changepasswd'
|
||||||
else
|
|
||||||
flash[:danger] = "用户不存在"
|
|
||||||
redirect_to login_path
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
redirect_to login_path
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
result = check_change_params(params[:email], params[:verify_code], params[:password], params[:password_confirm])
|
render html: "hello"
|
||||||
if result
|
|
||||||
flash[:success]="密码更新成功"
|
|
||||||
else
|
|
||||||
flash[:danger]="密码更新失败"
|
|
||||||
end
|
|
||||||
redirect_to login_path
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def changeprofile
|
|
||||||
@user = current_user
|
|
||||||
result, user, err_string = check_change_profile_params(params[:user])
|
|
||||||
if result == false
|
|
||||||
flash[:danger] = err_string
|
|
||||||
else
|
|
||||||
pic_url = save_user_pic params[:user][:pic]
|
|
||||||
if pic_url.nil? == false
|
|
||||||
user[:picurl] = pic_url
|
|
||||||
end
|
|
||||||
@user.update_attributes(user)
|
|
||||||
end
|
|
||||||
redirect_to profile_path
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
@ -91,58 +69,15 @@ class UsersController < ApplicationController
|
||||||
:password_confirmation)
|
:password_confirmation)
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_change_profile_params user_params
|
|
||||||
if user_params.nil?
|
|
||||||
return false, nil, "修改参数为空"
|
|
||||||
end
|
|
||||||
if user_params[:username].length <= 0
|
|
||||||
return false, nil, "姓名错误"
|
|
||||||
end
|
|
||||||
user = Hash.new
|
|
||||||
user[:name] = user_params[:username]
|
|
||||||
user[:profession] = user_params[:profession]
|
|
||||||
user[:sexual] = user_params[:sexual]
|
|
||||||
return true, user, nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def save_user_pic pic
|
|
||||||
if pic.nil?
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
if !(File.directory? @@user_pics_dir)
|
|
||||||
FileUtils.mkdir_p(@@user_pics_dir)
|
|
||||||
end
|
|
||||||
ext = File.extname(pic.original_filename)
|
|
||||||
timestamp = Time.now.to_s
|
|
||||||
picname = Digest::MD5::hexdigest(pic.original_filename + timestamp) + ext
|
|
||||||
File.open(File.join(@@user_pics_dir, picname), 'wb') { |f| f.write(pic.read) }
|
|
||||||
save_name = File.join("userpics", picname)
|
|
||||||
return save_name
|
|
||||||
end
|
|
||||||
|
|
||||||
def send_code user
|
def send_code user
|
||||||
verify_code = rand(999999).to_s
|
verify_code = rand(999999).to_s
|
||||||
result = UserMailer.send_verify_code(user.email, verify_code).deliver_now
|
result = UserMailer.send_verify_code(user.email, verify_code).deliver_now
|
||||||
p result
|
p result
|
||||||
user.update_attribute(:verify_code, verify_code)
|
User.transaction do
|
||||||
end
|
user.verify_code = verify_code
|
||||||
|
user.save
|
||||||
|
end
|
||||||
|
|
||||||
def check_change_params(email, verify_code, password, password_confirmation)
|
|
||||||
if password != password_confirmation
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
user = User.find_by(email: email)
|
|
||||||
if user.nil?
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
if user.verify_code != verify_code
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
hold = Hash.new
|
|
||||||
hold[:password] = password
|
|
||||||
hold[:password_confirmation] = password_confirmation
|
|
||||||
user.update_attributes(hold)
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
module UsersHelper
|
module UsersHelper
|
||||||
def get_user_name_from_id user_id
|
def get_user_name_from_id user_id
|
||||||
user = User.find_by(id: user_id)
|
user = User.where(id: user_id)
|
||||||
return user.name if !user.nil?
|
return user.name if !user.empty?
|
||||||
end
|
|
||||||
|
|
||||||
def get_user_sexual user
|
|
||||||
user.sexual
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: "ucasguoren@heroku.com"
|
default from: 'from@example.com'
|
||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class UserMailer < ApplicationMailer
|
class UserMailer < ApplicationMailer
|
||||||
default from: "ucasguoren@heroku.com"
|
default from: "zy_lovestar@163.com"
|
||||||
|
|
||||||
def send_verify_code mail_address, code
|
def send_verify_code mail_address, code
|
||||||
@verify_code = code
|
@verify_code = code
|
||||||
|
|
|
@ -2,9 +2,7 @@ class User < ApplicationRecord
|
||||||
before_save :default_values
|
before_save :default_values
|
||||||
|
|
||||||
def default_values
|
def default_values
|
||||||
if self.picurl.nil?
|
self.picurl = 'images/avatars/default/avatar.png'
|
||||||
self.picurl = 'images/avatars/default/avatar.png'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user', dependent: :destroy
|
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user', dependent: :destroy
|
||||||
|
@ -24,6 +22,4 @@ class User < ApplicationRecord
|
||||||
has_secure_password
|
has_secure_password
|
||||||
validates :password, presence: true, length: {minimum: 6}, allow_nil: true
|
validates :password, presence: true, length: {minimum: 6}, allow_nil: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="pull-right" href="/forgetpasswd">忘记密码?</a>
|
<a class="pull-right" href="/forgetpasswd">忘记密码?</a>
|
||||||
<!--<div class="text-left">-->
|
<div class="text-left">
|
||||||
<!--<label class="checkbox"><input type="checkbox" name="remember"><span>记住我</span></label>-->
|
<label class="checkbox"><input type="checkbox" name="remember"><span>记住我</span></label>
|
||||||
<!--</div>-->
|
</div>
|
||||||
<input class="btn btn-lg btn-primary btn-block" type="submit" value="登陆">
|
<input class="btn btn-lg btn-primary btn-block" type="submit" value="登陆">
|
||||||
<% end %>
|
<% end %>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
success: function (data, textStatus, jqXHR) {
|
success: function (data, textStatus, jqXHR) {
|
||||||
//console.log(data["total_num"]);
|
//console.log(data["total_num"]);
|
||||||
var engage_people = data["total_num"];
|
var engage_people = data["total_num"];
|
||||||
var show_text = "已有" + engage_people + "人参加该活动" + '\n' + data["total_names"] + "参加了活动";
|
var show_text = "已有" + engage_people + "人参加该活动";
|
||||||
activity.text("取消报名");
|
activity.text("取消报名");
|
||||||
micropost.find(".activity-detail").text(show_text);
|
micropost.find(".activity-detail").text(show_text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="activity-details" hidden>
|
<div class="activity-details" hidden>
|
||||||
<% if micro_post["type"] == "组团信息" %>
|
<% if micro_post["type"] != "新鲜事" %>
|
||||||
<div class="widget-container fluid-height">
|
<div class="widget-container fluid-height">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<i class="icon-align-center"> 活动详情 </i>
|
<i class="icon-align-center"> 活动详情 </i>
|
||||||
|
@ -100,20 +100,19 @@
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<i class="icon-mail-forward"> 评论 </i>
|
<i class="icon-mail-forward"> 评论 </i>
|
||||||
</div>
|
</div>
|
||||||
<div class="widget-content fluid-height">
|
<% micro_post["comments"].each do |comment| %>
|
||||||
<ul>
|
<div class="widget-content fluid-height">
|
||||||
<% micro_post["comments"].each do |comment| %>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<a class="user-name"><%= get_user_name_from_id(comment.user_id) %></a><em></em>
|
<a class="user-name"><%= get_user_name_from_id comment.user_id %></a><em></em>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p><%= comment.content %></p>
|
<p>comment.content</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</ul>
|
||||||
<% end %>
|
</div>
|
||||||
</ul>
|
<% end %>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="text-center alert-info">暂无评论</p>
|
<p class="text-center alert-info">暂无评论</p>
|
||||||
|
@ -126,99 +125,120 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var pic_num = 0; // 用来动态生成span,upfile的id
|
var pic_num = 0,pic_maxnum = 5; // 用来动态生成span,upfile的id,一次上传图片数量接口
|
||||||
function addAttachmentToList() {
|
|
||||||
if (findAttachment(event.srcElement.value)) return; //如果此文档已在图片列表中则不再添加
|
function addAttachmentToList()
|
||||||
if (extractFileName(event.srcElement.value)) {
|
{
|
||||||
|
if (findAttachment(event.srcElement.value)){
|
||||||
|
|
||||||
|
var o = G('pics').getElementsByTagName('input');
|
||||||
|
var len = o.length-1;
|
||||||
|
G('pics').removeChild(o[len]);
|
||||||
|
return;
|
||||||
|
}; //如果此文档已在图片列表中则不再添加
|
||||||
|
if (extractFileName(event.srcElement.value)){
|
||||||
// 动态创建图片信息栏并添加到图片列表中
|
// 动态创建图片信息栏并添加到图片列表中
|
||||||
var span = document.createElement('span');
|
var span = document.createElement('span');
|
||||||
span.id = '_attachment' + pic_num;
|
span.id = '_attachment' + pic_num;
|
||||||
span.innerHTML = extractFileName(event.srcElement.value) +
|
span.innerHTML = extractFileName(event.srcElement.value) + ' <a href="javascript:delAttachment(' + (pic_num++) + ')">删除</a><br/>';
|
||||||
' <a href="javascript:delAttachment(' + (pic_num++) + ')">删除</a><br/>';
|
|
||||||
span.title = event.srcElement.value;
|
span.title = event.srcElement.value;
|
||||||
G('attachmentList').appendChild(span);
|
G('attachmentList').appendChild(span);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示图片列表并变换添加图片按钮文本
|
// 显示图片列表并变换添加图片按钮文本
|
||||||
if (G('attachmentList').style.display == 'none') {
|
if (G('attachmentList').style.display == 'none')
|
||||||
|
{
|
||||||
G('btnAdd').value = '继续添加';
|
G('btnAdd').value = '继续添加';
|
||||||
G('attachmentList').style.display = '';
|
G('attachmentList').style.display = '';
|
||||||
G('btnClear').style.display = '';
|
G('btnClear').style.display = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
G('total').innerText = '当前选择上传' + G('attachmentList').childNodes.length + '个图片';
|
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectAttachment() {
|
function selectAttachment()
|
||||||
|
{
|
||||||
// 先清除无效动态生成的多余upfile
|
// 先清除无效动态生成的多余upfile
|
||||||
|
|
||||||
cleanInvalidUpfile();
|
cleanInvalidUpfile();
|
||||||
|
|
||||||
// 动态创建上传控件并与span对应
|
if(pic_num < pic_maxnum ) {//图片数量控制
|
||||||
var upfile = '<input type="file" style="display:none" multiple name="pictures[]" onchange="addAttachmentToList();" id="_upfile' + pic_num + '">';
|
|
||||||
G('pics').insertAdjacentHTML('beforeEnd', upfile);
|
var upfile = '<input type="file" style="display:none" onchange="addAttachmentToList();" id="_upfile'+pic_num+'">';// 动态创建上传控件并与span对应
|
||||||
G('_upfile' + pic_num).click();
|
G('pics').insertAdjacentHTML('beforeEnd', upfile);
|
||||||
|
G('_upfile'+pic_num).click();
|
||||||
|
}
|
||||||
|
else alert("一次只能上传"+pic_maxnum+"张图片!");
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractFileName(fn) {
|
//判断图片格式
|
||||||
|
function extractFileName(fn)
|
||||||
|
{
|
||||||
var index = fn.substr(fn.lastIndexOf('.')).toLowerCase();
|
var index = fn.substr(fn.lastIndexOf('.')).toLowerCase();
|
||||||
if (index == '.png' || index == '.jpg' || index == '.jpeg') {
|
if (index ==".png"||index ==".jpg"||index ==".jpeg"){
|
||||||
return fn.substr(fn.lastIndexOf('\\') + 1);
|
return fn.substr(fn.lastIndexOf('\\')+1);
|
||||||
}
|
}
|
||||||
else {
|
else{
|
||||||
alert('请上传.png或.jpg格式的图片!');
|
alert("请上传png或jpg格式的图片!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function findAttachment(fn) {
|
function findAttachment(fn)
|
||||||
|
{
|
||||||
var o = G('attachmentList').getElementsByTagName('span');
|
var o = G('attachmentList').getElementsByTagName('span');
|
||||||
for (var i = 0; i < o.length; i++)
|
for(var i=0;i<o.length;i++)
|
||||||
if (o[i].title == fn) return true;
|
if (o[i].title == fn) return true;
|
||||||
return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function delAttachment(id) {
|
function delAttachment(id)
|
||||||
G('attachmentList').removeChild(G('_attachment' + id));
|
{
|
||||||
G('pics').removeChild(G('_upfile' + id));
|
G('attachmentList').removeChild(G('_attachment'+id));
|
||||||
|
G('pics').removeChild(G('_upfile'+id));
|
||||||
// 当图片列表为空则不显示并且变化添加图片按钮文本
|
// 当图片列表为空则不显示并且变化添加图片按钮文本
|
||||||
if (G('attachmentList').childNodes.length == 0) {
|
if (G('attachmentList').childNodes.length == 0)
|
||||||
|
{
|
||||||
G('btnAdd').value = '添加图片';
|
G('btnAdd').value = '添加图片';
|
||||||
G('attachmentList').style.display = 'none';
|
G('attachmentList').style.display = 'none';
|
||||||
G('btnClear').style.display = 'none';
|
G('btnClear').style.display = 'none';
|
||||||
}
|
}
|
||||||
|
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
|
||||||
G('total').innerText = '当前选择上传' + G('attachmentList').childNodes.length + '个图片';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanInvalidUpfile() {
|
function cleanInvalidUpfile()
|
||||||
var o = document.body.getElementsByTagName('input');
|
{
|
||||||
for (var i = o.length - 1; i >= 0; i--)
|
var o = G('pics').getElementsByTagName('input');
|
||||||
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0) {
|
var len = o.length-1;
|
||||||
if (!G('_attachment' + o[i].id.substr(7)))
|
for(var i=o.len;i>=0;i--){
|
||||||
G('pics').removeChild(o[i]);
|
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
|
||||||
|
{
|
||||||
|
if (!G('_attachment'+o[i].id.substr(7)))
|
||||||
|
G('pics').removeChild(o[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearAttachment() {
|
function clearAttachment()
|
||||||
|
{
|
||||||
var o = G('attachmentList').childNodes;
|
var o = G('attachmentList').childNodes;
|
||||||
for (var i = o.length - 1; i >= 0; i--)
|
for(var i=o.length-1;i>=0;i--)
|
||||||
G('attachmentList').removeChild(o[i]);
|
G('attachmentList').removeChild(o[i]);
|
||||||
|
|
||||||
o = document.body.getElementsByTagName('input');
|
o = document.body.getElementsByTagName('input');
|
||||||
for (var i = o.length - 1; i >= 0; i--)
|
for(var i=o.length-1;i>=0;i--)
|
||||||
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0) {
|
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
|
||||||
document.body.removeChild(o[i]);
|
{
|
||||||
}
|
G('pics').removeChild(o[i]);
|
||||||
|
}
|
||||||
|
|
||||||
G('btnAdd').value = '添加图片';
|
G('btnAdd').value = '添加图片';
|
||||||
G('attachmentList').style.display = 'none';
|
G('attachmentList').style.display = 'none';
|
||||||
G('btnClear').style.display = 'none';
|
G('btnClear').style.display = 'none';
|
||||||
G('total').innerText = '当前选择上传0个图片';
|
G('total').innerText = '当前选择上传0个图片';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function G(id)
|
||||||
|
{
|
||||||
function G(id) {
|
|
||||||
return document.getElementById(id);
|
return document.getElementById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,44 +4,79 @@
|
||||||
<div class="login-wrapper">
|
<div class="login-wrapper">
|
||||||
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
|
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
|
||||||
|
|
||||||
<%= form_tag("/changepasswd", method: "post") do %>
|
<%= form_for @user, url: {action: "changepasswd"} do |f| %>
|
||||||
|
<%= render 'shared/error_messages', object: f.object %>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
|
<span class="input-group-addon"><i class="icon-ok"></i></span>
|
||||||
placeholder="请输入邮箱地址"
|
<%= text_field_tag("verif_code", class: 'form-control', placeholder: "请输入邮箱验证码") %>
|
||||||
name="email"
|
|
||||||
type="email">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="icon-lock"></i></span><input class="form-control"
|
<span class="input-group-addon"><i class="icon-envelope"></i></span>
|
||||||
placeholder="请输入邮箱验证码"
|
<%= f.email_field :email, class: 'form-control', placeholder: "请输入邮箱" %>
|
||||||
name="verify_code"
|
|
||||||
type="number">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
|
<span class="input-group-addon"><i class="icon-ok"></i></span>
|
||||||
placeholder="请输入新密码"
|
<%= f.password_field :password, class: 'form-control', placeholder: "请输入密码" %>
|
||||||
name="password"
|
|
||||||
type="password">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
|
|
||||||
placeholder="请再次输入新密码"
|
|
||||||
name="password_confirm"
|
|
||||||
type="password">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag "重置密码", class: "btn btn-primary btn-block" %>
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon"><i class="icon-ok"></i></span>
|
||||||
|
<%= f.password_field :password_confirmation, class: 'form-control', placeholder: "请再次输入密码" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= f.submit "重置密码", class: "btn btn-primary btn-block" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<!--<%= form_tag("/changepasswd", method: "post") do %>-->
|
||||||
|
|
||||||
|
<!--<div class="form-group">-->
|
||||||
|
<!--<div class="input-group">-->
|
||||||
|
<!--<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"-->
|
||||||
|
<!--placeholder="请输入邮箱地址"-->
|
||||||
|
<!--name="email"-->
|
||||||
|
<!--type="email">-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<div class="form-group">-->
|
||||||
|
<!--<div class="input-group">-->
|
||||||
|
<!--<span class="input-group-addon"><i class="icon-envelope-alt"></i></span><input class="form-control"-->
|
||||||
|
<!--placeholder="请输入邮箱验证码"-->
|
||||||
|
<!--name="verify_code"-->
|
||||||
|
<!--type="number">-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<div class="form-group">-->
|
||||||
|
<!--<div class="input-group">-->
|
||||||
|
<!--<span class="input-group-addon"><i class="icon-lock"></i></span><input class="form-control"-->
|
||||||
|
<!--placeholder="请输入新密码"-->
|
||||||
|
<!--name="password"-->
|
||||||
|
<!--type="password">-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--<div class="form-group">-->
|
||||||
|
<!--<div class="input-group">-->
|
||||||
|
<!--<span class="input-group-addon"><i class="icon-lock"></i></span><input class="form-control"-->
|
||||||
|
<!--placeholder="请再次输入新密码"-->
|
||||||
|
<!--name="password_confirm"-->
|
||||||
|
<!--type="password">-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<%= submit_tag "重置密码", class: "btn btn-primary btn-block" %>-->
|
||||||
|
<!--
|
||||||
|
<% end %>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -6,30 +6,29 @@
|
||||||
|
|
||||||
<%= render 'layouts/nav' %>
|
<%= render 'layouts/nav' %>
|
||||||
|
|
||||||
<%= form_tag("/changeprofile", method: "post", class: "form-horizontal", id: "profile", enctype: "multipart/form-data") do %>
|
<form action="/baidu" class="form-horizontal" id="profile" method="post">
|
||||||
|
<div class="row">
|
||||||
<div class="row">
|
<div class="widget-container">
|
||||||
<div class="widget-container">
|
<div class="heading">
|
||||||
<div class="heading">
|
<i class="icon-user"></i>个人设置
|
||||||
<i class="icon-user"></i>个人设置
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="widget-container">
|
<div class="row">
|
||||||
<div class="heading">
|
<div class="widget-container">
|
||||||
<i class="icon-user"></i>用户图像
|
<div class="heading">
|
||||||
</div>
|
<i class="icon-user"></i>用户图像
|
||||||
<div class="col-md-12 text-center">
|
</div>
|
||||||
<div class="fileupload fileupload-new" data-provides="fileupload">
|
<div class="col-md-12 text-center">
|
||||||
<div class="fileupload-new img-thumbnail" style="width: 200px; height: 200px;">
|
<div class="fileupload fileupload-new" data-provides="fileupload">
|
||||||
<!--原照片-->
|
<div class="fileupload-new img-thumbnail" style="width: 200px; height: 200px;">
|
||||||
<img src="<%= @user.picurl %>">
|
<!--原照片-->
|
||||||
</div>
|
<img src="/images/avatars/default/avatar.png">
|
||||||
<div class="fileupload-preview fileupload-exists img-thumbnail"
|
</div>
|
||||||
style="width: 200px; max-height: 200px">
|
<div class="fileupload-preview fileupload-exists img-thumbnail"
|
||||||
</div>
|
style="width: 200px; max-height: 200px">
|
||||||
<div class="padded">
|
</div>
|
||||||
|
<div class="padded">
|
||||||
<span class="btn btn-default btn-file">
|
<span class="btn btn-default btn-file">
|
||||||
<span
|
<span
|
||||||
class="fileupload-new">选择照片
|
class="fileupload-new">选择照片
|
||||||
|
@ -38,60 +37,72 @@
|
||||||
class="fileupload-exists">
|
class="fileupload-exists">
|
||||||
重新选择
|
重新选择
|
||||||
</span>
|
</span>
|
||||||
<input type="file" name="user[pic]">
|
<input type="file" name="image_file">
|
||||||
</span>
|
</span>
|
||||||
<a class="btn btn-default fileupload-exists" data-dismiss="fileupload">清除照片</a>
|
<a
|
||||||
</div>
|
class="btn btn-default fileupload-exists" data-dismiss="fileupload"
|
||||||
|
href="#">清除照片
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="widget-container fluid-height clearfix">
|
<div class="row">
|
||||||
<div class="heading">
|
<div class="widget-container fluid-height clearfix">
|
||||||
<i class="icon-reorder"></i>基本信息
|
<div class="heading">
|
||||||
|
<i class="icon-reorder"></i>基本信息
|
||||||
|
</div>
|
||||||
|
<div class="padded">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-2">姓名</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<input class="form-control" placeholder="Text" type="text">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padded">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-2">姓名</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input class="form-control" placeholder="请输入您的姓名" value="<%= @user.name %>"
|
|
||||||
type="text" name="user[username]">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-2">专业</label>
|
<label class="control-label col-md-2">专业</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<input class="form-control" placeholder="请输入您的专业" value="<%= @user.profession %>"
|
<input class="form-control" placeholder="Text" type="text">
|
||||||
type="text" name="user[profession]">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-md-2">性别</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<label class="radio-inline"><input name="user[sexual]" type="radio" value="1"
|
|
||||||
<% if get_user_sexual(@user) == true %>checked
|
|
||||||
<% end %>
|
|
||||||
><span>男</span></label>
|
|
||||||
<label class="radio-inline"><input name="user[sexual]" type="radio" value="0"
|
|
||||||
<% if get_user_sexual(@user) == false %>checked
|
|
||||||
<% end %>
|
|
||||||
><span>女</span></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-12 text-center">
|
|
||||||
<button class="btn btn-primary" type="submit">修改</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-2">学院</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<select class="form-control">
|
||||||
|
<option value="Category 1">Option 1</option>
|
||||||
|
<option value="Category 2">Option 2</option>
|
||||||
|
<option value="Category 3">Option 3</option>
|
||||||
|
<option value="Category 4">Option 4</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-2">性别</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<label class="radio-inline"><input name="optionsRadios" type="radio"
|
||||||
|
value="1"><span>男</span></label><label
|
||||||
|
class="radio-inline"><input name="optionsRadios"
|
||||||
|
type="radio"
|
||||||
|
value="0"><span>女</span></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<button class="btn btn-primary" type="submit">修改</button>
|
||||||
|
<button class="btn btn-default-outline">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
33
code.bak
33
code.bak
|
@ -1,33 +0,0 @@
|
||||||
<%= form_for @user, url: {action: "changepasswd"} do |f| %>
|
|
||||||
<%= render 'shared/error_messages', object: f.object %>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-addon"><i class="icon-lock"></i></span>
|
|
||||||
<input class="form-control" placeholder="请输入邮箱验证码" name="verify_code" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-addon"><i class="icon-envelope"></i></span>
|
|
||||||
<%= f.email_field :email, class: 'form-control', placeholder: "请输入邮箱" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-addon"><i class="icon-ok"></i></span>
|
|
||||||
<%= f.password_field :password, class: 'form-control', placeholder: "请输入密码" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-addon"><i class="icon-ok"></i></span>
|
|
||||||
<%= f.password_field :password_confirmation, class: 'form-control', placeholder: "请再次输入密码" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= f.submit "重置密码", class: "btn btn-primary btn-block" %>
|
|
||||||
<% end %>
|
|
|
@ -12,5 +12,15 @@ module GuorenPro
|
||||||
# Application configuration should go into files in config/initializers
|
# Application configuration should go into files in config/initializers
|
||||||
# -- all .rb files in that directory are automatically loaded.
|
# -- all .rb files in that directory are automatically loaded.
|
||||||
config.time_zone = 'Beijing'
|
config.time_zone = 'Beijing'
|
||||||
|
config.action_mailer.delivery_method = :smtp
|
||||||
|
config.action_mailer.raise_delivery_errors = true
|
||||||
|
config.action_mailer.smtp_settings = {
|
||||||
|
:address => "smtp.163.com",
|
||||||
|
:port => 25,
|
||||||
|
:user_name => "zy_lovestar@163.com",
|
||||||
|
:password => "zy_lovestar+=*",
|
||||||
|
:authentication => "plain",
|
||||||
|
:enable_starttls_auto => true
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,7 @@ Rails.application.configure do
|
||||||
|
|
||||||
config.cache_store = :memory_store
|
config.cache_store = :memory_store
|
||||||
config.public_file_server.headers = {
|
config.public_file_server.headers = {
|
||||||
'Cache-Control' => 'public, max-age=172800'
|
'Cache-Control' => 'public, max-age=172800'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
@ -52,18 +52,14 @@ Rails.application.configure do
|
||||||
# routes, locales, etc. This feature depends on the listen gem.
|
# routes, locales, etc. This feature depends on the listen gem.
|
||||||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||||
|
|
||||||
config.action_mailer.raise_delivery_errors = true
|
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
host = 'ucasguoren.herokuapp.com'
|
|
||||||
config.action_mailer.default_url_options = {host: host}
|
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
:address => "smtp.sendgrid.net",
|
:address => "smtp.163.com",
|
||||||
:port => 587,
|
:port => 25,
|
||||||
:user_name => "app61271187@heroku.com",
|
:user_name => "zy_lovestar@163.com",
|
||||||
:password => "5cysx5kw9899",
|
:password => "zy_lovestar+=*",
|
||||||
:authentication => "plain",
|
:authentication => "plain",
|
||||||
:domain => 'herokuapp.com',
|
|
||||||
:enable_starttls_auto => true
|
:enable_starttls_auto => true
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,19 +83,4 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Do not dump schema after migrations.
|
# Do not dump schema after migrations.
|
||||||
config.active_record.dump_schema_after_migration = false
|
config.active_record.dump_schema_after_migration = false
|
||||||
|
|
||||||
config.action_mailer.raise_delivery_errors = true
|
|
||||||
config.action_mailer.delivery_method = :smtp
|
|
||||||
host = 'ucasguoren.herokuapp.com'
|
|
||||||
config.action_mailer.default_url_options = {host: host}
|
|
||||||
config.action_mailer.raise_delivery_errors = true
|
|
||||||
config.action_mailer.smtp_settings = {
|
|
||||||
:address => "smtp.sendgrid.net",
|
|
||||||
:port => 587,
|
|
||||||
:user_name => ENV['SENDGRID_USERNAME'],
|
|
||||||
:password => ENV['SENDGRID_PASSWORD'],
|
|
||||||
:authentication => "plain",
|
|
||||||
:domain => 'herokuapp.com',
|
|
||||||
:enable_starttls_auto => true
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,8 +10,6 @@ Rails.application.routes.draw do
|
||||||
get '/profile', to: 'users#edit'
|
get '/profile', to: 'users#edit'
|
||||||
get '/forgetpasswd', to: 'users#forgetpasswd'
|
get '/forgetpasswd', to: 'users#forgetpasswd'
|
||||||
get '/changepasswd', to: 'users#changepasswd'
|
get '/changepasswd', to: 'users#changepasswd'
|
||||||
post '/changepasswd', to: 'users#changepasswd'
|
|
||||||
post '/changeprofile', to: 'users#changeprofile'
|
|
||||||
|
|
||||||
get '/main', to: 'main#show'
|
get '/main', to: 'main#show'
|
||||||
get '/activity', to: 'main#activity'
|
get '/activity', to: 'main#activity'
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +0,0 @@
|
||||||
class RemoveAcademyFromUser < ActiveRecord::Migration[5.0]
|
|
||||||
def change
|
|
||||||
remove_column :users, :academy, :string
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170114044144) do
|
ActiveRecord::Schema.define(version: 20170102130110) do
|
||||||
|
|
||||||
create_table "comments", force: :cascade do |t|
|
create_table "comments", force: :cascade do |t|
|
||||||
t.string "content"
|
t.string "content"
|
||||||
|
@ -49,6 +49,7 @@ ActiveRecord::Schema.define(version: 20170114044144) do
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "picurl"
|
t.string "picurl"
|
||||||
t.string "profession"
|
t.string "profession"
|
||||||
|
t.string "academy"
|
||||||
t.boolean "sexual"
|
t.boolean "sexual"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,31 @@
|
||||||
|
# 张裕
|
||||||
|
------------------------
|
||||||
|
分页功能 张裕 完成
|
||||||
|
简单的组团、失物招领动态
|
||||||
|
- 失物招领自动联系人!
|
||||||
|
- 网站整体时间修改 完成
|
||||||
|
组团的人数 刷新后自增 bug
|
||||||
|
用户个人动态的评论显示
|
||||||
|
用户个人动态的删除
|
||||||
|
用户不能自己报名自己的活动
|
||||||
|
|
||||||
|
# 朱京乔
|
||||||
|
------------------------
|
||||||
|
多图上传 朱京乔
|
||||||
|
多图上传bug
|
||||||
|
传同样的照片 虽然链接上不显示 但是传了2次
|
||||||
|
|
||||||
|
# 尹吉宪
|
||||||
|
------------------------
|
||||||
|
用户个人资料修改 尹
|
||||||
|
忘记密码功能的实现 尹
|
||||||
|
|
||||||
|
# 白芳洲
|
||||||
|
------------------------
|
||||||
|
测试 白
|
||||||
|
整体代码检测与bug捕捉 白
|
||||||
|
|
||||||
|
# 倪令斌
|
||||||
|
-------------------------
|
||||||
|
部署 倪
|
||||||
|
公告 倪
|
Loading…
Reference in New Issue