new project
|
@ -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="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>
|
|
@ -0,0 +1,192 @@
|
||||||
|
<?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" />
|
||||||
|
</component>
|
||||||
|
<component name="RModuleSettingsStorage">
|
||||||
|
<LOAD_PATH number="0" />
|
||||||
|
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||||
|
<OptionsSetting value="true" id="Add" />
|
||||||
|
<OptionsSetting value="true" id="Remove" />
|
||||||
|
<OptionsSetting value="true" id="Checkout" />
|
||||||
|
<OptionsSetting value="true" id="Update" />
|
||||||
|
<OptionsSetting value="true" id="Status" />
|
||||||
|
<OptionsSetting value="true" id="Edit" />
|
||||||
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.3.1" project-jdk-type="RUBY_SDK" />
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/guoren.iml" filepath="$PROJECT_DIR$/.idea/guoren.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,330 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="4563abd9-0b8d-4853-8d0b-b3f103aec2dd" name="Default" comment="">
|
||||||
|
<change type="DELETED" beforePath="$PROJECT_DIR$/test.txt" afterPath="" />
|
||||||
|
</list>
|
||||||
|
<ignored path="guoren.iws" />
|
||||||
|
<ignored path=".idea/workspace.xml" />
|
||||||
|
<ignored path="$PROJECT_DIR$/.bundle/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/components/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/public/system/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/vendor/bundle/" />
|
||||||
|
<ignored path=".idea/dataSources.local.xml" />
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="TRACKING_ENABLED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="CreatePatchCommitExecutor">
|
||||||
|
<option name="PATCH_PATH" value="" />
|
||||||
|
</component>
|
||||||
|
<component name="FavoritesManager">
|
||||||
|
<favorites_list name="guoren" />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf>
|
||||||
|
<file leaf-file-name="Gemfile.lock" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="147">
|
||||||
|
<caret line="90" column="13" selection-start-line="90" selection-start-column="12" selection-end-line="90" selection-end-column="13" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||||
|
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||||
|
<component name="JsGulpfileManager">
|
||||||
|
<detection-done>true</detection-done>
|
||||||
|
<sorting>DEFINITION_ORDER</sorting>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds">
|
||||||
|
<option name="y" value="23" />
|
||||||
|
<option name="width" value="1440" />
|
||||||
|
<option name="height" value="808" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||||
|
<OptionsSetting value="true" id="Add" />
|
||||||
|
<OptionsSetting value="true" id="Remove" />
|
||||||
|
<OptionsSetting value="true" id="Checkout" />
|
||||||
|
<OptionsSetting value="true" id="Update" />
|
||||||
|
<OptionsSetting value="true" id="Status" />
|
||||||
|
<OptionsSetting value="true" id="Edit" />
|
||||||
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||||
|
<flattenPackages />
|
||||||
|
<showMembers />
|
||||||
|
<showModules />
|
||||||
|
<showLibraryContents />
|
||||||
|
<hideEmptyPackages />
|
||||||
|
<abbreviatePackageNames />
|
||||||
|
<autoscrollToSource />
|
||||||
|
<autoscrollFromSource />
|
||||||
|
<sortByType />
|
||||||
|
<manualOrder />
|
||||||
|
<foldersAlwaysOnTop value="true" />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="guoren" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="guoren" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="guoren" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
<pane id="Scope" />
|
||||||
|
<pane id="Scratches" />
|
||||||
|
<pane id="RailsProjectView" />
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">
|
||||||
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||||
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="Rails.Development: guoren">
|
||||||
|
<configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
|
||||||
|
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||||
|
<module name="" />
|
||||||
|
<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>
|
||||||
|
<configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
|
||||||
|
<module name="" />
|
||||||
|
<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="" />
|
||||||
|
<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="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||||
|
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
||||||
|
<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="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>
|
||||||
|
<list size="4">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="Rake.test: guoren" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="Rake.spec: guoren" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="Rails.Production: guoren" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="Rails.Development: guoren" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="ShelveChangesManager" show_recycled="false">
|
||||||
|
<option name="remove_strategy" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="4563abd9-0b8d-4853-8d0b-b3f103aec2dd" name="Default" comment="" />
|
||||||
|
<created>1482408182630</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1482408182630</updated>
|
||||||
|
<workItem from="1482408184281" duration="75000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TimeTrackingManager">
|
||||||
|
<option name="totallyTimeSpent" value="75000" />
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="0" y="23" width="1440" height="808" 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.24964234" sideWeight="0.5" order="0" 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.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32884097" sideWeight="0.5" order="-1" 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.33" sideWeight="0.5" order="-1" 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="-1" 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.33" 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="1" 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.32884097" sideWeight="0.5" order="-1" 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.33" sideWeight="0.5" order="-1" 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="4" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Hierarchy" active="false" anchor="right" 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="combo" />
|
||||||
|
<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="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Find" 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="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Run" 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="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="Vcs.Log.UiProperties">
|
||||||
|
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||||
|
<collection />
|
||||||
|
</option>
|
||||||
|
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||||
|
<collection />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
<option name="myLimit" value="2678400000" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager />
|
||||||
|
<watches-manager />
|
||||||
|
</component>
|
||||||
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="147">
|
||||||
|
<caret line="90" column="13" selection-start-line="90" selection-start-column="12" selection-end-line="90" selection-end-column="13" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
</project>
|
7
Gemfile
|
@ -1,11 +1,9 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||||
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
||||||
# Use sqlite3 as the database for Active Record
|
# Use sqlite3 as the database for Active Record
|
||||||
gem 'sqlite3'
|
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 3.0'
|
gem 'puma', '~> 3.0'
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
|
@ -32,6 +30,7 @@ gem 'bcrypt', '~> 3.1.7'
|
||||||
# gem 'capistrano-rails', group: :development
|
# gem 'capistrano-rails', group: :development
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
gem 'sqlite3'
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
gem 'byebug', platform: :mri
|
gem 'byebug', platform: :mri
|
||||||
end
|
end
|
||||||
|
@ -45,5 +44,9 @@ group :development do
|
||||||
gem 'spring-watcher-listen', '~> 2.0.0'
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# group :production do
|
||||||
|
# gem 'pg','~> 0.18.4'
|
||||||
|
# end
|
||||||
|
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||||
|
|
|
@ -173,4 +173,4 @@ DEPENDENCIES
|
||||||
web-console
|
web-console
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.12.5
|
1.13.6
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
actioncable (5.0.0.1)
|
||||||
|
actionpack (= 5.0.0.1)
|
||||||
|
nio4r (~> 1.2)
|
||||||
|
websocket-driver (~> 0.6.1)
|
||||||
|
actionmailer (5.0.0.1)
|
||||||
|
actionpack (= 5.0.0.1)
|
||||||
|
actionview (= 5.0.0.1)
|
||||||
|
activejob (= 5.0.0.1)
|
||||||
|
mail (~> 2.5, >= 2.5.4)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
actionpack (5.0.0.1)
|
||||||
|
actionview (= 5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
rack (~> 2.0)
|
||||||
|
rack-test (~> 0.6.3)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
|
actionview (5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
builder (~> 3.1)
|
||||||
|
erubis (~> 2.7.0)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
|
activejob (5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
globalid (>= 0.3.6)
|
||||||
|
activemodel (5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
activerecord (5.0.0.1)
|
||||||
|
activemodel (= 5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
arel (~> 7.0)
|
||||||
|
activesupport (5.0.0.1)
|
||||||
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
|
i18n (~> 0.7)
|
||||||
|
minitest (~> 5.1)
|
||||||
|
tzinfo (~> 1.1)
|
||||||
|
arel (7.1.4)
|
||||||
|
bcrypt (3.1.11)
|
||||||
|
builder (3.2.2)
|
||||||
|
byebug (9.0.6)
|
||||||
|
coffee-rails (4.2.1)
|
||||||
|
coffee-script (>= 2.2.0)
|
||||||
|
railties (>= 4.0.0, < 5.2.x)
|
||||||
|
coffee-script (2.4.1)
|
||||||
|
coffee-script-source
|
||||||
|
execjs
|
||||||
|
coffee-script-source (1.11.1)
|
||||||
|
concurrent-ruby (1.0.2)
|
||||||
|
debug_inspector (0.0.2)
|
||||||
|
erubis (2.7.0)
|
||||||
|
execjs (2.7.0)
|
||||||
|
ffi (1.9.14)
|
||||||
|
globalid (0.3.7)
|
||||||
|
activesupport (>= 4.1.0)
|
||||||
|
i18n (0.7.0)
|
||||||
|
jbuilder (2.6.0)
|
||||||
|
activesupport (>= 3.0.0, < 5.1)
|
||||||
|
multi_json (~> 1.2)
|
||||||
|
jquery-rails (4.2.1)
|
||||||
|
rails-dom-testing (>= 1, < 3)
|
||||||
|
railties (>= 4.2.0)
|
||||||
|
thor (>= 0.14, < 2.0)
|
||||||
|
listen (3.0.8)
|
||||||
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
loofah (2.0.3)
|
||||||
|
nokogiri (>= 1.5.9)
|
||||||
|
mail (2.6.4)
|
||||||
|
mime-types (>= 1.16, < 4)
|
||||||
|
method_source (0.8.2)
|
||||||
|
mime-types (3.1)
|
||||||
|
mime-types-data (~> 3.2015)
|
||||||
|
mime-types-data (3.2016.0521)
|
||||||
|
mini_portile2 (2.1.0)
|
||||||
|
minitest (5.9.1)
|
||||||
|
multi_json (1.12.1)
|
||||||
|
nio4r (1.2.1)
|
||||||
|
nokogiri (1.6.8.1)
|
||||||
|
mini_portile2 (~> 2.1.0)
|
||||||
|
pg (0.18.4)
|
||||||
|
puma (3.6.2)
|
||||||
|
rack (2.0.1)
|
||||||
|
rack-test (0.6.3)
|
||||||
|
rack (>= 1.0)
|
||||||
|
rails (5.0.0.1)
|
||||||
|
actioncable (= 5.0.0.1)
|
||||||
|
actionmailer (= 5.0.0.1)
|
||||||
|
actionpack (= 5.0.0.1)
|
||||||
|
actionview (= 5.0.0.1)
|
||||||
|
activejob (= 5.0.0.1)
|
||||||
|
activemodel (= 5.0.0.1)
|
||||||
|
activerecord (= 5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
bundler (>= 1.3.0, < 2.0)
|
||||||
|
railties (= 5.0.0.1)
|
||||||
|
sprockets-rails (>= 2.0.0)
|
||||||
|
rails-dom-testing (2.0.1)
|
||||||
|
activesupport (>= 4.2.0, < 6.0)
|
||||||
|
nokogiri (~> 1.6.0)
|
||||||
|
rails-html-sanitizer (1.0.3)
|
||||||
|
loofah (~> 2.0)
|
||||||
|
railties (5.0.0.1)
|
||||||
|
actionpack (= 5.0.0.1)
|
||||||
|
activesupport (= 5.0.0.1)
|
||||||
|
method_source
|
||||||
|
rake (>= 0.8.7)
|
||||||
|
thor (>= 0.18.1, < 2.0)
|
||||||
|
rake (11.3.0)
|
||||||
|
rb-fsevent (0.9.8)
|
||||||
|
rb-inotify (0.9.7)
|
||||||
|
ffi (>= 0.5.0)
|
||||||
|
sass (3.4.22)
|
||||||
|
sass-rails (5.0.6)
|
||||||
|
railties (>= 4.0.0, < 6)
|
||||||
|
sass (~> 3.1)
|
||||||
|
sprockets (>= 2.8, < 4.0)
|
||||||
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
|
tilt (>= 1.1, < 3)
|
||||||
|
spring (2.0.0)
|
||||||
|
activesupport (>= 4.2)
|
||||||
|
spring-watcher-listen (2.0.1)
|
||||||
|
listen (>= 2.7, < 4.0)
|
||||||
|
spring (>= 1.2, < 3.0)
|
||||||
|
sprockets (3.7.0)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
rack (> 1, < 3)
|
||||||
|
sprockets-rails (3.2.0)
|
||||||
|
actionpack (>= 4.0)
|
||||||
|
activesupport (>= 4.0)
|
||||||
|
sprockets (>= 3.0.0)
|
||||||
|
sqlite3 (1.3.12)
|
||||||
|
thor (0.19.1)
|
||||||
|
thread_safe (0.3.5)
|
||||||
|
tilt (2.0.5)
|
||||||
|
turbolinks (5.0.1)
|
||||||
|
turbolinks-source (~> 5)
|
||||||
|
turbolinks-source (5.0.0)
|
||||||
|
tzinfo (1.2.2)
|
||||||
|
thread_safe (~> 0.1)
|
||||||
|
uglifier (3.0.3)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
|
web-console (3.4.0)
|
||||||
|
actionview (>= 5.0)
|
||||||
|
activemodel (>= 5.0)
|
||||||
|
debug_inspector
|
||||||
|
railties (>= 5.0)
|
||||||
|
websocket-driver (0.6.4)
|
||||||
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.2)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
bcrypt (~> 3.1.7)
|
||||||
|
byebug
|
||||||
|
coffee-rails (~> 4.2)
|
||||||
|
jbuilder (~> 2.5)
|
||||||
|
jquery-rails
|
||||||
|
listen (~> 3.0.5)
|
||||||
|
pg (~> 0.18.4)
|
||||||
|
puma (~> 3.0)
|
||||||
|
rails (~> 5.0.0, >= 5.0.0.1)
|
||||||
|
sass-rails (~> 5.0)
|
||||||
|
spring
|
||||||
|
spring-watcher-listen (~> 2.0.0)
|
||||||
|
sqlite3
|
||||||
|
turbolinks (~> 5)
|
||||||
|
tzinfo-data
|
||||||
|
uglifier (>= 1.3.0)
|
||||||
|
web-console
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.13.6
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://coffeescript.org/
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://coffeescript.org/
|
|
@ -0,0 +1,3 @@
|
||||||
|
// Place all the styles related to the Comments controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
@ -0,0 +1,3 @@
|
||||||
|
// Place all the styles related to the MicroPosts controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
include LoginHelper
|
include LoginHelper
|
||||||
include UsersHelper
|
include UsersHelper
|
||||||
|
include MicroPostsHelper
|
||||||
|
|
||||||
|
|
||||||
# Confirms a logged-in user.
|
# Confirms a logged-in user.
|
||||||
|
|
|
@ -9,68 +9,89 @@ class ChatController < ApplicationController
|
||||||
@chat_with_users = get_chat_with_users(@user)
|
@chat_with_users = get_chat_with_users(@user)
|
||||||
if !@current_chat_user_name.nil?
|
if !@current_chat_user_name.nil?
|
||||||
@current_chat_user = User.find_by(name: @current_chat_user_name)
|
@current_chat_user = User.find_by(name: @current_chat_user_name)
|
||||||
messages = process_messages(@user, @current_chat_user)
|
if !@current_chat_user_name.nil?
|
||||||
render json: messages
|
messages = process_messages(@user, @current_chat_user)
|
||||||
# else
|
render json: messages
|
||||||
# if !@chat_with_users.empty?
|
end
|
||||||
# @current_chat_user_name = @chat_with_users[0]["username"]
|
|
||||||
# @current_chat_user = User.find_by(name: @current_chat_user_name)
|
|
||||||
# @current_messages = Message.where(send_user: [@user.id, @current_chat_user_id], recieve_user:
|
|
||||||
# [@user.id, @current_chat_user_id]).order(create_time: :asc)
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
# 用户发送新的消息
|
||||||
|
|
||||||
@user = current_user
|
@user = current_user
|
||||||
|
username = @user.name
|
||||||
|
userpic = @user.picurl
|
||||||
|
|
||||||
msg = params[:msg]
|
msg = params[:msg]
|
||||||
current_chat_user_name = params[:chat_with]
|
current_chat_user_name = params[:chat_with]
|
||||||
current_chat_user = User.find_by(name: current_chat_user_name)
|
current_chat_user = User.find_by(name: current_chat_user_name)
|
||||||
save_time = DateTime.now
|
save_time = DateTime.now
|
||||||
msg_db = Message.new(content: msg, send_user: @user.id, recieve_user: current_chat_user.id, create_time: save_time, readed: false)
|
msg_db = Message.new(content: msg, send_user: @user.id, recieve_user: current_chat_user.id,
|
||||||
|
create_time: save_time, readed: false)
|
||||||
|
|
||||||
if msg_db.save
|
if msg_db.save
|
||||||
render json: {msg: msg, time: save_time}
|
render json: {username: username, userpic: userpic, content: msg, time: save_time}
|
||||||
else
|
else
|
||||||
render json: {msg: "error", time: save_time}
|
render json: {username: username, userpic: userpic, content: "error", time: save_time}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify
|
def notify
|
||||||
|
# 获取未读短信数
|
||||||
@user = current_user
|
@user = current_user
|
||||||
# unreaded_lists = unread_msg_users(@uesr)
|
|
||||||
render json: {unreaded: unread_msg_num(@user)}
|
render json: {unreaded: unread_msg_num(@user)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def online
|
def online
|
||||||
|
# # 获取未读短信和对对应的联系人
|
||||||
@user = current_user
|
@user = current_user
|
||||||
results = unread_msg_users(@user)
|
results = unread_msg_users(@user)
|
||||||
if results.empty?
|
if results.empty?
|
||||||
results = nil
|
results = nil
|
||||||
end
|
end
|
||||||
render json: {users:results}
|
render json: {users: results}
|
||||||
end
|
end
|
||||||
|
|
||||||
def query
|
def query
|
||||||
|
# 添加新的联系人
|
||||||
@user = current_user
|
@user = current_user
|
||||||
query_name = params[:username]
|
query_name = params[:username]
|
||||||
all_user_names = params[:all]
|
all_user_names = params[:all]
|
||||||
|
query_pic = String.new()
|
||||||
|
|
||||||
if all_user_names.include? query_name or query_name == @user.name
|
if all_user_names.nil?
|
||||||
query_name = nil
|
|
||||||
ok = false
|
|
||||||
else
|
|
||||||
query_user = User.find_by(name: query_name)
|
query_user = User.find_by(name: query_name)
|
||||||
if query_user.empty?
|
if query_user.nil?
|
||||||
query_name = nil
|
query_name = nil
|
||||||
ok = false
|
ok = false
|
||||||
else
|
else
|
||||||
query_name = query_user.name
|
query_name = query_user.name
|
||||||
|
query_pic = query_user.picurl
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if all_user_names.include? query_name or query_name == @user.name
|
||||||
|
query_name = nil
|
||||||
|
ok = false
|
||||||
|
else
|
||||||
|
query_user = User.find_by(name: query_name)
|
||||||
|
p "-----------here-------run----------"
|
||||||
|
if query_user.nil?
|
||||||
|
p "-----------here-------run----------"
|
||||||
|
query_name = nil
|
||||||
|
ok = false
|
||||||
|
else
|
||||||
|
query_name = query_user.name
|
||||||
|
query_pic = query_user.picurl
|
||||||
|
ok = true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
render json: {username: query_name, ok: ok}
|
|
||||||
|
|
||||||
|
render json: {username: query_name, userpic: query_pic, ok: ok}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
class CommentsController < ApplicationController
|
||||||
|
include CommentsHelper
|
||||||
|
|
||||||
|
def get
|
||||||
|
micropost_id = params["micropost_id"]
|
||||||
|
micropost_comments = get_micropost_comments micropost_id
|
||||||
|
render json: {comments:micropost_comments}
|
||||||
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@user = current_user
|
||||||
|
username = @user.name
|
||||||
|
userpic = @user.picurl
|
||||||
|
content = params[:content].to_s
|
||||||
|
micropost_id = params[:micropost_id]
|
||||||
|
if !content.empty? and !micropost_id.nil?
|
||||||
|
comments = @user.comments.new(content:content,micro_post_id:micropost_id,comment_time:DateTime.now)
|
||||||
|
comments.save
|
||||||
|
end
|
||||||
|
render json: {username: username, userpic: userpic}
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -1,15 +1,30 @@
|
||||||
class MainController < ApplicationController
|
class MainController < ApplicationController
|
||||||
|
include MainHelper
|
||||||
before_action :logged_in_user
|
before_action :logged_in_user
|
||||||
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@user = current_user
|
@user = current_user
|
||||||
p @user.email
|
offset = 0
|
||||||
p gravatar_for @user
|
@micro_posts_array = read_newest_post(offset)
|
||||||
render 'main'
|
render 'main'
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def activity
|
||||||
|
micro_post_id = params[:micropost_id]
|
||||||
|
join = params[:join].to_s
|
||||||
|
micro_post = MicroPost.find_by(id: micro_post_id)
|
||||||
|
if join == "true"
|
||||||
|
p "join activity"
|
||||||
|
micro_post.engage_people += 1
|
||||||
|
else
|
||||||
|
p "quit activity"
|
||||||
|
micro_post.engage_people -= 1
|
||||||
|
end
|
||||||
|
if micro_post.save
|
||||||
|
render json: {total_num: micro_post.engage_people}
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
class MicroPostsController < ApplicationController
|
||||||
|
before_action :logged_in_user
|
||||||
|
|
||||||
|
|
||||||
|
def show
|
||||||
|
@user = current_user
|
||||||
|
@micro_posts = read_each_post @user
|
||||||
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@user = current_user
|
||||||
|
|
||||||
|
post_type = params[:post_type].to_i
|
||||||
|
title = params[:title].to_s
|
||||||
|
content = params[:content].to_s
|
||||||
|
|
||||||
|
if post_type >= 1 and post_type <= 3 and !title.empty? and !content.empty?
|
||||||
|
micropost = @user.micro_posts.new(content:content,post_time:DateTime.now,title:title,
|
||||||
|
post_type:post_type,engage_people:0)
|
||||||
|
micropost.save
|
||||||
|
end
|
||||||
|
redirect_to microposts_path
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -12,10 +12,16 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@user = current_user
|
||||||
|
render 'edit'
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def user_params
|
def user_params
|
||||||
params.require(:user).permit(:name, :email, :password,
|
params.require(:user).permit(:name, :email, :password,
|
||||||
:password_confirmation)
|
:password_confirmation)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,15 +34,20 @@ module ChatHelper
|
||||||
|
|
||||||
Message.transaction do
|
Message.transaction do
|
||||||
messages = Message.lock.where(send_user: [user.id, chat_with.id],
|
messages = Message.lock.where(send_user: [user.id, chat_with.id],
|
||||||
recieve_user: [user.id, chat_with.id]).order(create_time: :asc)
|
recieve_user: [user.id, chat_with.id])
|
||||||
if !messages.empty?
|
|
||||||
|
if messages.length >= 1
|
||||||
|
p "==================================="
|
||||||
|
messages = messages.order(create_time: :asc)
|
||||||
messages.each do |message|
|
messages.each do |message|
|
||||||
if message.send_user == user.id
|
if message.send_user == user.id
|
||||||
x = {issend: true, send: user.name, recieve: chat_with.name, content: message.content, time: message.create_time}
|
x = {issend: true, name: user.name, userpic:user.picurl,
|
||||||
|
content: message.content, time: message.create_time}
|
||||||
else
|
else
|
||||||
message.readed = true
|
message.readed = true
|
||||||
message.save
|
message.save
|
||||||
x = {issend: false, send: chat_with.name, recieve: user.name, content: message.content, time: message.create_time}
|
x = {issend: false, name: chat_with.name, userpic:chat_with.picurl,
|
||||||
|
content: message.content, time: message.create_time}
|
||||||
end
|
end
|
||||||
results << x
|
results << x
|
||||||
end
|
end
|
||||||
|
@ -56,17 +61,10 @@ module ChatHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def unread_msg_users user
|
def unread_msg_users user
|
||||||
# unreaded_lists = []
|
|
||||||
# unreaded_users = user.recieve_messages.where(readed: false).select(:send_user).distinct
|
|
||||||
# if !unreaded_users.empty?
|
|
||||||
# unreaded_users do |unreaded_id|
|
|
||||||
# unreaded_lists << User.find(unreaded_id).id
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# unreaded_lists
|
|
||||||
return_user_msg = {}
|
return_user_msg = {}
|
||||||
results = user.recieve_messages.where(readed: false)
|
results = user.recieve_messages.where(readed: false)
|
||||||
if results.count != 0
|
if results.length != 0
|
||||||
results.each do |result|
|
results.each do |result|
|
||||||
username = User.find(result.send_user).name
|
username = User.find(result.send_user).name
|
||||||
return_user_msg[username] = [];
|
return_user_msg[username] = [];
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
module CommentsHelper
|
||||||
|
def get_micropost_comments micropost_id
|
||||||
|
comments_array = Array.new()
|
||||||
|
micropost = MicroPost.find_by(id: micropost_id)
|
||||||
|
comments = micropost.comments
|
||||||
|
if !comments.empty?
|
||||||
|
comments.each do |com|
|
||||||
|
temp = Hash.new()
|
||||||
|
temp["username"] = com.user.name
|
||||||
|
temp["userpic"] = com.user.picurl
|
||||||
|
temp["content"] = com.content
|
||||||
|
comments_array << temp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return comments_array
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -1,2 +1,31 @@
|
||||||
module MainHelper
|
module MainHelper
|
||||||
|
|
||||||
|
def read_newest_post offset_num
|
||||||
|
micro_posts_array = []
|
||||||
|
micro_posts = MicroPost.all.order(post_time: :desc).limit(20).offset(offset_num)
|
||||||
|
if !micro_posts.empty?
|
||||||
|
micro_posts.each do |micro_post|
|
||||||
|
x = Hash.new()
|
||||||
|
x["username"] = micro_post.user.name
|
||||||
|
x["userpic"] = micro_post.user.picurl
|
||||||
|
x["postid"] = micro_post.id
|
||||||
|
x["title"] = micro_post.title
|
||||||
|
x["content"] = micro_post.content
|
||||||
|
case micro_post.post_type
|
||||||
|
when 1
|
||||||
|
x["type"] = "新鲜事"
|
||||||
|
when 2
|
||||||
|
x["type"] = "组团信息"
|
||||||
|
when 3
|
||||||
|
x["type"] = "失物招领"
|
||||||
|
else
|
||||||
|
x["type"] = "新鲜事"
|
||||||
|
end
|
||||||
|
x["time"] = micro_post.post_time
|
||||||
|
x["peo_num"] = micro_post.engage_people
|
||||||
|
micro_posts_array << x
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return micro_posts_array
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
module MicroPostsHelper
|
||||||
|
|
||||||
|
def read_each_post user
|
||||||
|
micro_posts_array = []
|
||||||
|
micro_posts = user.micro_posts.all.order(post_time: :desc)
|
||||||
|
if !micro_posts.empty?
|
||||||
|
micro_posts.each do |micro_post|
|
||||||
|
x = Hash.new()
|
||||||
|
x["title"] = micro_post.title
|
||||||
|
x["content"] = micro_post.content
|
||||||
|
case micro_post.post_type
|
||||||
|
when 1
|
||||||
|
x["type"] = "新鲜事"
|
||||||
|
when 2
|
||||||
|
x["type"] = "组团信息"
|
||||||
|
when 3
|
||||||
|
x["type"] = "失物招领"
|
||||||
|
else
|
||||||
|
x["type"] = "新鲜事"
|
||||||
|
end
|
||||||
|
x["time"] = micro_post.post_time
|
||||||
|
x["peo_num"] = micro_post.engage_people
|
||||||
|
micro_posts_array << x
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return micro_posts_array
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
|
@ -2,6 +2,6 @@ module UsersHelper
|
||||||
def gravatar_for(user, options = { size: 80 })
|
def gravatar_for(user, options = { size: 80 })
|
||||||
gravatar_id = Digest::MD5::hexdigest(user.email.downcase)
|
gravatar_id = Digest::MD5::hexdigest(user.email.downcase)
|
||||||
size = options[:size]
|
size = options[:size]
|
||||||
gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}?s=#{size}"
|
gravatar_url = "https://secure.gravatar.com/avatars/#{gravatar_id}?s=#{size}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
class Comment < ApplicationRecord
|
||||||
|
belongs_to :user, class_name: 'User', foreign_key: 'user_id'
|
||||||
|
belongs_to :micro_post, class_name: 'MicroPost', foreign_key: 'micro_post_id'
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
class MicroPost < ApplicationRecord
|
||||||
|
belongs_to :user, dependent: :destroy
|
||||||
|
has_many :comments, class_name: 'Comment', foreign_key: 'micro_post_id', dependent: :destroy
|
||||||
|
end
|
|
@ -1,6 +1,14 @@
|
||||||
class User < ApplicationRecord
|
class User < ApplicationRecord
|
||||||
|
before_save :default_values
|
||||||
|
|
||||||
|
def default_values
|
||||||
|
self.picurl = 'images/avatars/default/avatar.png'
|
||||||
|
end
|
||||||
|
|
||||||
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user'
|
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user'
|
||||||
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user'
|
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user'
|
||||||
|
has_many :micro_posts, dependent: :destroy
|
||||||
|
has_many :comments, class_name: 'Comment', foreign_key: 'user_id', dependent: :destroy
|
||||||
|
|
||||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@([a-z\d\-]+\.)+[a-z]+\z/i
|
VALID_EMAIL_REGEX = /\A[\w+\-.]+@([a-z\d\-]+\.)+[a-z]+\z/i
|
||||||
before_save { self.email = email.downcase }
|
before_save { self.email = email.downcase }
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<% provide(:title, @user.name) %>
|
||||||
|
|
||||||
<div class="modal-shiftfix">
|
<div class="modal-shiftfix">
|
||||||
|
|
||||||
<!-- Navigation -->
|
<!-- Navigation -->
|
||||||
|
@ -5,49 +7,44 @@
|
||||||
<!-- End Navigation -->
|
<!-- End Navigation -->
|
||||||
|
|
||||||
<div class="container-fluid main-content">
|
<div class="container-fluid main-content">
|
||||||
<div class="row">
|
<!-- Conversation -->
|
||||||
<!-- Conversation -->
|
<div class="widget-container scrollable chat chat-page row">
|
||||||
<div class="col-lg-12">
|
<div class="contact-list">
|
||||||
<div class="widget-container scrollable chat chat-page">
|
<div class="heading">
|
||||||
<div class="contact-list">
|
我的联系人<i class="icon-plus pull-right" data-toggle="modal" data-target="#addUser"></i>
|
||||||
<div class="heading">
|
|
||||||
我的联系人<i class="icon-plus pull-right" data-toggle="modal" data-target="#addUser"></i>
|
|
||||||
</div>
|
|
||||||
<ul id="contactlists">
|
|
||||||
<% @chat_with_users.each do |name, readed| %>
|
|
||||||
<% if readed == false %>
|
|
||||||
<li class="user_entry">
|
|
||||||
<a href="#">
|
|
||||||
<img width="30" height="30" src="images/avatar-female.png"/>
|
|
||||||
<label class="user_name"><%= name.to_s %></label>
|
|
||||||
<i class="icon-circle text-success"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% else %>
|
|
||||||
<li class="user_entry">
|
|
||||||
<a href="#">
|
|
||||||
<img width="30" height="30" src="images/avatar-female.png"/>
|
|
||||||
<label class="user_name"><%= name.to_s %></label>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="heading">
|
|
||||||
<i class="icon-comments"></i>
|
|
||||||
<lable id="chatwith"></lable>
|
|
||||||
</div>
|
|
||||||
<div class="widget-content padded">
|
|
||||||
<ul id="chatList">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="post-message">
|
|
||||||
<input id="msg" class="form-control" placeholder="新信息..." type="text">
|
|
||||||
<input id="msgSubmit" type="submit" value="发送">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<ul id="contactlists">
|
||||||
|
<% @chat_with_users.each do |name, readed| %>
|
||||||
|
<% if readed == false %>
|
||||||
|
<li class="user_entry">
|
||||||
|
<a>
|
||||||
|
<label class="user_name"><%= name.to_s %></label>
|
||||||
|
<i class="icon-circle text-success">新短信</i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="user_entry">
|
||||||
|
<a>
|
||||||
|
<label class="user_name"><%= name.to_s %></label>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="heading">
|
||||||
|
<i class="icon-comments"></i>
|
||||||
|
<lable id="chatwith"></lable>
|
||||||
|
</div>
|
||||||
|
<div id="chatScroll" class="widget-content padded">
|
||||||
|
<ul id="chatList">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="post-message">
|
||||||
|
<input id="msg" class="form-control" placeholder="新信息..." type="text">
|
||||||
|
<input id="msgSubmit" type="submit" value="发送">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,11 +69,16 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function insertSend(content, time) {
|
function insertSend(name, pic, content, time) {
|
||||||
var from =
|
var from =
|
||||||
'<li class=" current-user"> ' +
|
'<li class=" current-user"> ' +
|
||||||
'<img width="30" height="30" src="images/avatar-female.jpg"/>' +
|
'<img width="30" height="30" src="' +
|
||||||
|
pic +
|
||||||
|
'"/>' +
|
||||||
'<div class="bubble">' +
|
'<div class="bubble">' +
|
||||||
|
'<a class="user-name">' +
|
||||||
|
name +
|
||||||
|
'</a>' +
|
||||||
'<p class="message">' +
|
'<p class="message">' +
|
||||||
content +
|
content +
|
||||||
'</p> <p class="time">' +
|
'</p> <p class="time">' +
|
||||||
|
@ -87,13 +89,17 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertRecieve(name, content, time) {
|
function insertRecieve(name, pic, content, time) {
|
||||||
var from = '<li>' +
|
var from =
|
||||||
'<img width="30" height="30" src="images/avatar-female.jpg"/>' +
|
'<li>' +
|
||||||
|
'<img width="30" height="30" ' +
|
||||||
|
'src="' +
|
||||||
|
pic +
|
||||||
|
'"/>' +
|
||||||
'<div class="bubble">' +
|
'<div class="bubble">' +
|
||||||
'<label>' +
|
'<a class="user-name">' +
|
||||||
name +
|
name +
|
||||||
'</label>' +
|
'</a>' +
|
||||||
'<p class="message">' +
|
'<p class="message">' +
|
||||||
content +
|
content +
|
||||||
'</p>' +
|
'</p>' +
|
||||||
|
@ -117,14 +123,15 @@
|
||||||
$('#chatwith').text(name);
|
$('#chatwith').text(name);
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
if (data[i]["issend"] == true) {
|
if (data[i]["issend"] == true) {
|
||||||
insertSend(data[i]["content"], data[i]["time"])
|
insertSend(data[i]["name"], data[i]["userpic"], data[i]["content"], data[i]["time"])
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
insertRecieve(data[i]["send"], data[i]["content"], data[i]["time"]);
|
insertRecieve(data[i]["name"], data[i]["userpic"], data[i]["content"], data[i]["time"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
notify();
|
notify();
|
||||||
$("#msg").attr("disabled",false);
|
$("#msg").attr("disabled", false);
|
||||||
|
$("#chatScroll").scrollTop($("#chatScroll")[0].scrollHeight);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).find("i").remove();
|
$(this).find("i").remove();
|
||||||
|
@ -132,7 +139,7 @@
|
||||||
|
|
||||||
$("#msgSubmit").click(function () {
|
$("#msgSubmit").click(function () {
|
||||||
var text = $("#msg").val();
|
var text = $("#msg").val();
|
||||||
if ( text.length == 0 ){
|
if (text.length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var chat_with_user = $("#chatwith").text();
|
var chat_with_user = $("#chatwith").text();
|
||||||
|
@ -142,7 +149,8 @@
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: '/newmsg',
|
url: '/newmsg',
|
||||||
success: function (data, textStatus, jqXHR) {
|
success: function (data, textStatus, jqXHR) {
|
||||||
insertSend(data["msg"], data["time"]);
|
insertSend(data["username"], data["userpic"], data["content"], data["time"]);
|
||||||
|
$("#chatScroll").scrollTop($("#chatScroll")[0].scrollHeight);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#msg").val("");
|
$("#msg").val("");
|
||||||
|
@ -151,8 +159,7 @@
|
||||||
|
|
||||||
function append_user(name) {
|
function append_user(name) {
|
||||||
var append_div = '<li class="user_entry">' +
|
var append_div = '<li class="user_entry">' +
|
||||||
'<a href="#">' +
|
'<a>' +
|
||||||
'<img width="30" height="30" src="images/avatar-female.png"/>' +
|
|
||||||
'<label class="user_name">' +
|
'<label class="user_name">' +
|
||||||
name +
|
name +
|
||||||
'</label>' +
|
'</label>' +
|
||||||
|
@ -170,7 +177,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (all_user_name.indexOf(name) < 0) {
|
if (all_user_name.indexOf(name) < 0) {
|
||||||
console.log(all_user_name,name);
|
console.log(all_user_name, name);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
data: {username: name, all: all_user_name},
|
data: {username: name, all: all_user_name},
|
||||||
|
@ -203,11 +210,11 @@
|
||||||
|
|
||||||
|
|
||||||
function addOnlineLable(uniquename) {
|
function addOnlineLable(uniquename) {
|
||||||
var yuandian = '<i class="icon-circle text-success"></i>';
|
var yuandian = '<i class="icon-circle text-success">新消息</i>';
|
||||||
var results = $('.user_name:contains(' + uniquename + ')');
|
var results = $('.user_name:contains(' + uniquename + ')');
|
||||||
for (var i = 0; i < results.length; i++) {
|
for (var i = 0; i < results.length; i++) {
|
||||||
if($(results[i]).text() === uniquename ) {
|
if ($(results[i]).text() === uniquename) {
|
||||||
if($(results[i]).parent().find("i").length == 0 ){
|
if ($(results[i]).parent().find("i").length == 0) {
|
||||||
$(results[i]).parent().append(yuandian);
|
$(results[i]).parent().append(yuandian);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,9 +228,16 @@
|
||||||
url: '/online',
|
url: '/online',
|
||||||
success: function (data, textStatus, jqXHR) {
|
success: function (data, textStatus, jqXHR) {
|
||||||
if (data["users"] != null) {
|
if (data["users"] != null) {
|
||||||
for(var key in data["users"]){
|
for (var key in data["users"]) {
|
||||||
console.log(key);
|
|
||||||
addOnlineLable(key);
|
addOnlineLable(key);
|
||||||
|
var current_chat_with = $("#chatwith").text();
|
||||||
|
if (current_chat_with.length > 0 && current_chat_with == key) {
|
||||||
|
$(".user_name").each(function () {
|
||||||
|
if ($(this).text() == current_chat_with) {
|
||||||
|
$(this).click();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,10 +246,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setInterval('online()', 10000);
|
||||||
setInterval('online()', 10000);
|
|
||||||
// clearInterval(notify_num_ticker);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
<div class="modal-shiftfix">
|
|
||||||
|
|
||||||
<!-- Navigation -->
|
|
||||||
<%= render 'layouts/nav' %>
|
|
||||||
<!-- End Navigation -->
|
|
||||||
|
|
||||||
<div class="container-fluid main-content">
|
|
||||||
<div class="row">
|
|
||||||
<!-- Conversation -->
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<div class="widget-container scrollable chat chat-page">
|
|
||||||
<div class="contact-list">
|
|
||||||
<div class="heading">
|
|
||||||
我的联系人<i class="icon-plus pull-right"></i>
|
|
||||||
</div>
|
|
||||||
<ul>
|
|
||||||
<% @chat_with_users.each do |name,readed| %>
|
|
||||||
<% if readed == false%>
|
|
||||||
<li>
|
|
||||||
<a href="#">
|
|
||||||
<img width="30" height="30" src="images/avatar-female.png"/>
|
|
||||||
<%=name.to_s%>
|
|
||||||
<i class="icon-circle text-success"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% else %>
|
|
||||||
<li>
|
|
||||||
<a href="#">
|
|
||||||
<img width="30" height="30" src="images/avatar-female.png"/>
|
|
||||||
<%=name.to_s%>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="heading">
|
|
||||||
<i class="icon-comments"></i>
|
|
||||||
<lable id="chatwith"><%= @current_chat_user.name %></lable>
|
|
||||||
</div>
|
|
||||||
<div class="widget-content padded">
|
|
||||||
<% if !@current_chat_user.nil? %>
|
|
||||||
<ul id="chatList">
|
|
||||||
<% @current_messages.each do |message| %>
|
|
||||||
<% if message.send_user == @user.id %>
|
|
||||||
<li class="current-user">
|
|
||||||
<img width="30" height="30" src="images/avatar-female.jpg"/>
|
|
||||||
<div class="bubble">
|
|
||||||
<p class="message">
|
|
||||||
<%= message.content %>
|
|
||||||
</p>
|
|
||||||
<p class="time">
|
|
||||||
<%= message.create_time %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<% else %>
|
|
||||||
<li>
|
|
||||||
<img width="30" height="30" src="images/avatar-female.jpg"/>
|
|
||||||
<div class="bubble">
|
|
||||||
<label><%= @current_chat_user.name %></label>
|
|
||||||
<p class="message">
|
|
||||||
<%= message.content %>
|
|
||||||
</p>
|
|
||||||
<p class="time">
|
|
||||||
<%= message.create_time %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="post-message">
|
|
||||||
<input id="msg" class="form-control" placeholder="新信息..." type="text">
|
|
||||||
<input id="msgSubmit" type="submit" value="发送">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function insertSend(content, time) {
|
|
||||||
var from =
|
|
||||||
'<li class=" current-user"> ' +
|
|
||||||
'<img width="30" height="30" src="images/avatar-female.jpg"/>' +
|
|
||||||
'<div class="bubble">' +
|
|
||||||
'<p class="message">' +
|
|
||||||
content +
|
|
||||||
'</p> <p class="time">' +
|
|
||||||
time +
|
|
||||||
'</p> </div> </li>'
|
|
||||||
;
|
|
||||||
$("#chatList").append(from);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function insertRecieve(name, content, time) {
|
|
||||||
var from = '<li>' +
|
|
||||||
'<img width="30" height="30" src="images/avatar-female.jpg"/>' +
|
|
||||||
'<div class="bubble">' +
|
|
||||||
'<label>' +
|
|
||||||
name +
|
|
||||||
'</label>' +
|
|
||||||
'<p class="message">' +
|
|
||||||
content +
|
|
||||||
'</p>' +
|
|
||||||
'<p class="time">' +
|
|
||||||
time +
|
|
||||||
'</p>' +
|
|
||||||
'</div>' +
|
|
||||||
'</li>';
|
|
||||||
$("#chatList").append(from);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.contact-list a').bind("click", function () {
|
|
||||||
name = $(this).text();
|
|
||||||
$.ajax({
|
|
||||||
type: 'get',
|
|
||||||
dataType: 'json',
|
|
||||||
data: {chat_with: name},
|
|
||||||
url: '/chat',
|
|
||||||
success: function (data, textStatus, jqXHR) {
|
|
||||||
$("#chatList").empty();
|
|
||||||
$('#chatwith').text(name);
|
|
||||||
for (var i = 0; i < data.length; i++) {
|
|
||||||
if (data[i]["issend"] == true) {
|
|
||||||
insertSend(data[i]["content"], data[i]["time"])
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
insertRecieve(data[i]["send"], data[i]["content"], data[i]["time"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#msgSubmit").click(function () {
|
|
||||||
var text = $("#msg").val();
|
|
||||||
var chat_with_user = $("#chatwith").text();
|
|
||||||
console.log(chat_with_user);
|
|
||||||
$.ajax({
|
|
||||||
type: 'post',
|
|
||||||
data: {msg: text, chat_with: chat_with_user, authenticity_token: AUTH_TOKEN},
|
|
||||||
dataType: 'json',
|
|
||||||
url: '/newmsg',
|
|
||||||
success: function (data, textStatus, jqXHR) {
|
|
||||||
insertSend(data["msg"], data["time"]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// var tock = setInterval('$(".icon-plus").click()',1000);
|
|
||||||
|
|
||||||
// $(document).ready(function () {
|
|
||||||
//
|
|
||||||
// });
|
|
||||||
|
|
||||||
</script>
|
|
|
@ -3,9 +3,9 @@
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<ul class="nav navbar-nav pull-right">
|
<ul class="nav navbar-nav pull-right">
|
||||||
<li class="dropdown user hidden-xs"><a data-toggle="dropdown" class="dropdown-toggle" href="/logout">
|
<li class="dropdown user hidden-xs"><a data-toggle="dropdown" class="dropdown-toggle" href="/logout">
|
||||||
<img width="34" height="34" src="<%= gravatar_for(@user) %>"/><%= @user.name %><b class="caret"></b></a>
|
<img width="34" height="34" src="<%= @user.picurl %>"/><%= @user.name %><b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="/users">
|
<li><a href="#">
|
||||||
<i class="icon-user"></i>个人设置</a>
|
<i class="icon-user"></i>个人设置</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="/logout">
|
<li><a href="/logout">
|
||||||
|
@ -15,16 +15,21 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a class="logo" href="#"></a>
|
<a class="logo" href="/main"></a>
|
||||||
<button class="navbar-toggle"><span class="icon-bar"></span><span class="icon-bar"></span><span
|
<button class="navbar-toggle"><span class="icon-bar"></span><span class="icon-bar"></span><span
|
||||||
class="icon-bar"></span></button>
|
class="icon-bar"></span></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid main-nav clearfix">
|
<div class="container-fluid main-nav clearfix">
|
||||||
<div class="nav-collapse">
|
<div class="nav-collapse">
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li class="dropdown"><a data-toggle="dropdown" href="#">
|
<li class="dropdown">
|
||||||
<span aria-hidden="true" class="se7en-star"></span>随便看看<b class="caret"></b></a>
|
<a data-toggle="dropdown" href="#">
|
||||||
|
<span aria-hidden="true" class="se7en-star"></span>随便看看<b class="caret"></b>
|
||||||
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<a href="/main">果仁动态</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">失物信息</a>
|
<a href="#">失物信息</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -34,7 +39,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#"><span aria-hidden="true" class="se7en-home"></span>我的动态</a>
|
<a href="/microposts"><span aria-hidden="true" class="se7en-home"></span>我的动态</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/chat">
|
<a href="/chat">
|
||||||
|
@ -43,6 +48,9 @@
|
||||||
<div id="msgNum" class="label label-info">0</div>
|
<div id="msgNum" class="label label-info">0</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/logout"><span aria-hidden="true" class="se7en-pages"></span>退出</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,7 +85,7 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
notify();
|
notify();
|
||||||
notify_num_ticker = setInterval('notify()', 10000);
|
notify_num_ticker = setInterval('notify()', 10000);
|
||||||
$("#msg").attr("disabled",true);
|
$("#msg").attr("disabled", true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
<!--自定义CSS文件-->
|
||||||
|
<link href="stylesheets/mystyle.css" media="all" rel="stylesheet" type="text/css"/>
|
||||||
|
<!--自定义CSS文件-->
|
||||||
|
|
||||||
|
<!--引入文件-->
|
||||||
<link href="stylesheets/bootstrap.min.css" media="all" rel="stylesheet" type="text/css"/>
|
<link href="stylesheets/bootstrap.min.css" media="all" rel="stylesheet" type="text/css"/>
|
||||||
<link href="stylesheets/font-awesome.css" media="all" rel="stylesheet" type="text/css"/>
|
<link href="stylesheets/font-awesome.css" media="all" rel="stylesheet" type="text/css"/>
|
||||||
<link href="stylesheets/se7en-font.css" media="all" rel="stylesheet" type="text/css"/>
|
<link href="stylesheets/se7en-font.css" media="all" rel="stylesheet" type="text/css"/>
|
||||||
|
@ -24,8 +29,10 @@
|
||||||
<link href="stylesheets/color/magenta.css" media="all" rel="alternate stylesheet" title="magenta-theme"
|
<link href="stylesheets/color/magenta.css" media="all" rel="alternate stylesheet" title="magenta-theme"
|
||||||
type="text/css"/>
|
type="text/css"/>
|
||||||
<link href="stylesheets/color/gray.css" media="all" rel="alternate stylesheet" title="gray-theme" type="text/css"/>
|
<link href="stylesheets/color/gray.css" media="all" rel="alternate stylesheet" title="gray-theme" type="text/css"/>
|
||||||
|
<!--引入文件-->
|
||||||
|
|
||||||
<script src="javascripts/jquery.min.js" type="text/javascript"></script>
|
<script src="javascripts/jquery.min.js" type="text/javascript"></script>
|
||||||
<script src="http://cdn.bootcss.com/jqueryui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="javascripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
|
||||||
<script src="javascripts/bootstrap.min.js" type="text/javascript"></script>
|
<script src="javascripts/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<script src="javascripts/raphael.min.js" type="text/javascript"></script>
|
<script src="javascripts/raphael.min.js" type="text/javascript"></script>
|
||||||
<script src="javascripts/selectivizr-min.js" type="text/javascript"></script>
|
<script src="javascripts/selectivizr-min.js" type="text/javascript"></script>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<!-- Login Screen -->
|
<!-- Login Screen -->
|
||||||
<div class="login-wrapper">
|
<div class="login-wrapper">
|
||||||
<a href="#"><img width="210" height="70" src="images/logo/guoke.png"/></a>
|
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
|
||||||
|
|
||||||
<%= form_tag(controller: "login", action: "login", method: "post") do %>
|
<%= form_tag(controller: "login", action: "login", method: "post") do %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -1,191 +1,91 @@
|
||||||
|
<% provide(:title, @user.name) %>
|
||||||
|
|
||||||
<div class="modal-shiftfix">
|
<div class="modal-shiftfix">
|
||||||
|
|
||||||
<div class="container-fluid main-content">
|
<div class="container-fluid main-content">
|
||||||
<%= render 'layouts/nav' %>
|
<%= render 'layouts/nav' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-8">
|
||||||
|
<% @micro_posts_array.each do |micro_post| %>
|
||||||
<div class="social-wrapper">
|
<div class="social-wrapper">
|
||||||
<div class="social-container">
|
<div class="social-container">
|
||||||
<div class="social-entry">
|
<div class="social-entry" id="postid_<%= micro_post["postid"] %>">
|
||||||
<div class="widget-container fluid-height isotope-item">
|
<div class="widget-container fluid-height isotope-item">
|
||||||
<div class="profile-info clearfix padded">
|
<div class="profile-info clearfix" style="padding: 20px 20px 0 20px">
|
||||||
<img width="50" height="50" class="social-avatar pull-left"
|
<img width="50" height="50" class="social-avatar pull-left"
|
||||||
src="images/avatar-male2.png">
|
src="<%= micro_post["userpic"] %>">
|
||||||
<div class="profile-details">
|
<a class="user-name"><i class="icon-user"></i><%= micro_post["username"] %></a><br>
|
||||||
<a class="user-name" href="#">用户名称</a>
|
<div class="profile-details">
|
||||||
<p>
|
<p>
|
||||||
<em>发布时间</em>
|
<label class="label label-info" style="margin: 0"><%= micro_post["type"] %></label>
|
||||||
</p>
|
<i class="icon-time"><em><%= micro_post["time"] %></em></i>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<img width="300" height="200" class="social-content-media"
|
|
||||||
src="images/social-image.jpg">
|
|
||||||
<div class="padded">
|
|
||||||
<p class="content">发布的内容</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="comments padded">
|
|
||||||
<div class="comment">
|
|
||||||
<img width="40" height="40" class="social-avatar pull-left"
|
|
||||||
src="images/avatar-female.png">
|
|
||||||
<div class="profile-details clearfix">
|
|
||||||
<a class="user-name" href="#">评论用户</a>
|
|
||||||
<p>
|
|
||||||
<em>评论时间</em>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="content">
|
|
||||||
评论内容
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<form role="form">
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="form-control" placeholder="Add a comment..." type="text">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="social-wrapper">
|
|
||||||
<div class="social-container">
|
|
||||||
<div class="social-entry">
|
|
||||||
<div class="widget-container fluid-height isotope-item">
|
|
||||||
<div class="profile-info clearfix padded">
|
|
||||||
<img width="50" height="50" class="social-avatar pull-left"
|
|
||||||
src="images/avatar-male2.png">
|
|
||||||
<div class="profile-details">
|
|
||||||
<a class="user-name" href="#">用户名称</a>
|
|
||||||
<p>
|
|
||||||
<em>发布时间</em>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<img width="300" height="200" class="social-content-media"
|
|
||||||
src="images/social-image.jpg">
|
|
||||||
<div class="padded">
|
|
||||||
<p class="content">发布的内容</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="comments padded">
|
|
||||||
<div class="comment">
|
|
||||||
<img width="40" height="40" class="social-avatar pull-left"
|
|
||||||
src="images/avatar-female.png">
|
|
||||||
<div class="profile-details clearfix">
|
|
||||||
<a class="user-name" href="#">评论用户</a>
|
|
||||||
<p>
|
|
||||||
<em>评论时间</em>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="content">
|
|
||||||
评论内容
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<form role="form">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="form-control" placeholder="Add a comment..." type="text">
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="padded">
|
||||||
|
<p class="content"><%= micro_post["content"] %></p>
|
||||||
|
</div>
|
||||||
|
<% if micro_post["type"] == "组团信息" %>
|
||||||
|
<div class="social-button">
|
||||||
|
<button id="activity" class="btn btn-lg btn-success-outline">报名参加
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="activity-datail">
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if micro_post["type"] == "失物招领" %>
|
||||||
|
<div class="social-button">
|
||||||
|
<button id="lost" class="btn btn-success-outline">跟ta联系
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div>
|
||||||
|
<button class="btn btn-block btn-default-outline showcomment">
|
||||||
|
显示评论
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="comments padded hidden">
|
||||||
|
<input class="form-control makecomment" placeholder="写评论..." type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="widget-container">
|
||||||
|
<div class="heading">
|
||||||
|
<i class="icon-archive">公告</i>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
通知
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-wrapper">
|
</div>
|
||||||
<div class="social-container">
|
<div class="col-lg-4">
|
||||||
<div class="social-entry">
|
<div class="widget-container">
|
||||||
<div class="widget-container fluid-height isotope-item">
|
<div class="heading">
|
||||||
<div class="profile-info clearfix padded">
|
<i class="icon-archive">热门状态</i>
|
||||||
<img width="50" height="50" class="social-avatar pull-left"
|
</div>
|
||||||
src="images/avatar-male2.png">
|
<div class="alert alert-success">
|
||||||
<div class="profile-details">
|
状态1
|
||||||
<a class="user-name" href="#">用户名称</a>
|
</div>
|
||||||
<p>
|
<div class="alert alert-warning">
|
||||||
<em>发布时间</em>
|
状态2
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="padded">
|
|
||||||
<p class="content">
|
|
||||||
的积分卡开始大家了解法律考试大家分开了贾老师的空间发了卡死了的解放军爱上的龙卷风阿斯兰的减肥了婕拉抗衰老的减肥了加拉克是大家拉来的解放军垃圾收来的快放假了阿里山的记录发来看埃里克圣诞节福利及拉得少两块街坊邻居拉来的减肥了垃圾是来得及 </p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button class="btn btn-block">显示评论</button>
|
|
||||||
</div>
|
|
||||||
<div class="comments padded hidden">
|
|
||||||
<div class="comment">
|
|
||||||
<img width="40" height="40" class="social-avatar pull-left"
|
|
||||||
src="images/avatar-female.png">
|
|
||||||
<div class="profile-details clearfix">
|
|
||||||
<a class="user-name" href="#">评论用户</a>
|
|
||||||
<p>
|
|
||||||
<em>评论时间</em>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="content">
|
|
||||||
评论内容
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<form role="form">
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="form-control" id="exampleInputEmail1"
|
|
||||||
placeholder="Add a comment..."
|
|
||||||
type="email">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-wrapper">
|
</div>
|
||||||
<div class="social-container">
|
<div class="col-lg-4">
|
||||||
<div class="social-entry">
|
<div class="widget-container">
|
||||||
<div class="widget-container fluid-height isotope-item">
|
<div class="heading">
|
||||||
<div class="profile-info clearfix padded">
|
<i class="icon-archive">热门组团活动</i>
|
||||||
<img width="50" height="50" class="social-avatar pull-left"
|
</div>
|
||||||
src="images/avatar-male2.png">
|
<div class="alert alert-success">
|
||||||
<div class="profile-details">
|
组团活动1
|
||||||
<a class="user-name" href="#">用户名称</a>
|
</div>
|
||||||
<p>
|
<div class="alert alert-warning">
|
||||||
<em>发布时间</em>
|
组团活动2
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="padded">
|
|
||||||
<p class="content">
|
|
||||||
的积分卡开始大家了解法律考试大家分开了贾老师的空间发了卡死了的解放军爱上的龙卷风阿斯兰的减肥了婕拉抗衰老的减肥了加拉克是大家拉来的解放军垃圾收来的快放假了阿里山的记录发来看埃里克圣诞节福利及拉得少两块街坊邻居拉来的减肥了垃圾是来得及 </p>
|
|
||||||
</div>
|
|
||||||
<div class="social-button">
|
|
||||||
<button class="btn btn-success-outline" style="margin: 10px 10px 10px 10px">报名参加
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="comments padded hidden">
|
|
||||||
<div class="comment">
|
|
||||||
<img width="40" height="40" class="social-avatar pull-left"
|
|
||||||
src="images/avatar-female.png">
|
|
||||||
<div class="profile-details clearfix">
|
|
||||||
<a class="user-name" href="#">评论用户</a>
|
|
||||||
<p>
|
|
||||||
<em>评论时间</em>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="content">
|
|
||||||
评论内容
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<form role="form">
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="form-control" id="exampleInputEmail1"
|
|
||||||
placeholder="Add a comment..."
|
|
||||||
type="email">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -197,14 +97,128 @@
|
||||||
<li><a href="#">1</a></li>
|
<li><a href="#">1</a></li>
|
||||||
<li><a href="#">2</a></li>
|
<li><a href="#">2</a></li>
|
||||||
<li><a href="#">3</a></li>
|
<li><a href="#">3</a></li>
|
||||||
<li><a href="#">4</a></li>
|
|
||||||
<li><a href="#">5</a></li>
|
|
||||||
<li><a href="#">»</a></li>
|
<li><a href="#">»</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function comment_process(username, userpic, comment) {
|
||||||
|
var commentElem = '<div class="comment">' +
|
||||||
|
'<img width="40" height="40" class="social-avatars pull-left"' +
|
||||||
|
'src=' +
|
||||||
|
userpic +
|
||||||
|
'/>' +
|
||||||
|
'<div class="profile-details clearfix">' +
|
||||||
|
'<a class="user-name">' +
|
||||||
|
username +
|
||||||
|
'</a>' +
|
||||||
|
'<p class="content">' +
|
||||||
|
comment +
|
||||||
|
'</p>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
return commentElem;
|
||||||
|
}
|
||||||
|
function getComments(id) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {micropost_id: id},
|
||||||
|
url: '/comments',
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
var micro_post_id = "#" + "postid_" + id;
|
||||||
|
var comments = $(micro_post_id.toString()).parent().next();
|
||||||
|
var comments = $(micro_post_id.toString()).find(".comments")
|
||||||
|
comments.find(".comment").remove();
|
||||||
|
comments.find("p").remove();
|
||||||
|
if (data["comments"].length == 0) {
|
||||||
|
comments.prepend("<p style='text-align: center'>无评论</p>");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var comments_array = data["comments"];
|
||||||
|
for (var i = 0; i < comments_array.length; i++) {
|
||||||
|
comments.prepend(comment_process(comments_array[i]["username"],
|
||||||
|
comments_array[i]["userpic"], comments_array[i]["content"]))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$(".showcomment").bind("click", function () {
|
||||||
|
var text = $(this).text();
|
||||||
|
if (text == "隐藏评论") {
|
||||||
|
$(this).parent().next(".comments").addClass("hidden");
|
||||||
|
$(this).text("显示评论");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).parent().next(".comments").removeClass("hidden");
|
||||||
|
$(this).text("隐藏评论");
|
||||||
|
var micropost_id = $(this).parent().parent().attr("id");
|
||||||
|
if (micropost_id.indexOf('_') > 0) {
|
||||||
|
var id = micropost_id.slice(micropost_id.indexOf('_') + 1);
|
||||||
|
getComments(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".makecomment").bind("keyup", function (e) {
|
||||||
|
var inputText = $(this).val();
|
||||||
|
var username = "";
|
||||||
|
var userpic = "";
|
||||||
|
var enterObject = $(this);
|
||||||
|
var micropost = $(this).parent().parent().attr("id");
|
||||||
|
var micropost_id = micropost.slice(micropost.indexOf("_") + 1)
|
||||||
|
if (e.keyCode == "13") {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {micropost_id: micropost_id, content: inputText, authenticity_token: AUTH_TOKEN},
|
||||||
|
url: '/newcomment',
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
if (data["username"] && data["userpic"]) {
|
||||||
|
enterObject.before(comment_process(data["username"], data["userpic"], inputText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#activity").bind("click", function () {
|
||||||
|
var text = $(this).text().trim();
|
||||||
|
var micropost_id = $(this).parent().parent().parent().attr("id");
|
||||||
|
if (micropost_id.indexOf('_') > 0) {
|
||||||
|
var id = micropost_id.slice(micropost_id.indexOf('_') + 1);
|
||||||
|
}
|
||||||
|
if (text == "报名参加") {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {micropost_id: id, join: true},
|
||||||
|
url: '/activity',
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
console.log(data["total_num"]);
|
||||||
|
$("#activity").text("取消报名");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {micropost_id: id, join: false},
|
||||||
|
url: '/activity',
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
console.log(data["total_num"]);
|
||||||
|
$("#activity").text("报名参加");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
<% provide(:title, @user.name) %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal-shiftfix">
|
||||||
|
|
||||||
|
<!-- Navigation -->
|
||||||
|
<%= render 'layouts/nav' %>
|
||||||
|
<!-- End Navigation -->
|
||||||
|
|
||||||
|
<div class="container-fluid main-content padded" id="user-page">
|
||||||
|
<row id="new-post">
|
||||||
|
<div class="widget-container fluid-height clearfix">
|
||||||
|
<div class="heading">
|
||||||
|
<i class="icon-reorder"></i>发布新信息
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= form_tag("/newpost", method: "post", class: "form-horizontal") do %>
|
||||||
|
|
||||||
|
<div class="form-group ">
|
||||||
|
<div class="col-md-2">
|
||||||
|
<select class="form-control" name="post_type">
|
||||||
|
<option value="1">新鲜事</option>
|
||||||
|
<option value="2">组团信息</option>
|
||||||
|
<option value="3">失物招领</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input class="form-control" placeholder="标题" type="text" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<textarea class="form-control" rows="3" name="content"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<p>
|
||||||
|
图片
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<button class="btn btn-primary" type="submit">发布</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row class="posts">
|
||||||
|
<% @micro_posts.each do |micro_post| %>
|
||||||
|
<div class="widget-container fluid-height clearfix">
|
||||||
|
<div class="heading">
|
||||||
|
<i class="icon-tags"><%= micro_post["title"] %></i>
|
||||||
|
<div class="label label-default"></div>
|
||||||
|
<div class="notifications label label-info">
|
||||||
|
<%= micro_post["type"] %>
|
||||||
|
</div>
|
||||||
|
<i class="icon-time"><%= micro_post["time"] %></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<p>
|
||||||
|
<%= micro_post["content"]%>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="btn btn-default btn-block">
|
||||||
|
查看详情
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</row>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1 @@
|
||||||
|
<% provide(:title, @user.name) %>
|
|
@ -2,7 +2,7 @@
|
||||||
<% provide(:body_class, 'login2') %>
|
<% provide(:body_class, 'login2') %>
|
||||||
|
|
||||||
<div class="login-wrapper">
|
<div class="login-wrapper">
|
||||||
<a href="#"><img width="210" height="70" src="images/logo/guoke.png"/></a>
|
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
12
back_code
|
@ -1,12 +0,0 @@
|
||||||
Message.create(content:"hello",send_user:5,recieve_user:6,create_time:DateTime.now,readed:false)
|
|
||||||
user.send_messages.find_by(send_user:user.id)[:recieve_user]
|
|
||||||
user.send_messages.select("recieve_user").
|
|
||||||
user.send_messages.select(:recieve_user).find(1).recieve_user
|
|
||||||
|
|
||||||
Message.where(send_user:5,recieve_user:6)
|
|
||||||
|
|
||||||
|
|
||||||
Message.where(send_user:[6,8],recieve_user:[6,8]).select(:send_user,:recieve_user)
|
|
||||||
user.recieve_messages.where(readed: false).count
|
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,24 @@ Rails.application.routes.draw do
|
||||||
get 'logout', to: 'login#logout'
|
get 'logout', to: 'login#logout'
|
||||||
|
|
||||||
get '/signup', to: 'users#new'
|
get '/signup', to: 'users#new'
|
||||||
|
get '/profile' ,to: 'users#edit'
|
||||||
|
|
||||||
get '/main', to: 'main#show'
|
get '/main', to: 'main#show'
|
||||||
|
get '/activity',to: 'main#activity'
|
||||||
|
|
||||||
get '/chat', to: 'chat#index'
|
get '/chat', to: 'chat#index'
|
||||||
post '/newmsg', to: 'chat#new'
|
post '/newmsg', to: 'chat#new'
|
||||||
get '/notify', to: 'chat#notify'
|
get '/notify', to: 'chat#notify'
|
||||||
get '/query', to: 'chat#query'
|
get '/query', to: 'chat#query'
|
||||||
get '/online',to: 'chat#online'
|
get '/online', to: 'chat#online'
|
||||||
|
|
||||||
|
get '/microposts', to: 'micro_posts#show'
|
||||||
|
post 'newpost', to: 'micro_posts#new'
|
||||||
|
|
||||||
|
get '/comments', to: 'comments#get'
|
||||||
|
post '/newcomment', to: 'comments#new'
|
||||||
|
|
||||||
resource :users
|
resource :users
|
||||||
|
resource :micro_posts
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ class CreateMessages < ActiveRecord::Migration[5.0]
|
||||||
t.integer :recieve_user
|
t.integer :recieve_user
|
||||||
t.datetime :create_time
|
t.datetime :create_time
|
||||||
t.boolean :readed
|
t.boolean :readed
|
||||||
t.timestampcs
|
t.timestamps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
class CreateMicroPosts < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
create_table :micro_posts do |t|
|
||||||
|
t.text :content
|
||||||
|
t.text :pic
|
||||||
|
t.datetime :post_time
|
||||||
|
t.integer :type
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddUserIdToMicroPosts < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
add_column :micro_posts, :user_id, :integer
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,12 @@
|
||||||
|
class CreateComments < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
create_table :comments do |t|
|
||||||
|
t.string :content
|
||||||
|
t.integer :user_id
|
||||||
|
t.integer :micro_post_id
|
||||||
|
t.datetime :comment_time
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class FixMicroPost < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
rename_column :micro_posts, :type, :post_type
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddEngagePeopleToMicroPosts < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
add_column :micro_posts, :engage_people, :integer
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddTitleToMicroPosts < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
add_column :micro_posts, :title, :string
|
||||||
|
end
|
||||||
|
end
|
23
db/schema.rb
|
@ -10,7 +10,16 @@
|
||||||
#
|
#
|
||||||
# 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: 20161126121451) do
|
ActiveRecord::Schema.define(version: 20161129085653) do
|
||||||
|
|
||||||
|
create_table "comments", force: :cascade do |t|
|
||||||
|
t.string "content"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "micro_post_id"
|
||||||
|
t.datetime "comment_time"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "messages", force: :cascade do |t|
|
create_table "messages", force: :cascade do |t|
|
||||||
t.text "content"
|
t.text "content"
|
||||||
|
@ -22,6 +31,18 @@ ActiveRecord::Schema.define(version: 20161126121451) do
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "micro_posts", force: :cascade do |t|
|
||||||
|
t.text "content"
|
||||||
|
t.text "pic"
|
||||||
|
t.datetime "post_time"
|
||||||
|
t.integer "post_type"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "engage_people"
|
||||||
|
t.string "title"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "users", force: :cascade do |t|
|
create_table "users", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "email"
|
t.string "email"
|
||||||
|
|
83881
log/development.log
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 494 KiB |
|
@ -63,3 +63,51 @@
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#activity-datail {
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-wrapper .social-container .social-entry .padded p.content {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#lost {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-wrapper .social-container .social-entry .padded {
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-wrapper .social-container .social-entry .padded {
|
||||||
|
margin: 0;
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-wrapper .social-container .social-entry .comments.padded {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-lg-4 .widget-container {
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-left: 25px;
|
||||||
|
margin-right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert.alert-info {
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user-page {
|
||||||
|
margin-left: 50px;
|
||||||
|
margin-right: 50px;
|
||||||
|
}
|
|
@ -410,7 +410,7 @@ body.login2 .login-wrapper .social-login .twitter:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .container-fluid.top-bar .logo {
|
.navbar .container-fluid.top-bar .logo {
|
||||||
background: url("../images/logo/guoren-small.png") no-repeat 0 0;
|
background: url("../images/logo/guoren.png") no-repeat 0 0;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -420,7 +420,7 @@ body.login2 .login-wrapper .social-login .twitter:hover {
|
||||||
|
|
||||||
@media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6 / 2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) {
|
@media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6 / 2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) {
|
||||||
.navbar .container-fluid.top-bar .logo {
|
.navbar .container-fluid.top-bar .logo {
|
||||||
background-image: url("../images/logo/guoren-xs.png");
|
background-image: url("../images/logo/guoren-small.png");
|
||||||
background-size: 54px 16px;
|
background-size: 54px 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1940,6 +1940,11 @@ th:active {
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.profile-info {
|
||||||
|
padding: 20px 20px 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------------- */
|
/*----------------------------------------------------------------------------------- */
|
||||||
/* Social Communities Widget */
|
/* Social Communities Widget */
|
||||||
/*----------------------------------------------------------------------------------- */
|
/*----------------------------------------------------------------------------------- */
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class CommentsControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class MicroPostsControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
content: MyString
|
||||||
|
user_id: 1
|
||||||
|
micro_post_id: 1
|
||||||
|
comment_time: 2016-11-29 10:22:12
|
||||||
|
|
||||||
|
two:
|
||||||
|
content: MyString
|
||||||
|
user_id: 1
|
||||||
|
micro_post_id: 1
|
||||||
|
comment_time: 2016-11-29 10:22:12
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
content: MyText
|
||||||
|
pic: MyText
|
||||||
|
post_time: 2016-11-29 10:07:37
|
||||||
|
type: 1
|
||||||
|
|
||||||
|
two:
|
||||||
|
content: MyText
|
||||||
|
pic: MyText
|
||||||
|
post_time: 2016-11-29 10:07:37
|
||||||
|
type: 1
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class CommentTest < ActiveSupport::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
|
@ -0,0 +1,7 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class MicroPostTest < ActiveSupport::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|